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

Shortcuts consider routing restrictions on the main road too #228

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

michaelkirk
Copy link
Contributor

FIXES #194

Previously shortcuts only considered interior roads, starting from the border intersection, but we need to zoom out just a little bit more and consider how that traffic got to the intersection.

Now routing additionally includes the main roads. In order to count only distinct internal trips, we filter out any routes that use the perimeter for anything other than starting/ending the trip.

Screenshots

before: The annotated route is not actually accessible from the restrictions on the perimeter, so it shouldn't show any shortcuts. The "one way" and "modal" edits I've added are maybe not very realistic, but I feel like the turn restriction is a very plausible edit. In any case, they should all work!

image

after:
Screenshot 2025-03-12 at 15 21 22

@michaelkirk michaelkirk force-pushed the mkirk/spurious-shortcuts branch from a046a66 to ed18e76 Compare March 12, 2025 22:38
Previously shortcuts only considered interior roads, starting from the
border intersection, but we need to zoom out just a little bit more and
consider *how* that traffic got to the intersection.

Now routing additionally includes the `main` roads. In order to count
only distinct internal trips, we filter out any routes that use the
perimeter for anything other than starting/ending the trip.

== Perf

Oooph - much slower! It's still pretty fast overall, but I'm going to see if I
can do anything to speed this up.

shortcuts in bristol_east
                        time:   [1.6526 ms 1.6538 ms 1.6552 ms]
                        change: [+130.08% +131.12% +132.13%] (p = 0.00 < 0.05)
                        Performance has regressed.

shortcuts in bristol_west
                        time:   [6.0927 ms 6.0966 ms 6.1012 ms]
                        change: [+121.70% +122.09% +122.45%] (p = 0.00 < 0.05)
                        Performance has regressed.

shortcuts in strasbourg time:   [2.3067 ms 2.3114 ms 2.3193 ms]
                        change: [+88.807% +89.320% +89.947%] (p = 0.00 < 0.05)
                        Performance has regressed.
@michaelkirk michaelkirk force-pushed the mkirk/spurious-shortcuts branch from ed18e76 to 96a0929 Compare March 12, 2025 23:50
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

Successfully merging this pull request may close these issues.

Spurious shortcuts from blocked perimeter
1 participant