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