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_pred.mzn
2021-07-21 14:27:06 +10:00

7 lines
190 B
MiniZinc

predicate uniform_neighbourhood(array[int] of var int: x, float: destr_rate) =
forall(i in index_set(x)) (
if uniform(0.0, 1.0) > destr_rate then
x[i] = sol(x[i])
endif
);