Skip to main content
FRAMES NO FRAMES

IloAlwaysIn

public IloConstraint IloAlwaysIn(const IloEnv env, const IloCumulFunctionExpr f, IloInt start, IloInt end, IloInt vmin, IloInt vmax)
Definition file: ilconcert/ilosmodel.h
Creates a constraint that ensures a given range for the cumul function on an interval.

This function returns a constraint that states that the value of cumul function expression f should be always within the range [vmin,vmax] between start and end. Values vmin and vmax must be in range 0..IloIntervalMax. You must add this constraint to a model and extract the model to an algorithm in order for it to be taken into account.

Note: This constraint cannot be used in a logical constraint.

For more information on cumul function expressions, see the concept Cumul functions in CP Optimizer.


IloAlwaysIn

public IloConstraint IloAlwaysIn(const IloEnv env, const IloCumulFunctionExpr f, const IloIntervalVar a, IloInt vmin, IloInt vmax)
Definition file: ilconcert/ilosmodel.h
Creates a constraint that ensures a given range for the cumul function on an interval.

This function returns a constraint that states that whenever interval variable a is present, the value of cumul function expression f should be always within the range [vmin,vmax] between the start and the end of a. Values vmin and vmax must be in range 0..IloIntervalMax. You must add this constraint to a model and extract the model to an algorithm in order for it to be taken into account.

Note: This constraint cannot be used in a logical constraint.

For more information on cumul function expressions, see the concept Cumul functions in CP Optimizer.


IloAlwaysIn

public IloConstraint IloAlwaysIn(const IloEnv env, const IloStateFunction f, IloInt start, IloInt end, IloInt vmin, IloInt vmax)
Definition file: ilconcert/ilosmodel.h
Creates a constraint that ensures a range of states on an interval.

This function returns a constraint that ensures that, if it is defined, the value of state function f remains in the range [vmin,vmax] for any point t in the interval of integers [start,end).

Note: This constraint cannot be used in a logical constraint.

For more information on state functions, see the concept State functions in CP Optimizer.


IloAlwaysIn

public IloConstraint IloAlwaysIn(const IloEnv env, const IloStateFunction f, const IloIntervalVar a, IloInt vmin, IloInt vmax)
Definition file: ilconcert/ilosmodel.h
Creates a constraint that ensures a range of states on an interval.

This function returns a constraint that ensures that whenever interval variable a is present, the value of state function f, if defined, remains in the range [vmin,vmax] for any point t between the start and the end of interval variable a.

Note: This constraint cannot be used in a logical constraint.

For more information on state functions, see the concept State functions in CP Optimizer.