Skip to content
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

Flexible trips in the index API #3293

Closed
gmellemstrand opened this issue Dec 16, 2020 · 2 comments
Closed

Flexible trips in the index API #3293

gmellemstrand opened this issue Dec 16, 2020 · 2 comments
Labels
Entur On Entur Roadmap Improvement
Milestone

Comments

@gmellemstrand
Copy link
Contributor

gmellemstrand commented Dec 16, 2020

The way the flex sandbox functionality is implemented now, much of it is kept separate from the main OTP model, and is not added to the index API. This means that many of the queries available for regular transit do not work with flex.

Looking through the Transmodel API, these are the queries that are not supported. Many of these would be similar for the REST API.

  • Leg->intermediateQuays (tripTimes missing) [Nice to have]
  • Leg->GeneralizedCost (not calculated for flex) [Nice to have]
  • Leg->fromEstimatedCall/toEstimatedCall (tripTimes missing) [Nice to have]
  • Leg->intermedidateEstimatedCalls (tripTimes missing) [Nice to have]
  • Leg->serviceJourneyEstimatedCalls (tripTimes missing) [Not needed]
  • Leg->bookingArrangements (not yet implemented) [Must have]
  • ServiceJourney->journeyPattern (flexTrip not added to journeyPattern) [Not needed]
  • ServiceJourney->quays (no JourneyPattern, no StopPattern) [Don´t know, nice?]
  • ServiceJourney-passingTimes (no JourneyPattern, no TimeTable/TripTimes). [Nice to have]
  • JourneyPattern - not available
  • Line->flexibleLineType (not implemented) [Must have]
  • FlexibleStopPlace not part of StopPlaces query (or bbox/radius) [No]
  • FlexibleArea not part of Quays query (or bbox/radius) [No]

[] : In the list above the Entur priority is in angle brakets.

We should look at the feasibility of integrating flex trips more in the regular OTP model, and in turn the index API. If this proves to be difficult, another option is to have the RoutingService delegate queries that involve flex.

What would need to be done:

  • FlexTrip should inherit from Trip. There are no major differences between the classes that would prevent this. What causes problems is that the type of FlexTrip is selected after the StopTimes are mapped (which contains a reference to the Trip object that would not yet be instantiated).
  • If we are change StopPattern to use StopLocation instead of Stop, we need to consider the semanticHash method which uses lat/lon that is currently only available on regular Stops.
  • Timetable minRunningTimes and minDwellTimes not used. MinTime and maxTime used for StopTimes search. May not be needed. Otherwise TimeTable class should be no differnet for FlexTrip.
  • The TripTimes object reflects a list of the temporary StopTime object, only optimized for routing. This could be extended in the same way as StopTime. Only non-flex TripTimes would be mapped in the TransitLayerMapper.
  • A check in the TripPattern could determine whether it is Raptor routable and therefore will be mapped to the TransitLayer. Non-flex parts of flexible Trips would also be mapped.
@leonardehrenfried
Copy link
Member

#3757 solves large parts of this.

@t2gran
Copy link
Member

t2gran commented Mar 16, 2022

I will close this, and if needed we will create new issues for the reminding functionality.

@t2gran t2gran closed this as completed Mar 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Entur On Entur Roadmap Improvement
Projects
None yet
Development

No branches or pull requests

3 participants