this repo has no description
1/***
2!Test
3solvers: [gecode]
4expected: !Result
5 solution: !Solution
6 par_int: b
7 var_int: c
8 array_of_int: [a, b, c]
9 array_of_var_int: [a, b, c]
10 array_of_set_of_int: [!!set {a}, !!set {a, b}, !!set {a, b, c}]
11 array_of_var_set_of_int: [!!set {a}, !!set {a, b}, !!set {a, b, c}]
12 set_of_int: !!set {a, b, c}
13 var_set_of_int: !!set {a, b, c}
14***/
15
16enum X = {a, b, c};
17
18var 1..3: i;
19array [1..3] of var 1..3: j;
20var set of 1..3: k;
21array [1..3] of var set of 1..3: l;
22
23constraint j[1] < j[2] /\ j[2] < j[3];
24constraint card(k) = 3;
25constraint forall (x in 1..3) (card(l[x]) = x);
26constraint 1 in l[1] /\ not (3 in l[2]);
27
28X: par_int :: add_to_output = to_enum(X, 2);
29var X: var_int :: add_to_output = to_enum(X, i);
30array [1..3] of X: array_of_int :: add_to_output = to_enum(X, [1, 2, 3]);
31array [1..3] of var X: array_of_var_int :: add_to_output = to_enum(X, j);
32set of X: set_of_int :: add_to_output = to_enum(X, {1, 2, 3});
33var set of X: var_set_of_int :: add_to_output = to_enum(X, k);
34array [1..3] of set of X: array_of_set_of_int :: add_to_output = to_enum(X, [{1}, {1, 2}, {1, 2, 3}]);
35array [1..3] of var set of X: array_of_var_set_of_int :: add_to_output = to_enum(X, l);
36
37solve maximize i;