this repo has no description
1include "fzn_cumulative_opt.mzn";
2include "fzn_cumulative_opt_reif.mzn";
3
4/** @group globals.scheduling
5 Requires that a set of tasks given by start times \a s, durations \a d, and
6 resource requirements \a r, never require more than a global resource bound
7 \a b at any one time. Start times are optional variables, so
8 that absent tasks do not need to be scheduled.
9
10 Assumptions:
11 - forall \p i, \a d[\p i] >= 0 and \a r[\p i] >= 0
12*/
13predicate cumulative(array[int] of var opt int: s,
14 array[int] of var int: d,
15 array[int] of var int: r, var int: b) =
16 assert(index_set(s) == index_set(d) /\ index_set(s) == index_set(r),
17 "cumulative: the 3 array arguments must have identical index sets",
18 assert(lb_array(d) >= 0 /\ lb_array(r) >= 0,
19 "cumulative: durations and resource usages must be non-negative",
20 fzn_cumulative_opt(s,d,r,b)
21 )
22 );