From 1990de7dcc6126abe8875e4ebf1d4b2d4c8afdec Mon Sep 17 00:00:00 2001 From: Patrick Niklaus Date: Thu, 19 Apr 2018 18:57:24 +0000 Subject: [PATCH] Fix inserting edges of shortest path for sharing check This caused very sub-optimal routes to be selected. --- src/engine/routing_algorithms/alternative_path_mld.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/engine/routing_algorithms/alternative_path_mld.cpp b/src/engine/routing_algorithms/alternative_path_mld.cpp index f97ea96e2..355d468ad 100644 --- a/src/engine/routing_algorithms/alternative_path_mld.cpp +++ b/src/engine/routing_algorithms/alternative_path_mld.cpp @@ -402,7 +402,7 @@ template RandIt filterUnpackedPathsBySharing(RandIt first, Ran std::unordered_set edges; edges.reserve(size * shortest_path.edges.size() * (1. + kAtMostLongerBy)); - edges.insert(begin(shortest_path.edges), begin(shortest_path.edges)); + edges.insert(begin(shortest_path.edges), end(shortest_path.edges)); const auto over_sharing_limit = [&](const auto &unpacked) {