Debian Codegraph @

tests/spec/unit/regression/opt_minmax.mzn

raw
1 /***
2 !Test
3 solvers: [gecode]
4 expected:
5 - !Result
6 solution: !Solution
7 xmax: 10
8 xmin: 1
9 ymax: 10.0
10 ymin: 1.0
11 ***/
12 array[_] of var opt 1..10: x = [<>, 10, _];
13 constraint sum(x) = 11;
14 any: xmax ::output = max(x);
15 any: xmin ::output = min(x);
16 array[_] of var opt 1.0..10.0: y = [<>, 10.0, _];
17 constraint sum(y) = 11.0;
18 any: ymax ::output = max(y);
19 any: ymin ::output = min(y);