From ab2aa0c58462a851b816863521d3179c03afc6b1 Mon Sep 17 00:00:00 2001 From: Daniel Patterson Date: Thu, 28 May 2015 05:50:32 -0700 Subject: [PATCH] Revert "Address #1424 by adding explicit test to see if two vias (phantom nodes) are on the same way (NodeID)" This reverts commit 17dd39609f7325defbeecc2217804e0773cc0e76. --- CMakeLists.txt | 2 -- routing_algorithms/shortest_path.hpp | 19 ++++++++----------- 2 files changed, 8 insertions(+), 13 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 013dc55d487..503171a599e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -74,7 +74,6 @@ file(GLOB DatastructureGlob data_structures/search_engine_data.cpp data_structur list(REMOVE_ITEM DatastructureGlob data_structures/Coordinate.cpp) file(GLOB CoordinateGlob data_structures/coordinate*.cpp) file(GLOB AlgorithmGlob algorithms/*.cpp) -file(GLOB RoutingAlgorithmGlob routing_algorithms/*.hpp) file(GLOB HttpGlob server/http/*.cpp) file(GLOB LibOSRMGlob library/*.cpp) file(GLOB DataStructureTestsGlob unit_tests/data_structures/*.cpp data_structures/hilbert_value.cpp) @@ -86,7 +85,6 @@ set( ${DescriptorGlob} ${DatastructureGlob} ${AlgorithmGlob} - ${RoutingAlgorithmGlob} ${HttpGlob} ) diff --git a/routing_algorithms/shortest_path.hpp b/routing_algorithms/shortest_path.hpp index b0550ee2728..4b3cc49a4a9 100644 --- a/routing_algorithms/shortest_path.hpp +++ b/routing_algorithms/shortest_path.hpp @@ -92,9 +92,6 @@ class ShortestPathRouting final const bool allow_u_turn = current_leg > 0 && uturn_indicators.size() > current_leg && uturn_indicators[current_leg - 1]; - - const bool same_node = phantom_node_pair.source_phantom.forward_node_id == phantom_node_pair.target_phantom.forward_node_id; - EdgeWeight min_edge_offset = 0; // insert new starting nodes into forward heap, adjusted by previous distances. @@ -103,24 +100,24 @@ class ShortestPathRouting final { forward_heap1.Insert( phantom_node_pair.source_phantom.forward_node_id, - (allow_u_turn || same_node ? 0 : distance1) - + (allow_u_turn ? 0 : distance1) - phantom_node_pair.source_phantom.GetForwardWeightPlusOffset(), phantom_node_pair.source_phantom.forward_node_id); min_edge_offset = std::min(min_edge_offset, - (allow_u_turn || same_node ? 0 : distance1) - + (allow_u_turn ? 0 : distance1) - phantom_node_pair.source_phantom.GetForwardWeightPlusOffset()); // SimpleLogger().Write(logDEBUG) << "fwd-a2 insert: " << // phantom_node_pair.source_phantom.forward_node_id << ", w: " << (allow_u_turn ? 0 // : distance1) - phantom_node_pair.source_phantom.GetForwardWeightPlusOffset(); forward_heap2.Insert( phantom_node_pair.source_phantom.forward_node_id, - (allow_u_turn || same_node ? 0 : distance1) - + (allow_u_turn ? 0 : distance1) - phantom_node_pair.source_phantom.GetForwardWeightPlusOffset(), phantom_node_pair.source_phantom.forward_node_id); min_edge_offset = std::min(min_edge_offset, - (allow_u_turn || same_node ? 0 : distance1) - + (allow_u_turn ? 0 : distance1) - phantom_node_pair.source_phantom.GetForwardWeightPlusOffset()); // SimpleLogger().Write(logDEBUG) << "fwd-b2 insert: " << // phantom_node_pair.source_phantom.forward_node_id << ", w: " << (allow_u_turn ? 0 @@ -131,12 +128,12 @@ class ShortestPathRouting final { forward_heap1.Insert( phantom_node_pair.source_phantom.reverse_node_id, - (allow_u_turn || same_node ? 0 : distance2) - + (allow_u_turn ? 0 : distance2) - phantom_node_pair.source_phantom.GetReverseWeightPlusOffset(), phantom_node_pair.source_phantom.reverse_node_id); min_edge_offset = std::min(min_edge_offset, - (allow_u_turn || same_node ? 0 : distance2) - + (allow_u_turn ? 0 : distance2) - phantom_node_pair.source_phantom.GetReverseWeightPlusOffset()); // SimpleLogger().Write(logDEBUG) << "fwd-a2 insert: " << // phantom_node_pair.source_phantom.reverse_node_id << @@ -144,12 +141,12 @@ class ShortestPathRouting final // phantom_node_pair.source_phantom.GetReverseWeightPlusOffset(); forward_heap2.Insert( phantom_node_pair.source_phantom.reverse_node_id, - (allow_u_turn || same_node ? 0 : distance2) - + (allow_u_turn ? 0 : distance2) - phantom_node_pair.source_phantom.GetReverseWeightPlusOffset(), phantom_node_pair.source_phantom.reverse_node_id); min_edge_offset = std::min(min_edge_offset, - (allow_u_turn || same_node ? 0 : distance2) - + (allow_u_turn ? 0 : distance2) - phantom_node_pair.source_phantom.GetReverseWeightPlusOffset()); // SimpleLogger().Write(logDEBUG) << "fwd-b2 insert: " << // phantom_node_pair.source_phantom.reverse_node_id <<