| 1 |
/*** |
| 2 |
!Test |
| 3 |
expected: |
| 4 |
- !Result |
| 5 |
solution: !Solution |
| 6 |
atlm_avi: [4, 5, 5, 6, 6, 6, 6, 6, 8, 8] |
| 7 |
exact_avi: [4, 5, 5, 6, 6, 6, 6, 6, 8, 8] |
| 8 |
***/ |
| 9 |
|
| 10 |
include "at_least.mzn"; |
| 11 |
include "at_most.mzn"; |
| 12 |
include "exactly.mzn"; |
| 13 |
|
| 14 |
%-----------------------------------------------------------------------------% |
| 15 |
% at_least, at_most, exactly |
| 16 |
%-----------------------------------------------------------------------------% |
| 17 |
array[1..10] of var -100..100: atlm_avi ::add_to_output= |
| 18 |
[4, 5, 5, 6, 6, 6, _, _, 8, 8]; |
| 19 |
array[1..10] of var -100..100: exact_avi ::add_to_output = |
| 20 |
[4, 5, 5, 6, 6, 6, _, _, 8, 8]; |
| 21 |
|
| 22 |
constraint at_least(5, atlm_avi, 6); |
| 23 |
constraint at_most (5, atlm_avi, 6); |
| 24 |
|
| 25 |
constraint exactly(5, exact_avi, 6); |
| 26 |
|
| 27 |
solve satisfy; |
| 28 |
|
| 29 |
output [ |
| 30 |
"atlm_avi = array1d(1..10, ", show(atlm_avi), ");\n", |
| 31 |
"exact_avi = array1d(1..10, ", show(exact_avi), ");\n" |
| 32 |
]; |