-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Transfer cost limit #5516
Transfer cost limit #5516
Conversation
299318c
to
3a4f8d7
Compare
ba043a1
to
099d65e
Compare
Is this problem unique to transfers? Could this happens in street routing elsewhere? I'm just wondering should we slightly lower the cost of wheelchair traverse on these non-wheelchair friendly edges? |
d63c58c
to
ba0c3f9
Compare
025a299
to
2a6bc4d
Compare
It's technically possible for access/egress searches but very, very unlikely since there a proper A* calculates the cost and prunes away bad choices. In a transfer you don't have an A* and simply re-traverse the pre-computed list of edges with new street preferences. As @slvlirnoff has pointed out, the cost calculation for wheelchairs increases probably a little too explosively because we multiply the reluctances with each other instead of adding them. So we currently do
when we probably want something like this
Refactoring this quite complicated because the StreetEdge has a lot of spaghetti code. Maybe one day I will get around to doing that. |
src/main/java/org/opentripplanner/routing/algorithm/raptoradapter/transit/Transfer.java
Outdated
Show resolved
Hide resolved
On I would like to discuss this with @abyrd. I think using |
40c0dc1
to
9e258f5
Compare
eeabd18
to
c8bec80
Compare
c8bec80
to
176f192
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.
This looks good, only a few comments to the test. I am ready to approve this after the small fixes is applied.
src/test/java/org/opentripplanner/routing/algorithm/raptoradapter/transit/TransferTest.java
Outdated
Show resolved
Hide resolved
src/test/java/org/opentripplanner/routing/algorithm/raptoradapter/transit/TransferTest.java
Outdated
Show resolved
Hide resolved
src/test/java/org/opentripplanner/routing/algorithm/raptoradapter/transit/TransferTest.java
Outdated
Show resolved
Hide resolved
src/test/java/org/opentripplanner/routing/algorithm/raptoradapter/transit/TransferTest.java
Outdated
Show resolved
Hide resolved
…ter/transit/TransferTest.java Co-authored-by: Thomas Gran <[email protected]>
a48ff4d
to
428970b
Compare
Summary
As discussed in today's dev meeting and described in #5509 absurdly high transfer costs can lead to an integer overflow in RAPTOR.
This PR adds a safety limit when transfer costs are being calculated. This limit is still pretty high (several days of transit-equiavalence) but well below
Integer.MAX_VALUE
.Issue
Closes #5509
Unit tests
✔️
Documentation
Javadoc.
cc @miles-grant-ibigroup @binh-dam-ibigroup