-
Notifications
You must be signed in to change notification settings - Fork 2.1k
/
arch_friends.fzn
26 lines (26 loc) · 1.55 KB
/
arch_friends.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
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 2..2: Foot_Farm = 2;
var 1..4: Heels_in_a_Handcart;
var 1..4: The_Shoe_Palace;
var 1..4: Tootsies;
var 1..4: ecru_espadrilles;
var 1..4: fuchsia_flats = Heels_in_a_Handcart;
var 1..4: purple_pumps;
array [1..4] of var 1..4: shops :: output_array([1..4]) = [2, fuchsia_flats, The_Shoe_Palace, Tootsies];
var 3..4: suede_sandals;
array [1..4] of var 1..4: shoes :: output_array([1..4]) = [ecru_espadrilles, fuchsia_flats, purple_pumps, suede_sandals];
constraint fzn_all_different_int(shoes);
constraint fzn_all_different_int(shops);
constraint int_lin_eq([-1, 1], [suede_sandals, The_Shoe_Palace], -2);
constraint int_lin_ne([-1, 1], [Tootsies, purple_pumps], -1);
solve satisfy;