tests/spec/unit/regression/github_695.mzn
raw| 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: -3 |
| 11 | y: -3 |
| 12 | idx: 0 |
| 13 | val: -3 |
| 14 | p: true |
| 15 | - !Solution |
| 16 | x: -3 |
| 17 | y: -3 |
| 18 | idx: 1 |
| 19 | val: -3 |
| 20 | p: true |
| 21 | - !Solution |
| 22 | x: -3 |
| 23 | y: -3 |
| 24 | idx: 2 |
| 25 | val: -3 |
| 26 | p: false |
| 27 | - !Solution |
| 28 | x: -3 |
| 29 | y: -3 |
| 30 | idx: 2 |
| 31 | val: -3 |
| 32 | p: true |
| 33 | ***/ |
| 34 | |
| 35 | var -3..-3: x; |
| 36 | var -3..-3: y; |
| 37 | var 0..2: idx; |
| 38 | var -3..-2: val; |
| 39 | var bool: p; |
| 40 | constraint ([0: x, y][idx] = val) -> p; |
| 41 | constraint val = max([x,y]); |