tests/spec/unit/general/test_min_var_array.mzn
raw| 1 | /*** |
| 2 | !Test |
| 3 | expected: |
| 4 | - !Result |
| 5 | solution: !Solution |
| 6 | a: [1, 1, 1] |
| 7 | x: 1 |
| 8 | - !Result |
| 9 | solution: !Solution |
| 10 | a: [2, 2, 2] |
| 11 | x: 2 |
| 12 | - !Result |
| 13 | solution: !Solution |
| 14 | a: [3, 3, 3] |
| 15 | x: 3 |
| 16 | ***/ |
| 17 | |
| 18 | array [1..3] of var 1..3: a :: add_to_output; |
| 19 | var int: x :: add_to_output = min(a); |
| 20 | |
| 21 | solve maximize x; |