-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Via way traffic signals #4327
Via way traffic signals #4327
Conversation
5363a27
to
8f4e363
Compare
f6bc488
to
d95c880
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no way to keep consistent node weights and durations after traffic updates. Should we ignore it?
{ | ||
graph.GetEdgeData(forward_e1).weight += *node_weight_penalty; | ||
graph.GetEdgeData(reverse_e1).weight += *node_weight_penalty; | ||
graph.GetEdgeData(forward_e1).duration += *node_duration_penalty; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From here additional duration penalties will be included into speed annotations.
@@ -217,6 +240,14 @@ void GraphCompressor::Compress(const std::unordered_set<NodeID> &barrier_nodes, | |||
graph.GetEdgeData(forward_e1).duration += forward_duration2; | |||
graph.GetEdgeData(reverse_e1).duration += reverse_duration2; | |||
|
|||
if (node_weight_penalty && node_duration_penalty) | |||
{ | |||
graph.GetEdgeData(forward_e1).weight += *node_weight_penalty; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Additional weight penalties will be lost after update of any segment of the edge-based graph node, so it is possible to get inconsistent weights values.
a84d39d
to
a186a06
Compare
@MoKob i have added a test with traffic updates. Removal artificial traffic node works perfect with updates! One point is a correctness of CSV files: a line osrm-backend/src/updater/csv_source.cpp Lines 39 to 40 in a186a06
EDIT: Another point it is not clear should artificial segments be in unpacked_path at osrm-backend/include/engine/routing_algorithms/routing_base.hpp Lines 192 to 205 in a186a06
|
- handle penalties within edges (not phantom nodes) - changes model from providing penalties on turns to using additional segments
a186a06
to
ff292da
Compare
Issue
Second step towards #2681.
This PR removes the restriction that we cannot compress
traffic_signals
or anything similar that offers a node penalty.The basic idea behind node-penalties is that we add a
turn
. Soabc
with a traffic signal atb
becomesab
bc
with aturn
of typeNoTurn
in between and a turn penalty that matches the expected delay of the traffic signal.This way of modelling node-penalties complicates multiple features in OSRM:
and possibly even more.
This PR models node-penalties as segments within the graph.
abc
becomesabbc
with the node-penalty applied to the segmentbb
. This way we don't create artificial turns that influence a lot of the codebase.Tasklist
-[]strip lookahead code from turn lanes / sliproads / turn-angles...-> should move to a dedicated ticket and kept out of this PRRequirements / Relations
Requires #4255