Fix uturn detection in match plugin

This commit is contained in:
Patrick Niklaus 2016-04-05 13:59:51 +02:00
parent 4f1ca20dda
commit 849baea544

View File

@ -183,7 +183,9 @@ Status MatchPlugin::HandleRequest(const api::MatchParameters &parameters,
BOOST_ASSERT(current_phantom_node_pair.target_phantom.IsValid()); BOOST_ASSERT(current_phantom_node_pair.target_phantom.IsValid());
sub_routes[index].segment_end_coordinates.emplace_back(current_phantom_node_pair); sub_routes[index].segment_end_coordinates.emplace_back(current_phantom_node_pair);
} }
shortest_path(sub_routes[index].segment_end_coordinates, {}, sub_routes[index]); // force uturns to be on, since we split the phantom nodes anyway and only have bi-directional
// phantom nodes for possible uturns
shortest_path(sub_routes[index].segment_end_coordinates, {true}, sub_routes[index]);
BOOST_ASSERT(sub_routes[index].shortest_path_length != INVALID_EDGE_WEIGHT); BOOST_ASSERT(sub_routes[index].shortest_path_length != INVALID_EDGE_WEIGHT);
} }