| 1 |
/*** |
| 2 |
!Test |
| 3 |
solvers: [gecode, chuffed] |
| 4 |
expected: !Result |
| 5 |
status: ALL_SOLUTIONS |
| 6 |
solution: !SolutionSet |
| 7 |
- !Solution |
| 8 |
xs: [3, 5] |
| 9 |
- !Solution |
| 10 |
xs: [4, 5] |
| 11 |
- !Solution |
| 12 |
xs: [5, 5] |
| 13 |
- !Solution |
| 14 |
xs: [3, null] |
| 15 |
- !Solution |
| 16 |
xs: [4, null] |
| 17 |
- !Solution |
| 18 |
xs: [5, null] |
| 19 |
options: |
| 20 |
all_solutions: true |
| 21 |
***/ |
| 22 |
|
| 23 |
include "table.mzn"; |
| 24 |
|
| 25 |
array[1..2] of var opt 3..5: xs; |
| 26 |
array[int, 1..2] of opt int: table = [| |
| 27 |
<>, 5,| |
| 28 |
5, 5,| |
| 29 |
|]; |
| 30 |
|
| 31 |
constraint occurs(xs[1]); |
| 32 |
constraint table(xs, table); |