forked from google/or-tools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
assign_and_nvalues.fzn
19 lines (19 loc) · 1.19 KB
/
assign_and_nvalues.fzn
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
predicate fzn_all_different_int(array [int] of var int: x);
predicate count(array [int] of var int: x, var int: y, var int: c);
predicate fixed_fzn_cumulative(array [int] of var int: s, array [int] of int: d, array [int] of int: r, int: b);
predicate global_cardinality(array [int] of var int: x, array [int] of int: cover, array [int] of var int: counts);
predicate maximum_int(var int: m, array [int] of var int: x);
predicate minimum_int(var int: m, array [int] of var int: x);
predicate sliding_sum(int: low, int: up, int: seq, array [int] of var int: vs);
predicate sort(array [int] of var int: x, array [int] of var int: y);
predicate table_bool(array [int] of var bool: x, array [int, int] of bool: t);
predicate table_int(array [int] of var int: x, array [int, int] of int: t);
predicate var_fzn_cumulative(array [int] of var int: s, array [int] of int: d, array [int] of int: r, var int: b);
array [1..10] of int: items = [2, 3, 1, 5, 2, 3, 2, 3, 2, 4];
array [1..2] of var 0..5: bins____00001;
var 2..2: limitx :: output_var = 2;
constraint int_eq(1, bins____00001[1]);
constraint int_eq(2, bins____00001[2]);
constraint int_le(bins____00001[1], 2);
constraint int_le(bins____00001[2], 2);
solve satisfy;