-
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
Add support for query parameter to enforce booking time in trip search for flexible services #5606
Merged
Conversation
This file contains 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
…o OTP transit request time Otp transit request time is the number of seconds since/before the `transitSearchTimeZero`
…t the raptor interface. This allow us to extend the interface inside the otp internal model.
- Implement latestArrivalTime in BookingTimeAccessEgress - Make Booking time work with time-penaly - Move bussiness logic into business classes from services and OpeningHoursAdjuster
src/ext/java/org/opentripplanner/ext/flex/template/AbstractFlexTemplate.java
Outdated
Show resolved
Hide resolved
t2gran
reviewed
May 29, 2024
Co-authored-by: Johan Torin <[email protected]> Co-authored-by: Leonard Ehrenfried <[email protected]>
src/ext/java/org/opentripplanner/ext/flex/template/FlexAccessEgressCallbackAdapter.java
Show resolved
Hide resolved
src/ext/java/org/opentripplanner/ext/flex/edgetype/FlexTripEdge.java
Outdated
Show resolved
Hide resolved
src/ext/java/org/opentripplanner/ext/flex/trip/UnscheduledTrip.java
Outdated
Show resolved
Hide resolved
src/main/java/org/opentripplanner/apis/transmodel/model/plan/TripQuery.java
Outdated
Show resolved
Hide resolved
t2gran
reviewed
May 30, 2024
src/main/java/org/opentripplanner/routing/api/request/RouteRequest.java
Outdated
Show resolved
Hide resolved
Co-authored-by: Leonard Ehrenfried <[email protected]>
jtorin
suggested changes
Jun 3, 2024
src/main/java/org/opentripplanner/apis/transmodel/model/plan/TripQuery.java
Outdated
Show resolved
Hide resolved
src/main/java/org/opentripplanner/apis/transmodel/model/plan/TripQuery.java
Outdated
Show resolved
Hide resolved
src/main/resources/org/opentripplanner/apis/transmodel/schema.graphql
Outdated
Show resolved
Hide resolved
Co-authored-by: Johan Torin <[email protected]>
jtorin
approved these changes
Jun 3, 2024
src/test/java/org/opentripplanner/transit/model/_data/TransitModelForTest.java
Show resolved
Hide resolved
leonardehrenfried
approved these changes
Jun 4, 2024
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.
Summary
Implements #5077
This PR add a new request parameter
bookingTime
:The bookingRestrictions ie enforced for access, egress and direct FLEX services. Only the boarding time is considered, but the flex service is time-shifted to meet the boarding time restrictions (as long as it is possible). Both the boarding and alighting window is still honered.
To solve this I made a lot of refactorings in the flex implementation. The routing no longer have any dependencies to AStar (only to Vertx and Edges & and Path calculator) and not to the TransitService. This is important to be able to unit-test this. I have so fare NOT added many tests, but will create a separate PR with more tests. When we have proper unit-tests in place, then we can refactor the design as well and remove the reminding dependencies to other OTP models (using adaptors).
Issue
Closes #5077
Unit tests
Some tests are added/improved, but we will provide a new PR with more tests.
Documentation
API do is up to date, but design doc is not updated. I want to go over the design again before updating the doc.