Skip to content
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

Support conditional via way turn restrictions #4342

Closed
willwhite opened this issue Jul 26, 2017 · 2 comments
Closed

Support conditional via way turn restrictions #4342

willwhite opened this issue Jul 26, 2017 · 2 comments

Comments

@willwhite
Copy link
Contributor

willwhite commented Jul 26, 2017

As a followup to #4255, we need to add support for via way turn restrictions that are conditional based on time.

This requires adding support for via-ways to the updator (here). The main here is that we have multiple turns that can be identified here.

A via way (as discussed here) requires the addition of an additional node.

a - b - c - d creates ab, bc, bc_2, and cd, if there is a restriction via bc`. We need to ensure that our mappings for these turns is consistent with the addition of nodes.

@MoKob
Copy link

MoKob commented Aug 4, 2017

With the newly added support for via-way restrictions, we should add support for conditional via-way restrictions as well. These are necessary to support restrictions like no u-turn during rush-hour.

Such restrictions are currently handled by applying an ultra-high penalty for specific turns. Right now we re-construct which edges to add a penalty to by using the first node along the geometry. This does not work with via-ways introduced into the mix, since multiple OSRM nodes now can have the same geometry.

We have essentially two choices how to handle the conditional via-ways. Either, we generate a via-way restriction that allows all turns at first and penalise the outgoing edge:

via-penalty

Let's say we have a conditional u-turn restriction from a to c. Since the restriction is not always active, we need to apply a penalty when it becomes active. However, based on the in/out geometry alone we cannot distinguish between v_b to c which is allowed and v_a to c which isn't.

The same thing holds true, if we keep the restriction shapes in addition to the original turn and penalise the turn onto the non-duplicated way when the via-way restriction becomes active:

in-mapping
(the second example omits unrelated turns)

In this scenario we cannot determine between the turn from a to v_a or to v_b.

To handle via-way conditionals, we need to provide a direct access to the correct penalty to update when the condition becomes active.

@MoKob
Copy link

MoKob commented Aug 14, 2017

Handled in #4384

@MoKob MoKob closed this as completed Aug 14, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants