| 1 |
/*** |
| 2 |
!Test |
| 3 |
expected: |
| 4 |
- !Result |
| 5 |
solution: !Solution |
| 6 |
inc_avb: [false, true, true, true, true] |
| 7 |
inc_avi: [1, 1, 3, 3, 5] |
| 8 |
- !Result |
| 9 |
solution: !Solution |
| 10 |
inc_avb: [false, true, true, true, true] |
| 11 |
inc_avi: [1, 1, 3, 5, 5] |
| 12 |
- !Result |
| 13 |
solution: !Solution |
| 14 |
inc_avb: [false, true, true, true, true] |
| 15 |
inc_avi: [1, 3, 3, 3, 5] |
| 16 |
- !Result |
| 17 |
solution: !Solution |
| 18 |
inc_avb: [false, true, true, true, true] |
| 19 |
inc_avi: [1, 3, 3, 5, 5] |
| 20 |
***/ |
| 21 |
|
| 22 |
include "increasing.mzn"; |
| 23 |
|
| 24 |
%-----------------------------------------------------------------------------% |
| 25 |
% increasing |
| 26 |
%-----------------------------------------------------------------------------% |
| 27 |
array[1..5] of var -100..100: inc_avi ::add_to_output = [1, _, 3, _, 5]; |
| 28 |
array[1..5] of var bool: inc_avb ::add_to_output = [false, true, _, _, _]; |
| 29 |
%array[1..8] of var set of 1..3: inc_avsi; % XXX :: is_output |
| 30 |
|
| 31 |
constraint increasing(inc_avi); |
| 32 |
constraint increasing(inc_avb); |
| 33 |
% XXX: comparisons not implemented for sets |
| 34 |
%constraint increasing(inc_avsi); |
| 35 |
|
| 36 |
solve satisfy; |
| 37 |
|
| 38 |
output [ |
| 39 |
"inc_avb = array1d(1..5, ", show(inc_avb), ");\n", |
| 40 |
"inc_avi = array1d(1..5, ", show(inc_avi), ");\n" |
| 41 |
]; |