9 lines
402 B
MiniZinc
9 lines
402 B
MiniZinc
array[1..n] of var 1..n: x; % decision variables
|
|
var int: cost; % objective function
|
|
% ... some constraints defining the problem
|
|
% The user-defined LNS strategy
|
|
predicate my_lns() = basic_lns(uniformNeighbourhood(x,0.2));
|
|
% Solve using my\_lns, restart every 500 nodes, overall timeout 120 seconds
|
|
solve ::on_restart("my_lns") ::restart_constant(500) ::timeout(120)
|
|
minimize cost;
|