# 4.2.2.10. Scheduling constraints¶

In this section: alternative, cumulative, 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)  Requires that a set of tasks given by start times s, durations d, and resource requirements r, never require more than a global resource bound b at any one time. Assumptions: forall i, d[i] >= 0 and r[i] >= 0 Requires that a set of tasks given by start times s, durations d, and resource requirements r, never require more than a global resource bound b at any one time. Start times are optional variables, so that absent tasks do not need to be scheduled. Assumptions: forall i, d[i] >= 0 and r[i] >= 0

## 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)  Requires that a set of tasks given by start times s and durations d do not overlap in time. Tasks with duration 0 can be scheduled at any time, even in the middle of other tasks. Assumptions: forall i, d[i] >= 0 Requires that a set of tasks given by start times s and durations d do not overlap in time. Tasks with duration 0 can be scheduled at any time, even in the middle of other tasks. Start times are optional variables, so that absent tasks do not need to be scheduled. Assumptions: forall i, d[i] >= 0

## 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)  Requires that a set of tasks given by start times s and durations d do not overlap in time. Tasks with duration 0 CANNOT be scheduled at any time, but only when no other task is running. Assumptions: forall i, d[i] >= 0 Requires that a set of tasks given by start times s and durations d do not overlap in time. Tasks with duration 0 CANNOT be scheduled at any time, but only when no other task is running. Start times are optional variables, so that absent tasks do not need to be scheduled. Assumptions: forall i, d[i] >= 0

## 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.