-
Notifications
You must be signed in to change notification settings - Fork 464
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
Update speedy routers and tree for turn restrictions #3670
Conversation
in the ALT version we might need to dig a bit deeper because it can happen that a landmark:
|
Trying to explain with a simple (and surprisingly common in real-world network) example. Given this (sub)graph of 6 nodes A-F. If we have two opposing U-turn restrictions at node C (meaning C-A is disallowed coming from A-C and C-E is disallowed coming from E-C) we replace the two start links (shown dashed like in https://github.com/matsim-org/matsim-code-examples/wiki/turn-restrictions) with colored links and colored node copies C' and C''. Node C is still a 'valid' real starting node for the one-way link C-D. ![]() In the expanded colored network there is now no way to route to the "real" node, you can only get to C' or C''. As such, in the LeastCostPathTree there will be no data for node C, just for its colored copies. However, reaching C' or C'' should be just as valid as reaching C. Thus, the lowest cost for either reaching C' or C'' should be taken into account when querying the travel time/cost to C. Similarly, the point to point routing algorithms already caught the case where we reach a colored copy of the end node:
However, if we never reached the "real" node before, the construct path will fail as it turns into an infinite loop due to the lack of data being present in the respective arrays (comingFrom and usedLink):
A possible solution is to just point to the data which led to the discovery of the colored copy. |
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.
Thanks for those improvements and the explanations today. This looks good to me!
Updates the speedy code for turn restrictions