forked from google/or-tools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
alpha.fzn
53 lines (53 loc) · 2.38 KB
/
alpha.fzn
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
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 global_cardinality(array [int] of var int: x, array [int] of int: cover, array [int] of var int: counts);
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);
var 1..26: a :: output_var;
var 1..26: b :: output_var;
var 1..26: c :: output_var;
var 1..26: d :: output_var;
var 1..26: e :: output_var;
var 1..26: f :: output_var;
var 1..26: g :: output_var;
var 1..26: h :: output_var;
var 1..26: i :: output_var;
var 1..26: j :: output_var;
var 1..26: k :: output_var;
var 1..26: l :: output_var;
var 1..26: m :: output_var;
var 1..26: n :: output_var;
var 1..26: o :: output_var;
var 1..26: p :: output_var;
var 1..26: q :: output_var;
var 1..26: r :: output_var;
var 1..26: s :: output_var;
var 1..26: t :: output_var;
var 1..26: u :: output_var;
var 1..26: v :: output_var;
var 1..26: w :: output_var;
var 1..26: x :: output_var;
var 1..26: y :: output_var;
var 1..26: z :: output_var;
constraint fzn_all_different_int([a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z]);
constraint int_lin_eq([1, 1, 2], [a, j, z], 58);
constraint int_lin_eq([1, 1, 2], [b, e, o], 53);
constraint int_lin_eq([1, 2, 1], [l, o, s], 37);
constraint int_lin_eq([2, 1, 1], [e, g, l], 66);
constraint int_lin_eq([1, 1, 1, 1], [e, l, r, y], 47);
constraint int_lin_eq([1, 1, 1, 1], [g, n, o, s], 61);
constraint int_lin_eq([1, 1, 1, 2], [e, f, g, u], 50);
constraint int_lin_eq([1, 1, 2, 1], [c, e, l, o], 43);
constraint int_lin_eq([2, 1, 1, 1], [e, h, m, t], 72);
constraint int_lin_eq([1, 1, 1, 1, 1], [a, c, e, l, s], 51);
constraint int_lin_eq([1, 1, 1, 1, 1], [a, e, o, p, r], 65);
constraint int_lin_eq([1, 1, 1, 1, 1], [a, k, l, o, p], 59);
constraint int_lin_eq([1, 1, 1, 1, 1], [a, l, t, w, z], 34);
constraint int_lin_eq([1, 1, 1, 1, 1], [e, f, l, t, u], 30);
constraint int_lin_eq([1, 1, 1, 2, 1], [a, b, e, l, t], 45);
constraint int_lin_eq([2, 1, 1, 1, 1], [i, l, n, o, v], 100);
constraint int_lin_eq([1, 1, 1, 1, 2, 1], [a, e, q, r, t, u], 50);
constraint int_lin_eq([1, 1, 2, 1, 1, 1], [a, n, o, p, r, s], 82);
constraint int_lin_eq([2, 1, 1, 1, 1, 1], [c, e, n, o, r, t], 74);
constraint int_lin_eq([1, 1, 1, 1, 2, 1, 1, 1], [a, e, h, n, o, p, s, x], 134);
solve satisfy;