public interface IloCumulFunctionExpr extends IloAddable
A cumul function expression is an expression whose value in a solution is a function from the set of integers to the set of non-negative integers. A cumul function expression represents the sum of individual contributions of intervals. A panel of elementary cumul function expressions is available to describe the individual contribution of an interval variable (or a fixed interval) to a cumul function expression:
cp.pulse(a, 5) represents a pulse function of height
5. This function is equal to 0 before
the start of interval variable a, to 5
between the start and the end of interval variable a
and to 0 after the end of interval variable a. Several
variants of pulse functions are available depending on the fact the
interval is variable or fixed and whether the height is specified
as a fixed integer or as a range of possible integer values.cp.stepAtStart(a, 3) represents a step function
of height 3. This function is equal to
0 before the start of interval variable
a and to 3 after the start of interval
variable a. Several variants of step functions are
available depending on which end-point of the interval variable
is considered (start or end) and whether the height is specified as
a fixed integer or as a range of possible integer values.A cumul function expression is defined as the sum of the above elementary functions or their opposite. Several constraints over cumul function expressions are provided. These constraints allow restricting the possible values of the function over the complete horizon or over some fixed or variable interval:
f is a cumul function expression and max
a non-negative integer the constraint f <= max
states that function f must be everywhere lower than
max.f is a cumul function expression and min
a non-negative integer the constraint min <= f
states that function f must be everywhere greater than
min.f is a cumul function expression,
a an interval variable and [min,max] a
range of non-negative integers, the constraint
cp.alwaysIn(env,f,a,vmin,vmax) states that whenever
interval variable a is present, the value of function
f between the start and the end of interval
a must belong to range [vmin,vmax]. Variants
of this constraint are available to constrain a cumul
function expression over a fixed interval.For more information on cumul function expressions, see the concept Cumul Functions in the C++ Reference Manual.
| Modifier and Type | Method and Description |
|---|---|
void |
add(IloCumulFunctionExpr f)
This operator adds cumul function expression
f to the invoking cumul function expression. |
void |
sub(IloCumulFunctionExpr f)
This operator subtracts cumul function expression
f from the invoking cumul function expression. |
getName, setNamevoid add(IloCumulFunctionExpr f)
This operator adds cumul function expression
f to the invoking cumul function expression.
void sub(IloCumulFunctionExpr f)
This operator subtracts cumul function expression
f from the invoking cumul function expression.