this repo has no description
at develop 1.1 kB view raw
1include "radiation.mzn"; 2include "restart.mzn"; 3 4%-----------------------------------------------------------------------------% 5% Objective 6%-----------------------------------------------------------------------------% 7 8predicate complete();% = abort("'complete' should be used in reified context"); 9predicate complete_reif(var bool: marker); 10 11predicate lex_minimize(array[int] of var int: o) = 12 let { 13 var min(index_set(o))..max(index_set(o))+1: stage; 14 } in if status() = START then 15 stage = min(index_set(o)) 16 elseif status() = UNSAT then 17 stage = lastval(stage) + 1 18 else /* status() = SAT */ 19 stage = lastval(stage) 20 /\ o[stage] < sol(o[stage]) 21 endif 22 /\ forall(i in min(index_set(o))..stage-1) ( 23 o[i] = sol(o[i]) 24 ) 25 /\ if stage > max(index_set(o)) then 26 complete() 27 endif; 28 29% var STATUS: status ::add_to_output = status(); 30constraint lex_minimize([Beamtime, K]); 31 32solve :: int_search([Beamtime] ++ N ++ [Q[i,j,b] | i in Rows, j in Columns, b in BTimes ], input_order, indomain_split, complete) satisfy;