Making the turn function more flexible (#4789)

* set and store highway and access classification for the turn function
* expose highway turn classification and access turn classification and speed to the lua profile turn function
* expose whether connection road at turn is incoming or outgoing
* add lua tests for exposed information to turn function
* update docs about attributes in process_turn
* add turn_classification info to docs
* adding warning if uturn and intersection dont match
* handle u turns that do not turn into intersection[0]
* split OSM link generation in an accessible coordinate function
This commit is contained in:
Huyen Chau Nguyen
2018-01-24 15:39:55 -05:00
committed by GitHub
parent 13bb997525
commit 61e06fcaba
17 changed files with 719 additions and 146 deletions
+25 -11
View File
@@ -220,17 +220,31 @@ void GraphCompressor::Compress(
continue;
// generate an artifical turn for the turn penalty generation
ExtractionTurn extraction_turn(
0,
2,
false,
true,
fwd_edge_data1.flags.restricted,
fwd_edge_data2.flags.restricted,
node_data_container[fwd_edge_data1.annotation_data].is_left_hand_driving,
TRAVEL_MODE_DRIVING,
TRAVEL_MODE_DRIVING);
std::vector<ExtractionTurnLeg> roads_on_the_right;
std::vector<ExtractionTurnLeg> roads_on_the_left;
ExtractionTurn extraction_turn(0,
2,
false,
true,
false,
false,
TRAVEL_MODE_DRIVING,
false,
false,
1,
0,
0,
0,
false,
TRAVEL_MODE_DRIVING,
false,
false,
1,
0,
0,
0,
roads_on_the_right,
roads_on_the_left);
scripting_environment.ProcessTurn(extraction_turn);
node_duration_penalty = extraction_turn.duration * 10;
node_weight_penalty = extraction_turn.weight * weight_multiplier;