Debian Codegraph @

tests/spec/unit/globals/arg_max/globals_arg_max.mzn

raw
1 /***
2 !Test
3 solvers: [gecode, chuffed]
4 options:
5 all_solutions: true
6 expected: !Result
7 solution: !SolutionSet
8 - !Solution
9 x: [1, 2]
10 y: 5
11 - !Solution
12 x: [2, 1]
13 y: 4
14 ***/
15
16 include "globals.mzn";
17
18 array [4..5] of var 1..2: x;
19 var int: y;
20
21 constraint y = arg_max(x);
22 constraint all_different(x);
23
24 solve satisfy;