Skip to main content
FRAMES NO FRAMES

Class IlcCumulElementVar

Definition file: ilcp/cpext.h
Include file: <ilcp/cpext.h>
Map of IlcCumulElementVarIlcCumulElementVarIlcCumulElementVar
The class for representing constrained cumul element functions.

An instance of this class is a constrained cumul element function in the optimizer engine. A cumul element function in the model layer is built by the shape functions IloPulse with an instance of IloIntervalVar as first argument, IloStepAtStart or IloStepAtEnd. You retrieve an instance of IlcCumulElementVar from an instance of IloCumulFunctionExpr, by using the member function IlcCumulElementVar IlcCPEngine::getCumulElement(const IloCumulFunctionExpr) const.

The member functions of this class give access to the search engine data structure of the cumul element function, including the interval variable, the shape, the integer range domain for the height. This concerns the domain setters and getters and the delta-domains and events for custom constraint propagation implementations. These members functions are available only inside the search of the optimizer engine.

For more information on cumul variables and the search API for scheduling, see the concept Search API for scheduling in CP Optimizer.

See Also:

Method Summary
public IlcCPEnginegetCPEngine() const
public IlcIntgetHeightMax() const
public IlcIntgetHeightMin() const
public IlcIntervalVargetInterval() const
public IlcIntgetOldHeightMax() const
public IlcIntgetOldHeightMin() const
public IlcBoolhasDeltaHeight() const
public IlcBoolisFixed() const
public IlcBoolisHeightFixed() const
public IlcBoolisNull() const
public IlcBoolisPulse() const
public IlcBoolisStepAtEnd() const
public IlcBoolisStepAtStart() const
public voidsetHeight(IlcInt value) const
public voidsetHeightMax(IlcInt max) const
public voidsetHeightMin(IlcInt min) const
public voidwhenHeight(const IlcDemon d) const
Method Detail

getCPEngine

public IlcCPEngine getCPEngine() const

This member function returns the instance of IlcCPEngine associated with the invoking instance of IlcCumulElementVar.


getHeightMax

public IlcInt getHeightMax() const

This member function returns the current maximum of the height integer range of the invoking instance of IlcCumulElementVar. If the cumul element is the null function, the value returned by this member function is meaningless.


getHeightMin

public IlcInt getHeightMin() const

This member function returns the current minimum of the height integer range of the invoking instance of IlcCumulElementVar. If the cumul element is the null function, the value returned by this member function is meaningless.


getInterval

public IlcIntervalVar getInterval() const

This member function returns the instance of IlcIntervalVar associated with the invoking instance of IlcCumulElementVar.


getOldHeightMax

public IlcInt getOldHeightMax() const

This member function returns the maximum of the height integer range of the invoking instance of IlcCumulElementVar the last time the interval was processed by the propagation algorithm of the optimizer engine.

This function can only be used in a propagation function, that is, at the execution of a demon (instance of IlcDemonI) or the virtual member propagate of a constraint (instance of IlcConstraintI).


getOldHeightMin

public IlcInt getOldHeightMin() const

This member function returns the minimum of the height integer range of the invoking instance of IlcCumulElementVar the last time the interval was processed by the propagation algorithm of the optimizer engine.

This function can only be used in a propagation function, that is, at the execution of a demon (instance of IlcDemonI) or the virtual member propagate of a constraint (instance of IlcConstraintI).


hasDeltaHeight

public IlcBool hasDeltaHeight() const

This member function returns IlcTrue if the height integer range of the invoking instance of IlcCumulElementVar has changed since the last time the interval was processed by the propagation algorithm of the optimizer engine. Otherwise, it returns IlcFalse.

This function can only be used in a propagation function, that is, at the execution of a demon (instance of IlcDemonI) or the virtual member propagate of a constraint (instance of IlcConstraintI).

Note
The invoking instance of IlcCumulElementVar can be null and nevertheless have a delta height.

isFixed

public IlcBool isFixed() const

This member function returns IlcTrue if the invoking instance of IlcCumulElementVar is fixed, that is, if it is a null function or its associated instance of IlcIntervalVar and its integer domain range height are fixed. Otherwise, it returns IlcFalse.


isHeightFixed

public IlcBool isHeightFixed() const

This member function returns IlcTrue if the invoking instance of IlcCumulElementVar is a null function or its integer domain range height is fixed. Otherwise, it returns IlcFalse.


isNull

public IlcBool isNull() const

This member function returns IlcTrue if the invoking instance of IlcCumulElementVar is a null function. Otherwise, it returns IlcFalse.


isPulse

public IlcBool isPulse() const

This member function returns IlcTrue if the shape of the invoking instance of IlcCumulElementVar is a pulse function. Otherwise, it returns IlcFalse.


isStepAtEnd

public IlcBool isStepAtEnd() const

This member function returns IlcTrue if the shape of the invoking instance of IlcCumulElementVar is a step at end function. Otherwise, it returns IlcFalse.


isStepAtStart

public IlcBool isStepAtStart() const

This member function returns IlcTrue if the shape of the invoking instance of IlcCumulElementVar is a step at start function. Otherwise, it returns IlcFalse.


setHeight

public void setHeight(IlcInt value) const

This member function sets the value of the height range of the invoking instance of IlcCumulElementVar to the integer argument value. If the cumul element is null, no changes occur (due to the monotonicity of the optimizer engine). If the height range becomes empty, the cumul element is set to be null. A cumul height domain event is created. The effects of this member function are reversible.


setHeightMax

public void setHeightMax(IlcInt max) const

This member function sets the maximum of the height range of the invoking instance of IlcCumulElementVar to the integer argument max. If max is greater than the current maximum of the height range or if the cumul element is null, no changes occur (due to the monotonicity of the optimizer engine). If the height range becomes empty, the cumul element is set to be null. A cumul height domain event is created. The effects of this member function are reversible.


setHeightMin

public void setHeightMin(IlcInt min) const

This member function sets the minimum of the height range of the invoking instance of IlcCumulElementVar to the integer argument min. If min is less than the currnet minimum of the height range or if the cumul element is null, no changes occur (due to the monotonicity of the optimizer engine). If the height range becomes empty, the cumul element is set to be null. A cumul height domain event is created. The effects of this member function are reversible.


whenHeight

public void whenHeight(const IlcDemon d) const

This member function creates a height domain event on the invoking instance of IlcCumulElementVar, that is, it associates the argument demon with the changes of the height reduction of the cumul element. Whenever the height range of the invoking cumul element changes, the demon will be executed.

Since a constraint is also a demon, a constraint can also be passed as an argument to this member function. Whenever the height range of the invoking cumul element change, the constraint will be propagated.

This member function can only be used during the posting of a constraint.