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