forked from google/or-tools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
atom_smasher.fzn
23 lines (23 loc) · 1.41 KB
/
atom_smasher.fzn
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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);
var 0..9: A :: output_var;
var 0..9999: INT____00001 :: is_defined_var :: var_is_introduced;
var 0..9999: ATOM :: output_var = INT____00001;
var 0..9: M :: output_var;
var 0..9: O :: output_var;
var 0..9: T :: output_var;
var 0..117: z____00002;
constraint fzn_all_different_int([A, T, O, M]);
constraint int_lin_eq([-1, 1, 1, 1, 10], [z____00002, A, M, O, T], 0);
constraint int_lin_eq([-1, 1000, 1, 10, 100], [INT____00001, A, M, O, T], 0) :: defines_var(INT____00001);
constraint int_times(z____00002, z____00002, INT____00001);
solve satisfy;