Debian Codegraph @

tests/spec/unit/regression/bug318_orig.mzn

raw
1 /***
2 !Test
3 solvers: [gecode, chuffed]
4 expected:
5 - !Result
6 solution: !Solution
7 objective: -2147483646
8 var1: 1
9 var2: -2147483646
10 var3: -2147483646
11 - !Result
12 solution: !Solution
13 objective: -500000000
14 var1: 1
15 var2: -500000000
16 var3: -500000000
17 ***/
18
19 % Regression test for bug #318: this model as causing mzn2fzn to abort because
20 % the second argument of the element constraint below wasn't flat by the
21 % optimisation pass (or the output pass if optimisation was disabled).
22
23 include "globals.mzn";
24
25 var int: var1;
26 var int: var2;
27 var int: var3;
28
29 constraint element(var1,[var2, (var2+1) ],var3);
30
31 solve minimize var3;
32
33 output ["Ok\n"];