| 1 |
/*** |
| 2 |
!Test |
| 3 |
options: |
| 4 |
all_solutions: true |
| 5 |
-G: std |
| 6 |
solvers: [gecode] |
| 7 |
expected: !Result |
| 8 |
solution: !SolutionSet |
| 9 |
status: ALL_SOLUTIONS |
| 10 |
solution: !SolutionSet |
| 11 |
- !Solution |
| 12 |
d: [10000, 0, 0] |
| 13 |
- !Solution |
| 14 |
d: [10000, 1, 0] |
| 15 |
- !Solution |
| 16 |
d: [10000, 0, 1] |
| 17 |
***/ |
| 18 |
|
| 19 |
include "cumulative.mzn"; |
| 20 |
|
| 21 |
array[1..3] of int: s = [0, 0, 0]; |
| 22 |
array[1..3] of var 0..10000: d; |
| 23 |
array[1..3] of int: r = [1, 1, 1]; |
| 24 |
|
| 25 |
constraint d[1] = 10000; |
| 26 |
constraint d[2] in 0..1; |
| 27 |
constraint d[3] in 0..1; |
| 28 |
constraint cumulative(s, d, r, 2); |