tests/spec/unit/general/md_product_int.mzn
raw| 1 | /*** |
| 2 | --- !Test |
| 3 | solvers: [gecode, chuffed] |
| 4 | options: |
| 5 | all_solutions: true |
| 6 | expected: !Result |
| 7 | solution: !SolutionSet |
| 8 | - !Solution |
| 9 | a: 16 |
| 10 | b: 1 |
| 11 | - !Solution |
| 12 | a: 16 |
| 13 | b: 2 |
| 14 | - !Solution |
| 15 | a: 16 |
| 16 | b: 4 |
| 17 | - !Solution |
| 18 | a: 16 |
| 19 | b: 8 |
| 20 | - !Solution |
| 21 | a: 16 |
| 22 | b: 16 |
| 23 | ***/ |
| 24 | |
| 25 | int: a :: add_to_output = product([|2, 2 | 2, 2|]); |
| 26 | |
| 27 | array[1..2, 1..2] of var 1..2: vs; |
| 28 | var int: b :: add_to_output = product(vs); |
| 29 | |
| 30 | solve satisfy; |