14 lines
396 B
MiniZinc
14 lines
396 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))
|
|
endif
|
|
/\ time_limit(explore_time, minimize_bab(obj))
|
|
/\ commit()
|
|
/\ print()
|
|
)
|
|
/\ post(obj < sol(obj))
|
|
);
|