Scheduling types

Types designed for describing scheduling problems.

intervalVar
Interval decision variable, see Interval variables in CP Optimizer. Note that intervalVar is the type name but also name of function intervalVar.
sequenceVar
Interval sequence decision variable. See Interval variable sequencing in CP Optimizer. Sequence variables can be created by function with the same name: sequenceVar.
stateFunction
State function, see State functions in CP Optimizer. State functions can be created by function stateFunction and constrained using constraints alwaysIn, alwaysConstant, alwaysNoState and alwaysEqual.
cumulAtom
This type represents a basic cumul function expression, see Cumul functions in CP Optimizer. Cumul atoms can be created by functions pulse, stepAtStart, stepAtEnd and stepAt.
cumulExpr
a combination of cumul atoms using operators +, - or function sum.

Example


// Interval variables
a1 = intervalVar(size=2);
a2 = intervalVar(size=4);
a3 = intervalVar(size=3);
// Functions below are cumul atoms
f1 = pulse(a1,4);     
f2 = stepAtStart(a2,1); 
f3 = stepAtEnd(a3,1);
f4 = stepAt(4,5);
// Functions below are composite cumul function expressions
f5 = sum([f1, f3, f4]) - f2;
f6 = pulse(a1,2) +  stepAtStart(a2,2) - stepAtEnd(a3,3) + stepAt(4,5);
// Constraints can be posted on cumul functions expressions
f1 <= 5;
f5 <= 5;
alwaysIn(f6,0,5,0,4);