this repo has no description
1% RUNS ON mzn20_fd
2% RUNS ON mzn-fzn_fd
3% RUNS ON mzn20_fd_linear
4% RUNS ON mzn20_mip
5
6% Regression test for bug #70: set2array coercions were not supported.
7
8include "global_cardinality_low_up.mzn";
9
10predicate my_global_cardinality_low_up(array[int] of var int: x,
11 array[int] of int: cover,
12 array[int] of int: lbound,
13 array[int] of int: ubound) =
14 forall(i in index_set(cover)) (
15 sum(j in index_set(x)) ( bool2int(x[j] = cover[i]) )
16 in lbound[i]..ubound[i]
17 );
18
19
20predicate myall_different(array[int] of var int: x) =
21 global_cardinality_low_up(
22 x, set2array(dom_array(x)), [0 | i in dom_array(x)], [1 | i in dom_array(x)]);
23
24array[1..3] of var 1..4: x;
25
26constraint myall_different(x);
27
28solve :: int_search(x, input_order, indomain_min, complete) satisfy;
29
30output ["x = ", show(x), ";\n"];