From 73f13600aeb05af50ec6d29c66d3b33066c73042 Mon Sep 17 00:00:00 2001
From: Romain BERNARD <romain.bernard@uca.fr>
Date: Tue, 18 Jun 2024 18:54:51 +0200
Subject: [PATCH] fix constraint propagation, missing min/max propagation on
 the Origin and Destination themselves

---
 CMakeLists.txt                   | 2 ++
 src/routes/vehicle/SAEVRoute.cpp | 4 ++++
 2 files changed, 6 insertions(+)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5c5a090..60080e1 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -62,6 +62,8 @@ add_executable(GreedyAlgorithm
         "src/utils/Instance Generation/Requests/RequestsGenerator.h"
         "src/utils/Instance Generation/Requests/RequestGenerationParameters.h"
         "src/utils/Instance Generation/Graph/OSRMGraphGenerator.h"
+        src/routes/vehicle/BestRequestInsertion.h
+        src/routes/vehicle/BestInsertionQueue.h
 )
 
 add_executable(RequestGenerator
diff --git a/src/routes/vehicle/SAEVRoute.cpp b/src/routes/vehicle/SAEVRoute.cpp
index 49c75bf..2554dcc 100644
--- a/src/routes/vehicle/SAEVRoute.cpp
+++ b/src/routes/vehicle/SAEVRoute.cpp
@@ -183,6 +183,10 @@ SAEVRouteChangelist SAEVRoute::insertRequestWithPropagation(const size_t request
     std::queue<std::pair<Bound, SAEVKeyPoint *>> boundPropagationQueue{};
     SAEVKeyPoint * originKP = &getOrigin(requestId);
     SAEVKeyPoint * destinationKP = &getDestination(requestId);
+    boundPropagationQueue.emplace(Min, originKP->getPredecessor());
+    boundPropagationQueue.emplace(Max, originKP->getSuccessor());
+    boundPropagationQueue.emplace(Min, destinationKP->getPredecessor());
+    boundPropagationQueue.emplace(Max, destinationKP->getSuccessor());
     boundPropagationQueue.emplace(Min, originKP);
     boundPropagationQueue.emplace(Max, originKP);
     boundPropagationQueue.emplace(Min, destinationKP);
-- 
GitLab