| 1 |
/*** |
| 2 |
!Test |
| 3 |
solvers: [gecode, chuffed] |
| 4 |
expected: !Result |
| 5 |
solution: !SolutionSet |
| 6 |
- !Solution |
| 7 |
bins: [4, 2, 3, 1] |
| 8 |
- !Solution |
| 9 |
bins: [4, 2, 1, 3] |
| 10 |
options: |
| 11 |
all_solutions: true |
| 12 |
***/ |
| 13 |
|
| 14 |
include "bin_packing_capa.mzn"; |
| 15 |
|
| 16 |
% The example from the GCC. |
| 17 |
% |
| 18 |
constraint bin_packing_capa([4, 3, 5, 3, 3], [3, 1, 3], [4, 3, 1]); |
| 19 |
|
| 20 |
array[1..4] of var 1..4: bins; |
| 21 |
|
| 22 |
constraint bin_packing_capa([1, 2, 1, 3], bins, [3, 2, 1, 1]); |
| 23 |
|
| 24 |
solve satisfy; |
| 25 |
|
| 26 |
output ["bins = array1d(1..4, ", show(bins), ");\n"]; |