FRAMES NO FRAMES

Class IlcPrecedenceConstraint

Definition file: ilsched/schedule.h
Include file: <ilsched/ilsched.h>

Instances of the class IlcPrecedenceConstraint are temporalconstraints. These temporal constraints express precedence between activities in a schedule. (Other temporal constraints, such as instances of IlcTimeBoundConstraint, express constraints on the time interval in which an activity is to be scheduled.)

This class inherits from the Solver class IlcConstraint. That class is documented in the IBM ILOG Solver Reference Manual.

Instances of this class are created by these member functions:

For more information, see Metaconstraints, and IlcConstraint in the IBM ILOG Solver Reference Manual.

See Also:

Constructor Summary
public IlcPrecedenceConstraint()
public IlcPrecedenceConstraint(IlcPrecedenceConstraintI * impl)
Method Summary
public IlcIntgetDelay() const
public IlcIntVargetDelayVariable() const
public IlcActivitygetFollowingActivity() const
public IlcPrecedenceConstraintI *getImpl() const
public IlcActivitygetPrecedingActivity() const
public IlcPrecedenceConstraintTypegetType() const
public IlcBoolhasDelayVariable() const
public voidoperator=(const IlcPrecedenceConstraint & h)
Constructor Detail

IlcPrecedenceConstraint

public IlcPrecedenceConstraint()
This constructor creates an instance which 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.

IlcPrecedenceConstraint

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

Method Detail

getDelay

public IlcInt 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 IlcIntVar getDelayVariable() const

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


getFollowingActivity

public IlcActivity getFollowingActivity() const

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


getImpl

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

getPrecedingActivity

public IlcActivity getPrecedingActivity() const

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


getType

public IlcPrecedenceConstraintType getType() const

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


hasDelayVariable

public IlcBool hasDelayVariable() const

This member function returns IlcTrue if the invoking precedence constraint has a delay variable. Otherwise, it returns IlcFalse.


operator=

public void operator=(const IlcPrecedenceConstraint & h)
This operator assigns an address to the handle pointer of the invoking object. That address is the location of the implementation object of the provided argument. After execution of this operator, the invoking object and the provided argument point to the same implementation object.