Debian Codegraph @

tests/spec/unit/optional/test_opt_max.mzn

raw
1 /***
2 !Test
3 expected: !Result
4 solution: !Solution
5 y: 3
6 ***/
7
8 include "globals.mzn";
9
10 array [1..5] of var opt 1..3: x;
11 var 1..10: y;
12
13 constraint occurs(x[1]);
14 constraint forall (i in 1..4) (occurs(x[i]) = absent(x[i + 1]));
15 constraint y = max(x);
16 constraint all_different(x);
17
18 solve satisfy;