Debian Codegraph @

tests/spec/unit/regression/bug52.mzn

raw
1 /***
2 !Test
3 expected:
4 - !Result
5 solution: !Solution
6 x1d1: 3
7 x1d9: 10
8 ***/
9
10 % A regression test for G12 bug #52.
11 %
12 array[1..3,1..3] of var int: x;
13 array[1..9] of var int: x1d = [x[w,h] | w in 1..3, h in 1..3];
14 var int: x1d1 :: add_to_output = x1d[1];
15 var int: x1d9 :: add_to_output = x1d[9];
16
17 constraint x[1, 1] = 3;
18
19 constraint x[3, 3] = 10;
20
21 solve satisfy;
22
23 output [
24 "x1d1 = ", show(x1d1), ";\n",
25 "x1d9 = ", show(x1d9), ";\n"
26 ];