FRAMES NO FRAMES

Class IloPrecedenceConstraint

Definition file: ilsched/iloactivity.h
Include file: <ilsched/iloscheduler.h>

Instances of the class IloPrecedenceConstraint are temporal constraints. These temporal constraints express precedence between activities in a schedule. (Other temporal constraints—instances of IloTimeBoundConstraint—express constraints on the time interval in which an activity is to be scheduled.)

This class inherits from the IBM ILOG Concert Technology class IloConstraint. That class is documented in the IBM ILOG Concert Technology Reference Manual.

Instances of this class are created by these member functions:

For more information, see IloConstraint in the IBM ILOG Concert Technology Reference Manual, and Temporal Relations.

See Also:

Constructor Summary
public IloPrecedenceConstraint()
public IloPrecedenceConstraint(IloPrecedenceConstraintI * impl)
Method Summary
public IloNumgetDelay() const
public IloNumVargetDelayVariable() const
public IloActivitygetFollowingActivity() const
public IloPrecedenceConstraintI *getImpl() const
public IloActivitygetPrecedingActivity() const
public IloPrecedenceConstraintTypegetType() const
public IloBoolhasDelayVariable() const
Constructor Detail

IloPrecedenceConstraint

public IloPrecedenceConstraint()
This constructor creates an instance that is empty, that is, one whose handle pointer is null. You must assign it a value before you access it. Any attempt to access it before assignment leads to undefined behaviour.

IloPrecedenceConstraint

public IloPrecedenceConstraint(IloPrecedenceConstraintI * impl)
This constructor creates an instance of the handle class from the pointer to an instance of the implementation class.

Method Detail

getDelay

public IloNum getDelay() const

This member function returns the delay of the invoking precedence constraint.

Example

The statement

m.add(act2.startsAfterEnd(act1, delay));

posts the constraint that at least the given delay must elapse between the end of the preceding activity act1 and the start of the following activity act2.


getDelayVariable

public IloNumVar getDelayVariable() const
Returns the variable delay that the constraint was build with. Should not be called if the constraint has been build with a constant delay. Will assert in this case if we are in debug mode.

This member function returns the delay variable of the invoking precedence constraint.


getFollowingActivity

public IloActivity getFollowingActivity() const

This member function returns the following activity of the invoking precedence constraint.


getImpl

public IloPrecedenceConstraintI * getImpl() const
This member function returns a pointer to the implementation object of the invoking handle.

getPrecedingActivity

public IloActivity getPrecedingActivity() const

This member function returns the preceding activity of the invoking precedence constraint.


getType

public IloPrecedenceConstraintType getType() const

This member function returns the type of the invoking precedence constraint.


hasDelayVariable

public IloBool hasDelayVariable() const
IloTrue if the constraint has been build with a variable delay

This member function returns IloTrue if the invoking precedence constraint has a delay variable. Otherwise, if the delay is constant, it returns IloFalse.