9 lines
382 B
MiniZinc
9 lines
382 B
MiniZinc
function ann: lns(var int: obj, array[int] of var int: vars,
|
|
int: iterations, float: destr_rate, int: explore_time) =
|
|
repeat (i in 1..iterations) ( scope(
|
|
if has_sol() then post(uniform_neighbourhood(vars, destr_rate))
|
|
else true endif /\
|
|
time_limit(explore_time, minimize_bab(obj)) /\
|
|
commit() /\ print()
|
|
) /\ post(obj < sol(obj)) );
|