VDVde / OJP

Open API for distributed journey planning. CEN/TS 17118:2017.
https://www.vdv.de/open-journey-planner.aspx
22 stars 12 forks source link

Enhance TripPolicy for more Private Lines, filter for PassengerCategory, Access Modes #349

Closed ue71603 closed 11 months ago

ue71603 commented 1 year ago

With this PR it is possible to allow a trip planner to include specialised private LINE (e.g. car pooling, school busses, company shuttles) into the trip planning. It also allows to define necessary ACCESS MODE (e.g. that you are in a car, which restricts search to road, ferry, carTransportRail or that you can access a dragLift, because you have skis with you. The third part makes sure, that selected by the PassengerCategory some additional things might get "unlocked". E.g. in Delemont seniors have a different service offered to them by the demand responsive service: https://www.postauto.ch/de/fahrplan-und-netz/publicar/delemont

ue71603 commented 1 year ago

The use cases are:

• Alice wants to go to the mountain top restaurant and uses a snowboard. As the mountain top restaurant during winter is accessible by a dragLift, this should show in the trip result, because Alice sent (foot ski) in the new AccessModeList parameter. • Bob goes from Bern to his holiday hotel in Crans Montana. He will use the carTransportRail between Kandersteg and Goppenstein. He informs himself about the waiting time and specifies his desired arrival time in Goppenstein, this results in a rail trip between Kandersteg and Goppenstein and he expands this with two trip requests (Bern – Kandersteg; Goppenstein – Crans Montana). • Charlie wants to go to Crete. She is going with the motorcycle and needs to use a ferry that is willing to transport her and the vehicle. • “Auto im Reisezug” we don’t have that really, but I guess this is also a use case. • In future we will have additional use cases for Cargo transport and there it might be relevant).

herlitze commented 1 year ago

I added IncludePrivateLines to the StopEvent-Request as well.

ue71603 commented 1 year ago

Tim: Another use case. If one uses more than journey planner and link the answers. One needs to pass the information between journey planners. The national service planner was based on regional service planners. So the previous context needs to be transfered. Matthias: The main behaviour of trip planners does not change. --> SBB also prepares a detailed example to be included.

ue71603 commented 1 year ago

MENTZ implemented an IVProfile for us with CarShuttle and NoCarShuttle. I will use this one also for the new version.

ue71603 commented 1 year ago

@skinkie @normanoffel @herlitze @DRubliMentz I moved IncludeAlternativeOptions to the TripPolicyGroup. I reorganised the TripPolicyGroup a little bit. I added MainTravelMode. When this is set to "car" then railTransport etc is calculated and IV. Otherwise carTransportRail is excluded. Does this sound reasonable. This also does a little bit what the IVProfile does in our current implementation.

IncludeAlternativeOption is no longer part of the refinement. Should be more in the TripRecalculation. Or do you prefer something else?

ue71603 commented 1 year ago

@trurlurl and now?

ue71603 commented 1 year ago

@herlitze When do you have time to have a look at the 2 PR?

ue71603 commented 12 months ago

Open question regarding PassengerCategory.

@trurlurl : What is still open Dog und Bicycle are in the PassengercategoryEnumeration. So it need to "work". do you want a textual addition.

I haven't found where the restrictions applying to a _passenger category could be seen. E.g., the Delémont case. Would it have to be modeled as a PrivateMode?

You want an update on the example?

trurlurl commented 12 months ago

Open question regarding PassengerCategory.

@trurlurl : What is still open Dog und Bicycle are in the PassengercategoryEnumeration. So it need to "work". do you want a textual addition.

I haven't found where the restrictions applying to a _passenger category could be seen. E.g., the Delémont case. Would it have to be modeled as a PrivateMode?

You want an update on the example?

@ue71603 Yes, I think having a "dogs not allowed" and "only for seniors" example would be helpful to show where a calling system has to collect such information in order to present it to the enquirer.

ue71603 commented 12 months ago

@trurlurl : Happy now?

trurlurl commented 12 months ago

@trurlurl : Happy now?

Not happy - I have no luck finding the Restricted flag and all other restriction information in the example response.

ue71603 commented 11 months ago

@skinkie If you could approve it also, we could merge.

ue71603 commented 11 months ago

Are all of these changes actually related to each other in a way they have to be merged in one pull request? It isn't really easy to understand.

They came out of the same meeting and discussion (on sharing and necessary extensions). I know they are difficult to understand. But breaking them apart would not make it better.