this repo has no description
1/*** 2!Test 3expected: 4- !Result 5 solution: !Solution 6 x: 7 - 3 8 - 2 9 - 1 10- !Result 11 solution: !Solution 12 x: 13 - 2 14 - 4 15 - 1 16- !Result 17 solution: !Solution 18 x: 19 - 1 20 - 2 21 - 4 22- !Result 23 solution: !Solution 24 x: 25 - 1 26 - 3 27 - 2 28- !Result 29 solution: !Solution 30 x: 31 - 2 32 - 3 33 - 4 34- !Result 35 solution: !Solution 36 x: 37 - 4 38 - 1 39 - 3 40- !Result 41 solution: !Solution 42 x: 43 - 4 44 - 3 45 - 2 46- !Result 47 solution: !Solution 48 x: 49 - 3 50 - 4 51 - 1 52- !Result 53 solution: !Solution 54 x: 55 - 1 56 - 2 57 - 3 58***/ 59 60% Regression test for bug #70: set2array coercions were not supported. 61 62include "global_cardinality_low_up.mzn"; 63 64predicate my_global_cardinality_low_up(array[int] of var int: x, 65 array[int] of int: cover, 66 array[int] of int: lbound, 67 array[int] of int: ubound) = 68 forall(i in index_set(cover)) ( 69 sum(j in index_set(x)) ( bool2int(x[j] = cover[i]) ) 70 in lbound[i]..ubound[i] 71 ); 72 73 74predicate myall_different(array[int] of var int: x) = 75 global_cardinality_low_up( 76 x, set2array(dom_array(x)), [0 | i in dom_array(x)], [1 | i in dom_array(x)]); 77 78array[1..3] of var 1..4: x; 79 80constraint myall_different(x); 81 82solve :: int_search(x, input_order, indomain_min, complete) satisfy; 83 84output ["x = ", show(x), ";\n"];