Fix high walk reluctance leading to zero egress results for rental searches#5605
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev-2.x #5605 +/- ##
=============================================
+ Coverage 67.45% 67.46% +0.01%
- Complexity 16188 16196 +8
=============================================
Files 1862 1862
Lines 71184 71213 +29
Branches 7401 7406 +5
=============================================
+ Hits 48019 48046 +27
+ Misses 20674 20673 -1
- Partials 2491 2494 +3 ☔ View full report in Codecov by Sentry. |
binh-dam-ibigroup
left a comment
There was a problem hiding this comment.
I tested doing the original search that led to the issue and it seems to be fixed! Code changes are very clean.
| } | ||
|
|
||
| /** | ||
| * Creates a state starts the scooter rental but in arriveBy mode, so therefore starting with |
There was a problem hiding this comment.
The first part of this comment does not make sense.
|
Nice that the fix is so simple! I verified that isFinal() call does not cause any significant routing time penalties. |
|
I also ran the speed test on the branch and could not see a slowdown. |
8a67be4
|
Since the only review comment was about Javadoc not making sense, I fixed it and have taken the liberty to merge without another round of review. |
Summary
@binh-dam-ibigroup has reported that there are some cases where rental searches with a very high walk reluctance lead to zero egress legs.
After some investigation I found out that it's unfortunate chain circumstances that conspire to produce this problem.
Luckily, there is a simple fix for the problem: when counting stops, also check
State#isFinalto make sure that only allowable states count towards the number of stops.This PR also contains small cleanups of the A* code.
Unit tests
✔️
Documentation
Lots of Javadoc added and updated.