Skip to content

Commit

Permalink
Revert "Address Project-OSRM#1424 by adding explicit test to see if t…
Browse files Browse the repository at this point in the history
…wo vias (phantom nodes) are on the same way (NodeID)"

This reverts commit 17dd396.
  • Loading branch information
danpat committed May 28, 2015
1 parent 45b6ada commit ab2aa0c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 13 deletions.
2 changes: 0 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -86,7 +85,6 @@ set(
${DescriptorGlob}
${DatastructureGlob}
${AlgorithmGlob}
${RoutingAlgorithmGlob}
${HttpGlob}
)

Expand Down
19 changes: 8 additions & 11 deletions routing_algorithms/shortest_path.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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
Expand All @@ -131,25 +128,25 @@ 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 <<
// ", w: " << (allow_u_turn ? 0 : distance2) -
// 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 <<
Expand Down

0 comments on commit ab2aa0c

Please sign in to comment.