Debian Codegraph @

tests/spec/unit/regression/github_749.mzn

raw
1 /***
2 !Test
3 expected:
4 - !Result
5 solution: !Solution
6 x: [true, false, false]
7 y: false
8 c: 2
9 - !Result
10 solution: !Solution
11 x: [false, false, false]
12 y: false
13 c: 3
14 - !Result
15 solution: !Solution
16 x: [true, true, false]
17 y: false
18 c: 1
19 - !Result
20 solution: !Solution
21 x: [false, true, false]
22 y: false
23 c: 2
24 - !Result
25 solution: !Solution
26 x: [true, false, true]
27 y: false
28 c: 1
29 - !Result
30 solution: !Solution
31 x: [false, true, true]
32 y: false
33 c: 1
34 - !Result
35 solution: !Solution
36 x: [false, false, true]
37 y: false
38 c: 2
39 - !Result
40 solution: !Solution
41 x: [true, false, false]
42 y: true
43 c: 1
44 - !Result
45 solution: !Solution
46 x: [false, true, false]
47 y: true
48 c: 1
49 - !Result
50 solution: !Solution
51 x: [true, true, false]
52 y: true
53 c: 2
54 - !Result
55 solution: !Solution
56 x: [false, false, true]
57 y: true
58 c: 1
59 - !Result
60 solution: !Solution
61 x: [true, false, true]
62 y: true
63 c: 2
64 - !Result
65 solution: !Solution
66 x: [false, true, true]
67 y: true
68 c: 2
69 - !Result
70 solution: !Solution
71 x: [true, true, true]
72 y: true
73 c: 3
74 solvers: [gecode]
75 ***/
76 include "count_eq.mzn";
77
78 array [1..3] of var bool: x;
79 var bool: y;
80 var 0..3: c;
81
82 constraint c > 0;
83 constraint c = count(x, y);