| 1 |
/*** |
| 2 |
!Test |
| 3 |
expected: |
| 4 |
- !Result |
| 5 |
solution: !Solution |
| 6 |
***/ |
| 7 |
|
| 8 |
% Regression test for bug #70: set2array coercions were not supported. |
| 9 |
|
| 10 |
include "global_cardinality_low_up.mzn"; |
| 11 |
|
| 12 |
predicate myall_different(array[int] of var int: x) = |
| 13 |
global_cardinality_low_up( |
| 14 |
x, set2array(dom_array(x)), [0 | i in dom_array(x)], [1 | i in dom_array(x)]); |
| 15 |
|
| 16 |
array[1..3] of var 1..4: x; |
| 17 |
|
| 18 |
constraint myall_different(x); |
| 19 |
|
| 20 |
solve :: int_search(x, input_order, indomain_min, complete) satisfy; |
| 21 |
|
| 22 |
output ["x = ", show(x), ";\n"]; |