Skip to content

Commit

Permalink
Give a go at applying sparsification for Relocate.
Browse files Browse the repository at this point in the history
  • Loading branch information
jcoupey committed Oct 16, 2023
1 parent 6a60aea commit 18dbc7c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/algorithms/local_search/local_search.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1016,6 +1016,12 @@ void LocalSearch<Route,
_sol_state.insertion_ranks_begin[target][s_job_rank];
t_rank < _sol_state.insertion_ranks_end[target][s_job_rank];
++t_rank) {
if (t_rank > 0 && t_rank < _sol[target].size() &&
_input.vehicles[target].cost(_sol[source].route[s_rank],
_sol[target].route[t_rank]) >
_sparsification_threshold) {
continue;
}
#ifdef LOG_LS_OPERATORS
++tried_moves[OperatorName::Relocate];
#endif
Expand Down

0 comments on commit 18dbc7c

Please sign in to comment.