this repo has no description
1include "fzn_bin_packing_capa.mzn";
2include "fzn_bin_packing_capa_reif.mzn";
3
4/** @group globals.packing
5 Requires that each item \p i with weight \a w[\p i], be put into \a bin[\p i] such
6 that the sum of the weights of the items in each bin \p b does not exceed the
7 capacity \a c[\p b].
8
9 Assumptions:
10 - forall \p i, \a w[\p i] >=0
11 - forall \p b, \a c[\p b] >=0
12*/
13predicate bin_packing_capa(array[int] of int: c,
14 array[int] of var int: bin,
15 array[int] of int: w) =
16 assert(index_set(bin) = index_set(w),
17 "bin_packing_capa: the bin and weight arrays must have identical index sets",
18 assert(lb_array(w) >= 0,
19 "bin_packing_capa: the weights must be non-negative",
20 assert(lb_array(c) >= 0,
21 "bin_packing_capa: the capacities must be non-negative",
22 fzn_bin_packing_capa(c, bin, w)
23 )));
24
25predicate bin_packing_capa_reif(array[int] of int: c,
26 array[int] of var int: bin,
27 array[int] of int: w,
28 var bool: b) =
29 assert(index_set(bin) = index_set(w),
30 "bin_packing_capa: the bin and weight arrays must have identical index sets",
31 assert(lb_array(w) >= 0,
32 "bin_packing_capa: the weights must be non-negative",
33 assert(lb_array(c) >= 0,
34 "bin_packing_capa: the capacities must be non-negative",
35 fzn_bin_packing_capa_reif(c, bin, w, b)
36 )));
37
38%-----------------------------------------------------------------------------%