tests/spec/unit/regression/github_683.mzn
raw| 1 | /*** |
| 2 | !Test |
| 3 | solvers: [gecode] |
| 4 | expected: |
| 5 | - !Result |
| 6 | solution: !Solution |
| 7 | vars: [2, 1] |
| 8 | c: 1 |
| 9 | - !Result |
| 10 | solution: !Solution |
| 11 | vars: [1, 2] |
| 12 | c: 1 |
| 13 | ***/ |
| 14 | array[1..2] of opt 1..1: values = [1, <>]; |
| 15 | array[1..2] of var 1..2: vars; |
| 16 | function var 1..2: identity(var 1..2: k) = (k - 1) mod 2 + 1; |
| 17 | var 1..2: c ::output = count(x in 1..2)(values[identity(vars[x])] = 1) ::mzn_break_here; |
| 18 | constraint c = 1; |