this repo has no description
at develop 1.3 kB view raw
1predicate fzn_geost_smallest_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_bb(k, rect_size, rect_offset, shape, x, kind, l, u) 18 /\ % Posting the smallest bounding box constraints 19 forall(j in DIMS)( 20 % Lower boundary 21 exists(o in OBJECTS, s in dom(kind[o]))( 22 kind[o] = s 23 /\ exists(r in shape[s])( 24 x[o,j] + rect_offset[r,j] == l[j] 25 ) 26 ) 27 /\ % Upper boundary 28 exists(o in OBJECTS, s in dom(kind[o]))( 29 kind[o] = s 30 /\ exists(r in shape[s])( 31 x[o,j] + rect_offset[r,j] + rect_size[r,j] == u[j] 32 ) 33 ) 34 ) 35 );