this repo has no description
1include "fzn_global_cardinality_closed.mzn";
2include "fzn_global_cardinality_closed_reif.mzn";
3
4/** @group globals.counting
5 Requires that the number of occurences of \p i in \a x is \a counts[\p i].
6
7 The elements of \a x must take their values from \a cover.
8*/
9predicate global_cardinality_closed(array[int] of var int: x,
10 array[int] of int: cover,
11 array[int] of var int: counts) =
12 assert(index_set(cover) = index_set(counts),
13 "global_cardinality_closed: " ++
14 "cover and counts must have identical index sets",
15 fzn_global_cardinality_closed(x, cover, counts)
16 );