Add cost to maximize wait-time and avoid back-travel in optimize transfers - #3654
Conversation
d8d745d to
7ce8fe1
Compare
7ce8fe1 to
35be747
Compare
refactor: Some OTP cleanup to prepare for #3654
binh-dam-ibigroup
left a comment
There was a problem hiding this comment.
Approved subject to updating the comment line in change.md.
ee2279c to
fb9e4b5
Compare
fb9e4b5 to
4b9b4c2
Compare
hannesj
left a comment
There was a problem hiding this comment.
Looks good, just one comment on the documentation
optionsome
left a comment
There was a problem hiding this comment.
Code changes looked good and tested with a case that has back-travel in OTP1 but not with these changes in OTP2.
| return Math.min(MIN_SAFE_TRANSFER_TIME_LIMIT_UPPER_BOUND, minSafeTransitTime); | ||
| return bound( | ||
| minSafeTransitTime, | ||
| MIN_SAFE_TRANSFER_TIME_LIMIT_LOWER_BOUND, |
There was a problem hiding this comment.
This probably needs to be changed once support for defining the GTFS transfers.txt min_transfer_time is added?
There was a problem hiding this comment.
I am not sure if it has anything to do with each other. The minSafeTransitTime is used to add a cost for very short transfers across all possible transfers for a set of trips, while the GTFS min_transfer_time is a restriction for a given pair of stops(& trips). The OptimizeTransferService and the Raptor search must both support the GTFS min_transfer_time - preventing transfers when appropriate.
Summary
This is an enhancement of the previous PRs on transfers. It try to balance constrained transfers and avoid back-travel. There is detail documentation on who this works in the PR.
Issue
There is no issue for this.
Unit tests
Unit tests are updated.
Code style
✅
Documentation
✅