| 1 |
/*** |
| 2 |
!Test |
| 3 |
solvers: [gecode] |
| 4 |
options: |
| 5 |
all_solutions: true |
| 6 |
expected: !Result |
| 7 |
status: ALL_SOLUTIONS |
| 8 |
solution: !SolutionSet |
| 9 |
- !Solution |
| 10 |
x: [!!set {1}, !!set {2}, !!set {3}] |
| 11 |
b: true |
| 12 |
- !Solution |
| 13 |
x: [!!set {1, 2, 3}, !!set {1, 2, 3}, !!set {1, 2, 3}] |
| 14 |
b: false |
| 15 |
***/ |
| 16 |
|
| 17 |
array [1..3] of var set of 1..3: x; |
| 18 |
|
| 19 |
var bool: b :: output = let { |
| 20 |
var set of int: a = array_intersect(x); |
| 21 |
constraint a = {}; |
| 22 |
constraint forall (x_i in x) (card(x_i) = 1); |
| 23 |
constraint forall (i in 1..2) (min(x[i]) < min(x[i + 1])); |
| 24 |
} in true; |
| 25 |
|
| 26 |
constraint not b -> forall (x_i in x) (card(x_i) = 3); |