this repo has no description
1/***
2--- !Test
3solvers: [chuffed] # Too slow on CBC
4options:
5 all_solutions: true
6expected: !Result
7 status: ALL_SOLUTIONS
8 solution:
9 - !Solution
10 sets:
11 - !!set {}
12 - !!set {1}
13 - !Range 1..2
14 - !Range 1..3
15 - !!set {1, 3}
16 - !!set {2}
17 - !Range 2..3
18 - !!set {3}
19--- !Test
20solvers: [cbc]
21expected: !Result
22 status: SATISFIED
23 solution: !Solution
24 sets:
25 - !!set {}
26 - !!set {1}
27 - !Range 1..2
28 - !Range 1..3
29 - !!set {1, 3}
30 - !!set {2}
31 - !Range 2..3
32 - !!set {3}
33***/
34
35% Lexicographic order of subsets of 1..3
36
37int: n = 3;
38int: m = pow(2, n);
39
40array[1..m] of var set of 1..n: sets;
41
42constraint forall (i in 1..m-1) (sets[i] < sets[i+1]);
43
44output [show(sets)];
45
46solve satisfy;