From 9b42dbf334b6e59dcc3207feceaab77a02155cd2 Mon Sep 17 00:00:00 2001 From: Romain BERNARD <romain.bernard@uca.fr> Date: Fri, 21 Jun 2024 16:24:38 +0200 Subject: [PATCH] iterate on vehicles properly --- src/algorithm/DARP/Heuristics/BestInsertionHeuristic.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/algorithm/DARP/Heuristics/BestInsertionHeuristic.cpp b/src/algorithm/DARP/Heuristics/BestInsertionHeuristic.cpp index 094abcb..1656b2a 100644 --- a/src/algorithm/DARP/Heuristics/BestInsertionHeuristic.cpp +++ b/src/algorithm/DARP/Heuristics/BestInsertionHeuristic.cpp @@ -38,6 +38,7 @@ size_t BestInsertionHeuristic::doBestRequestInsertionForRoute(size_t requestId, //Iteratively try inserting in every active vehicle and the first inactive vehicle while(vehicleId <= route.getLastActiveVehicleId() + 1 && !insertionSuccess) { insertionSuccess = tryVehicleBestInsertion(requestId, vehicleId, route); + ++vehicleId; } //Update last active vehicle ID -- GitLab