this repo has no description
1include "fzn_geost_nonoverlap_k.mzn";
2
3predicate fzn_geost(
4 int : k ,
5 array[int,int] of int : rect_size ,
6 array[int,int] of int : rect_offset ,
7 array[int ] of set of int : shape ,
8 array[int,int] of var int : x ,
9 array[int ] of var int : kind
10) =
11 % A few useful definitions
12 let {
13 set of int: DIMS = 1..k;
14 set of int: SHAPES = 1..length(shape);
15 set of int: OBJECTS = index_set(kind);
16 } in
17 forall(o1, o2 in OBJECTS where o1 < o2)(
18 forall(s1 in dom(kind[o1]), s2 in dom(kind[o2]))(
19 (kind[o1] = s1 /\ kind[o2] = s2 ->
20 forall(r1 in shape[s1], r2 in shape[s2])(
21 fzn_geost_nonoverlap_k(
22 [ x[o1,j] + rect_offset[r1,j] | j in DIMS ],
23 [ rect_size[r1,j] | j in DIMS ],
24 [ x[o2,j] + rect_offset[r2,j] | j in DIMS ],
25 [ rect_size[r2,j] | j in DIMS ]
26 )
27 )
28 )
29 )
30 );
31