Debian Codegraph @

tests/spec/unit/globals/lex2/globals_lex2.mzn

raw
1 /***
2 --- !Test
3 solvers: [gecode, chuffed]
4 expected: !Result
5 solution: !SolutionSet
6 - !Solution
7 y:
8 - - 1
9 - 1
10 - - 1
11 - 1
12 - !Solution
13 y:
14 - - 1
15 - 2
16 - - 2
17 - 1
18 - !Solution
19 y:
20 - - 1
21 - 1
22 - - 1
23 - 2
24 - !Solution
25 y:
26 - - 1
27 - 2
28 - - 1
29 - 2
30 - !Solution
31 y:
32 - - 1
33 - 1
34 - - 2
35 - 2
36 - !Solution
37 y:
38 - - 1
39 - 2
40 - - 2
41 - 2
42 - !Solution
43 y:
44 - - 2
45 - 2
46 - - 2
47 - 2
48 options:
49 all_solutions: true
50 --- !Test
51 solvers: [cbc]
52 expected:
53 - !Result
54 solution: !Solution
55 y:
56 - [1, 1]
57 - [1, 1]
58 - !Result
59 solution: !Solution
60 y:
61 - [1, 2]
62 - [2, 1]
63 - !Result
64 solution: !Solution
65 y:
66 - [1, 1]
67 - [1, 2]
68 - !Result
69 solution: !Solution
70 y:
71 - [1, 2]
72 - [1, 2]
73 - !Result
74 solution: !Solution
75 y:
76 - [1, 1]
77 - [2, 2]
78 - !Result
79 solution: !Solution
80 y:
81 - [1, 2]
82 - [2, 2]
83 - !Result
84 solution: !Solution
85 y:
86 - [2, 2]
87 - [2, 2]
88 ***/
89
90 include "lex2.mzn";
91
92 array[1..2, 1..2] of var 1..2: y ::add_to_output;
93
94 constraint lex2([|2, 2, 3|
95 2, 3, 1|]);
96
97 constraint lex2(y);
98
99 solve satisfy;
100
101 output ["y = array2d(1..2, 1..2, ", show(y), ");\n"];