feat(drt): check for maxWaitTime being lower than maxTravelTimeBeta#4625
Open
marecabo wants to merge 7 commits intomatsim-org:mainfrom
Open
feat(drt): check for maxWaitTime being lower than maxTravelTimeBeta#4625marecabo wants to merge 7 commits intomatsim-org:mainfrom
marecabo wants to merge 7 commits intomatsim-org:mainfrom
Conversation
bc62f28 to
1a354e7
Compare
…maxTravelTimeBeta
1a354e7 to
be294aa
Compare
be294aa to
13e3739
Compare
Member
Member
nkuehnel
requested changes
Feb 2, 2026
Member
There was a problem hiding this comment.
I would make it a warning that waiting time may not always be fully effective only.
Member
|
Simple example for the argument above: given max wait of 10 mins and beta = 5min and alpha = 1.3 (30% detour) Given a trip with a direct ride time of 30 min. This means latest arrival at departure time = 0:00 is 0:44. This means, a direct ride without further detours lasting 30 mins does still have room for 14 mins of waiting time, which would then be capped by 10 mins max waiting time. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


I would suggest to add a constraint "
DrtOptimizationConstraintsSetImpl.maxTravelTimeBeta>DrtOptimizationConstraintsSet.maxWaitTime" inDrtOptimizationConstraintsSetImpl.DrtOptimizationConstraintsSetImpldefines an upper bound for the travel time of a DRT trip with itsmaxTravelTimeAlphaandmaxTravelTimeBetavalues.matsim-libs/contribs/drt/src/main/java/org/matsim/contrib/drt/optimizer/constraints/DrtOptimizationConstraintsSetImpl.java
Lines 10 to 22 in f466c47
These are used to compute a max travel time:
matsim-libs/contribs/drt/src/main/java/org/matsim/contrib/drt/routing/DefaultDrtRouteConstraintsCalculator.java
Line 45 in f466c47
The resulting
DrtRouteConstraint.maxTravelDurationis then used in theDrtRequestas follows:matsim-libs/contribs/drt/src/main/java/org/matsim/contrib/drt/passenger/DrtRequest.java
Lines 60 to 61 in f466c47
Obviously, it must hold that
latestStartTime<latestArrivalTime.Tracking this back, I would guess, that
maxTravelTimeBetamust be always greater or equal tomaxWaitTime.Do you have any thoughts on this? Maybe I am missing something?
Edit: The first commit is the actual change, all subsequent commits are the necessary adaption of tests.