-
Notifications
You must be signed in to change notification settings - Fork 1
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
181 feature merge consecutive walks at connection start or end at the service level #186
base: main
Are you sure you want to change the base?
Conversation
…classes in service.
… doInitialTransferRelaxation (round 0) is false.
…hnically not possible (transfer faster than route).
…m raptor router.
…allow source and target transfers from raptor.
…ction-start-or-end-at-the-service-level # Conflicts: # src/test/java/ch/naviqore/service/gtfs/raptor/GtfsRaptorTestSchedule.java
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.
Thanks @clukas1, nice work!
Looks good to me.
I have adjusted some smaller style issues and as always have a request for documentation or maybe introducing an enum to clarify the documentation this way.
@@ -28,6 +28,11 @@ public class QueryConfig { | |||
@Setter | |||
private EnumSet<TravelMode> allowedTravelModes = EnumSet.allOf(TravelMode.class); | |||
|
|||
@Setter | |||
private boolean allowSourceTransfer = true; |
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.
Document and define what a source or target transfer is at the RAPTOR level in a simple sentence. Maybe also highlight why this configuration is important and what kind of issues are prevented by it.
My attempt:
Allow reaching a source or target stop via a transfer instead of a public transit leg.
Note: At the service level, this is only relevant for route requests to or from a stop, not to a geocoordinate.
Question: Would it make sense to introduce an enum for these cases instead of using two booleans?
/**
* Policy for allowing transfers to reach a source or target stop
*/
public enum SourceTargetTransferPolicy {
/** Transfers are not allowed for either source or target stops. */
DENY,
/** Allows transfers only for reaching the source stop. */
ALLOW_SOURCE,
/** Allows transfers only for reaching the target stop. */
ALLOW_TARGET,
/** Allows transfers for both source and target stops. */
ALLOW;
}
Hi,
To solve the issue of having potential consecutive walks when routing from a geo coordinate (e.g. walk to source stop (from service), followed by initial transfer between stops from the raptor router), I've added more QueryConfiguration options for the raptor module. Allowing to prevent transfers from source stops and transfers to target stops). I think this is the most elegant way of ensuring that any max walking time query configuration values are not violated.
In the process I was thinking about adding more optional configurations to the RAPTOR module. None of those are necessary, but might be nice to haves.
Last idea only service related (not raptor):