this repo has no description
1include "fzn_geost.mzn";
2include "fzn_geost_reif.mzn";
3
4
5predicate fzn_geost_bb_reif(
6 int : k ,
7 array[int,int] of int : rect_size ,
8 array[int,int] of int : rect_offset ,
9 array[int ] of set of int : shape ,
10 array[int,int] of var int : x ,
11 array[int ] of var int : kind ,
12 array[int ] of var int : l ,
13 array[int ] of var int : u ,
14 var bool: b
15) =
16 % Two useful definitions
17 let {
18 set of int: DIMS = 1..k;
19 set of int: OBJECTS = index_set(kind);
20 } in b <-> (
21 % Posting the geost constraint
22 fzn_geost(k, rect_size, rect_offset, shape, x, kind)
23 /\ % Posting the bounding box constraints
24 forall(o in OBJECTS)(
25 forall(s in dom(kind[o]))(
26 (kind[o] = s ->
27 forall(r in shape[s], j in DIMS)(
28 x[o,j] + rect_offset[r,j] >= l[j]
29 /\ x[o,j] + rect_offset[r,j] + rect_size[r,j] <= u[j]
30 )
31 )
32 )
33 ));