Debian Codegraph @

tests/spec/unit/regression/array_set_element_nosets.mzn

raw
1 /***
2 !Test
3 solvers: [chuffed, cbc, highs]
4 expected:
5 - !Result
6 solution: !Solution
7 x: 1
8 y: [!!set {1}, !!set {2}, !!set {3}]
9 z: !!set {1}
10 - !Result
11 solution: !Solution
12 x: 3
13 y: [!!set {1}, !!set {2}, !!set {3}]
14 z: !!set {3}
15 ***/
16
17 % Tests for a bug in nosets.mzn for non-contiguous domains of x in array_set_element(x, y, z)
18
19 include "nosets.mzn";
20
21 var {1, 3}: x :: add_to_output;
22 array [1..3] of set of 1..3: y :: add_to_output = [{1}, {2}, {3}];
23 var set of 1..3: z :: add_to_output;
24
25 constraint array_set_element(x, y, z);