Add road priority class to turn function (#4858)
* expose road priority class to turn function * update docs
This commit is contained in:
committed by
GitHub
parent
92b7d581ce
commit
fa8d788bb6
@@ -585,6 +585,7 @@ void EdgeBasedGraphFactory::GenerateEdgeExpandedEdges(
|
||||
((double)intersection::findEdgeLength(edge_geometries, node_based_edge_from) /
|
||||
edge_data1.duration) *
|
||||
36,
|
||||
edge_data1.flags.road_classification.GetPriority(),
|
||||
// target info
|
||||
edge_data2.flags.restricted,
|
||||
m_edge_based_node_container.GetAnnotation(edge_data2.annotation_data).travel_mode,
|
||||
@@ -596,6 +597,7 @@ void EdgeBasedGraphFactory::GenerateEdgeExpandedEdges(
|
||||
((double)intersection::findEdgeLength(edge_geometries, node_based_edge_to) /
|
||||
edge_data2.duration) *
|
||||
36,
|
||||
edge_data2.flags.road_classification.GetPriority(),
|
||||
// connected roads
|
||||
road_legs_on_the_right,
|
||||
road_legs_on_the_left);
|
||||
@@ -763,6 +765,7 @@ void EdgeBasedGraphFactory::GenerateEdgeExpandedEdges(
|
||||
connected_edge.eid) /
|
||||
edge_data.duration) *
|
||||
36,
|
||||
edge_data.flags.road_classification.GetPriority(),
|
||||
!connected_edge.entry_allowed ||
|
||||
(edge_data.flags.forward &&
|
||||
edge_data.flags.backward), // is incoming
|
||||
|
||||
@@ -235,6 +235,7 @@ void GraphCompressor::Compress(
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
false,
|
||||
TRAVEL_MODE_DRIVING,
|
||||
false,
|
||||
@@ -243,6 +244,7 @@ void GraphCompressor::Compress(
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
roads_on_the_right,
|
||||
roads_on_the_left);
|
||||
scripting_environment.ProcessTurn(extraction_turn);
|
||||
|
||||
@@ -692,6 +692,8 @@ void Sol2ScriptingEnvironment::InitContext(LuaScriptingContext &context)
|
||||
&ExtractionTurnLeg::access_turn_classification,
|
||||
"speed",
|
||||
&ExtractionTurnLeg::speed,
|
||||
"priority_class",
|
||||
&ExtractionTurnLeg::priority_class,
|
||||
"is_incoming",
|
||||
&ExtractionTurnLeg::is_incoming,
|
||||
"is_outgoing",
|
||||
@@ -726,6 +728,8 @@ void Sol2ScriptingEnvironment::InitContext(LuaScriptingContext &context)
|
||||
&ExtractionTurn::source_access_turn_classification,
|
||||
"source_speed",
|
||||
&ExtractionTurn::source_speed,
|
||||
"source_priority_class",
|
||||
&ExtractionTurn::source_priority_class,
|
||||
|
||||
"target_restricted",
|
||||
&ExtractionTurn::target_restricted,
|
||||
@@ -743,6 +747,8 @@ void Sol2ScriptingEnvironment::InitContext(LuaScriptingContext &context)
|
||||
&ExtractionTurn::target_access_turn_classification,
|
||||
"target_speed",
|
||||
&ExtractionTurn::target_speed,
|
||||
"target_priority_class",
|
||||
&ExtractionTurn::target_priority_class,
|
||||
|
||||
"roads_on_the_right",
|
||||
&ExtractionTurn::roads_on_the_right,
|
||||
|
||||
Reference in New Issue
Block a user