Iterated Local Search with Late Acceptance Hill-Climbing.
This is a direct port of PyVRP's IteratedLocalSearch. The algorithm:
- Starts with an initial solution
- Each iteration: applies local search to generate a candidate
- Accepts the candidate using Late Acceptance Hill-Climbing (LAHC)
- Restarts from best solution after N iterations without improvement
- Continues until stopping criterion is met
Late Acceptance Hill-Climbing (Burke & Bykov, 2017) accepts moves based on comparison with historical solutions, not just the current solution. This allows temporary worsening moves to escape local optima.
Summary
Functions
Runs the Iterated Local Search algorithm.
Types
@type stop_fn() :: (non_neg_integer() -> boolean())
Functions
@spec run( reference(), ExVrp.PenaltyManager.t(), reference(), reference(), stop_fn(), ExVrp.IteratedLocalSearch.Params.t(), keyword() ) :: ExVrp.IteratedLocalSearch.Result.t()
Runs the Iterated Local Search algorithm.
Parameters
problem_data- Reference to the problem datapenalty_manager- PenaltyManager for dynamic penalty adjustmentlocal_search- Persistent LocalSearch resource from Native.create_local_search/1initial_solution- Starting solution referencestop_fn- Function that takes best_cost and returns true to stopparams- ILS parameters (optional)
Returns
A Result struct containing the best solution found and statistics.