first cut at porting travel mode, some tests fail

This commit is contained in:
Emil Tin
2014-08-09 15:13:04 +02:00
parent d09394ed52
commit 6fd615b9cd
25 changed files with 169 additions and 47 deletions
+9 -6
View File
@@ -227,14 +227,16 @@ template <class DataFacadeT> class BasicRoutingInterface
BOOST_ASSERT_MSG(!ed.shortcut, "original edge flagged as shortcut");
unsigned name_index = facade->GetNameIndexFromEdgeID(ed.id);
const TurnInstruction turn_instruction = facade->GetTurnInstructionForEdgeID(ed.id);
const TravelMode travel_mode = facade->GetTravelModeForEdgeID(ed.id);
if (!facade->EdgeIsCompressed(ed.id))
{
BOOST_ASSERT(!facade->EdgeIsCompressed(ed.id));
unpacked_path.emplace_back(facade->GetGeometryIndexForEdgeID(ed.id),
name_index,
turn_instruction,
ed.distance);
ed.distance,
travel_mode);
}
else
{
@@ -255,7 +257,7 @@ template <class DataFacadeT> class BasicRoutingInterface
BOOST_ASSERT(start_index <= end_index);
for (std::size_t i = start_index; i < end_index; ++i)
{
unpacked_path.emplace_back(id_vector[i], name_index, TurnInstruction::NoTurn, 0);
unpacked_path.emplace_back(id_vector[i], name_index, TurnInstruction::NoTurn, 0, 0);
}
unpacked_path.back().turn_instruction = turn_instruction;
unpacked_path.back().segment_duration = ed.distance;
@@ -299,9 +301,10 @@ template <class DataFacadeT> class BasicRoutingInterface
{
BOOST_ASSERT(i < id_vector.size());
unpacked_path.emplace_back(PathData{id_vector[i],
phantom_node_pair.target_phantom.name_id,
TurnInstruction::NoTurn,
0});
phantom_node_pair.target_phantom.name_id,
TurnInstruction::NoTurn,
0,
0});
}
}