-
Notifications
You must be signed in to change notification settings - Fork 2.1k
/
allperm.fzn
42 lines (42 loc) · 1.99 KB
/
allperm.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
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..3] of var 1..10: tmp____00001;
array [1..3] of var 1..10: tmp____00002;
array [1..3] of var 1..10: tmp____00003;
array [1..12] of var 1..10: x :: output_array([1..4, 1..3]);
constraint int_eq(x[1], 1);
constraint int_eq(x[1], tmp____00001[1]);
constraint int_eq(x[1], tmp____00002[1]);
constraint int_eq(x[1], tmp____00003[1]);
constraint int_eq(x[2], 2);
constraint int_eq(x[2], tmp____00001[2]);
constraint int_eq(x[2], tmp____00002[2]);
constraint int_eq(x[2], tmp____00003[2]);
constraint int_eq(x[3], 3);
constraint int_eq(x[3], tmp____00001[3]);
constraint int_eq(x[3], tmp____00002[3]);
constraint int_eq(x[3], tmp____00003[3]);
constraint int_eq(x[4], 3);
constraint int_eq(x[5], 1);
constraint int_eq(x[6], 2);
constraint int_eq(x[7], 2);
constraint int_eq(x[8], 3);
constraint int_eq(x[9], 1);
constraint int_eq(x[10], 2);
constraint int_eq(x[11], 1);
constraint int_eq(x[12], 3);
constraint int_le(x[1], x[2]);
constraint int_le(x[2], x[3]);
constraint sort([x[4], x[5], x[6]], tmp____00001);
constraint sort([x[7], x[8], x[9]], tmp____00002);
constraint sort([x[10], x[11], x[12]], tmp____00003);
solve satisfy;