Debian Codegraph @

tests/spec/unit/globals/arg_max/globals_arg_max_opt_weak.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: [null, null]
10 y: null
11 - !Solution
12 x: [1, null]
13 y: 1
14 - !Solution
15 x: [2, null]
16 y: 1
17 - !Solution
18 x: [null, 1]
19 y: 2
20 - !Solution
21 x: [null, 2]
22 y: 2
23 - !Solution
24 x: [1, 2]
25 y: 2
26 - !Solution
27 x: [2, 1]
28 y: 1
29 ***/
30
31 include "globals.mzn";
32
33 array [1..2] of var opt 1..2: x;
34 var opt 1..2: y :: output = arg_max_weak(x);
35 constraint all_different(x);
36
37 solve satisfy;