Skip to content
Snippets Groups Projects
Commit f68cb03c authored by Romain BERNARD's avatar Romain BERNARD
Browse files

use a reference for the routes to be properly updated in the method

parent 7997a696
No related branches found
No related tags found
1 merge request!2Route manipulation API with automatic constraint propagation
......@@ -33,7 +33,7 @@ bool BestInsertionHeuristic::tryVehicleBestInsertion(size_t requestId, size_t ve
return bestInsertionFound;
}
size_t BestInsertionHeuristic::doBestRequestInsertionForRoute(size_t requestId, SAEVRoute route) {
size_t BestInsertionHeuristic::doBestRequestInsertionForRoute(size_t requestId, SAEVRoute& route) {
size_t vehicleId = 0;
bool insertionSuccess{false};
//Iteratively try inserting in every active vehicle and the first inactive vehicle
......
......@@ -17,7 +17,7 @@ public:
* @param route the route structure in which the request will be inserted
* @return ID of the vehicle in which the request has been
*/
static size_t doBestRequestInsertionForRoute(size_t requestId, SAEVRoute route);
static size_t doBestRequestInsertionForRoute(size_t requestId, SAEVRoute& route);
/**
* Iteratively tests best insertions wrt scoring function (detour) in the given vehicle and route
* @param requestId ID of the request to insert in the vehicle
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment