From 4801ec2543c9bbb3b8dba19e5209d3baa3a24081 Mon Sep 17 00:00:00 2001 From: jcoupey Date: Wed, 9 Oct 2024 11:25:33 +0200 Subject: [PATCH] Small refactor to simplify LS logic. --- src/algorithms/local_search/local_search.cpp | 41 +++++++++++--------- src/algorithms/local_search/local_search.h | 1 + 2 files changed, 23 insertions(+), 19 deletions(-) diff --git a/src/algorithms/local_search/local_search.cpp b/src/algorithms/local_search/local_search.cpp index 2f5db7f4f..768cb521a 100644 --- a/src/algorithms/local_search/local_search.cpp +++ b/src/algorithms/local_search/local_search.cpp @@ -1922,9 +1922,6 @@ void LocalSearch::run() { bool try_ls_step = true; - bool first_step = true; - - unsigned current_nb_removal = 1; #ifdef LOG_LS steps.push_back({utils::now(), @@ -1953,34 +1950,42 @@ void LocalSearch _completed_depth; std::vector _all_routes; utils::SolutionState _sol_state;