4.2.2.10. Scheduling constraints
In this section: alternative, cumulative, cumulatives, disjunctive, disjunctive_strict, span.
alternative
predicate alternative(var opt int: s0,
var int: d0,
array [int] of var opt int: s,
array [int] of var int: d)

Alternative constraint for optional tasks. The task with start time s0 and duration d0 spans the optional tasks with start times s[i] and durations d[i]), and at most one of those tasks can occur. 
cumulative
1. predicate cumulative(array [int] of var int: s,
array [int] of var int: d,
array [int] of var int: r,
var int: b)
2. predicate cumulative(array [int] of var opt int: s,
array [int] of var int: d,
array [int] of var int: r,
var int: b)


cumulatives
predicate cumulatives(array [$$E] of var int: s,
array [$$E] of var int: d,
array [$$E] of var int: r,
array [$$E] of var $$M: m,
array [$$M] of var int: b,
bool: upper)

We have a set of tasks given by start times s, durations d, resource requirements r, and machines m. We also have a set of machines given by resource bounds b. Finally, we have a Boolean flag upper. The constraint requires that forall i, m[i] is in the index set of b and that for each machine j and time instant t, either no task assigned to j executes at \t, or the total resource requirement of such tasks is not greater than, if upper is true, or not less than, if upper is false, the given bound b[j]. Resource requirements can be positive (for consumption) or negative (for production). Assumptions:

disjunctive
1. predicate disjunctive(array [$$T] of var int: s,
array [$$T] of var int: d)
2. predicate disjunctive(array [$$T] of var opt int: s,
array [$$T] of var int: d)


disjunctive_strict
1. predicate disjunctive_strict(array [$$T] of var int: s,
array [$$T] of var int: d)
2. predicate disjunctive_strict(array [$$T] of var opt int: s,
array [$$T] of var int: d)


span
predicate span(var opt int: s0,
var int: d0,
array [$$E] of var opt int: s,
array [$$E] of var int: d)

Span constraint for optional tasks. Task (s0,d0) spans the optional tasks (s[i],d[i]) in the array arguments. 