1include "disjunctive_strict.mzn";
2include "fzn_disjunctive.mzn";
3include "fzn_disjunctive_reif.mzn";
4
5/** @group globals.scheduling
6  Requires that a set of tasks given by start times \a s and durations \a d
7  do not overlap in time. Tasks with duration 0 can be scheduled at any time,
8  even in the middle of other tasks.
9
10  Assumptions:
11
12  - forall \p i, \a d[\p i] >= 0
13*/
14predicate disjunctive(array[int] of var int: s,
15                      array[int] of var int: d) =
16    assert(index_set(s) == index_set(d),
17        "disjunctive: the array arguments must have identical index sets",
18        if (lb_array(d) > 0) then
19          disjunctive_strict(s,d)
20        else
21          fzn_disjunctive(s,d)
22        endif
23    );
24