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

Turn restrictions create islands #806

Open
mattwigway opened this issue Apr 24, 2022 · 2 comments
Open

Turn restrictions create islands #806

mattwigway opened this issue Apr 24, 2022 · 2 comments

Comments

@mattwigway
Copy link
Contributor

mattwigway commented Apr 24, 2022

The TarjanIslandPruner has a comment that says:

 * One concern with this island remover is that it does not consider turn restrictions, so it theoretically would leave
 * a situation like this in the graph:
 *
 *  B - C
 *  |
 *  A
 *
 * Suppose all edges can be traversed by cars in both directions, but there is a no-right-turn restriction from AB to BC.
 * C is not part of a larger strong component because it cannot be reached due to the turn restriction. However, this
 * case is believed to be sufficiently rare not to worry about.

In developing turn restriction code for another piece of routing software (my favorite Sunday morning activity 😉), I discovered there actually is an island created by turn restrictions just north of the Conveyal DC office where I probably wrote this comment. This way is a parking lot for the DC police district 4, and has both no-right-turn and no-left-turn restrictions from Georgia Ave. If a destination is snapped here, I think routing will fail. Still not sure it's worth addressing.

@abyrd
Copy link
Member

abyrd commented Dec 19, 2022

Thanks for the report @mattwigway, I've added it to the list in meta-ticket #764. Although we may not be working on this in the immediate future, I do still hope to do a round of turn restriction improvements.

@mattwigway
Copy link
Contributor Author

If/when you do, you may find the test suite in mattwigway/OpenStreetMapGraphBuilder.jl useful. I wanted to make sure that the turn restriction code was right even in weird (ahem) corner cases like this, so ended up creating a custom OSM file with a small self contained network with a bunch of unusual restrictions/situations, and test cases to go along with it. Feel free to borrow if it's helpful.

abyrd added a commit that referenced this issue Dec 20, 2022
Also includes:
- A more complete definition of isBarrierNode()
- Identifying barrier nodes away from intersections
- New edge-based island removal that reuses our standard search
  algorithm, handing turn restrictions or other restrictions
  (addressing #806). This could use more work and testing.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants