This repository has been archived on 2025-03-06. You can view files and clone it, but cannot push or open issues or pull requests.
dekker-phd-thesis/assets/listing/inc_lns_minisearch.mzn
2021-07-21 14:27:06 +10:00

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))
);