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

Allow for "transport mode" to be filtered by section (defined by vias) #462

Open
ue71603 opened this issue Sep 20, 2024 · 4 comments
Open
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@ue71603
Copy link
Contributor

ue71603 commented Sep 20, 2024

Let's assume you want to do a trip from Bern - Interlaken West
The via is Thun
From Thun to Interlaken West you would like to use the boat.

This is done in www.sbb.ch like this:
image
image
image

Possible solutions in OJP:

Do it beforehand

  1. Tell people to first do a TripRequest Bern via Thun to Interlaken.
  2. Do a TripChangeRequest on the second leg Thun to Interlaken with a PtModeFilter set to things like boats

Add some filters to the Via

image

Other ideas?

@ue71603 ue71603 added the enhancement New feature or request label Sep 20, 2024
@ue71603 ue71603 added this to the v2.1 milestone Sep 20, 2024
@skinkie
Copy link
Contributor

skinkie commented Sep 20, 2024

Would some other filters be useful too? Would they be hard filters, or soft?

@herlitze
Copy link
Contributor

@ue71603 I would suggest sending 2 separate trip requests to implement this requirement. One from Bern to Thun, and one from Thun to Interlaken.

@trurlurl
Copy link
Contributor

On www.sbb.ch, I wasn't able to replicate the described behavior. (A) I didn't find how to have separate transport mode selections per section ("Verkehrsmittelwahl pro Teilstrecke"). (B) Limiting the search to the second section Thun-Interlaken and selecting all transport modes didn't give me any boat trips; it only worked after removing all train modes. That's more or less the behavior I would expect from an implementation as proposed by @herlitze - i.e., boat trips are included if the user specifies a carefully selected section from a section origin to a section destination that is possible without using a train. This requires detailed knowledge or a lucky guess by the user.

Would a more general solution, based on hard constraints and existing mechanisms, make sense that uses MultiPointTripRequests? For the trip from Bern to Interlaken one would have to look for boat stops near the route, take the set of all boat stops of the navigation service network, find possible routes from orgin Bern to each boat stop, then search for follow-up water routes between (in prinicple) all possible pairs of boat stops, and then from all the destination boat stops to Interlaken. Then display the solutions most likely to please the user.

@normanoffel
Copy link

normanoffel commented Sep 26, 2024

I agree with @herlitze comment. But I think your actual requirement is to separate the complete trip at the via and have different search parameters applied to either partial trip, right? That would include the comment from @skinkie earlier as well.
@trurlurl A journey planner will always try to provide the best solutions according to the available information of the mobility services and the requested search parameters. If the boat leg cannot compete with other options according to the search parameters, then it won't be taken into consideration. If you tweak your search options in a way that the boat leg becomes competitive again, then it will be taken into consideration and potentially provided in the response. Yes, of course, that may require detailed knowledge or curiosity to play around with the search options. One might argue that there may be room for a optimization method which would try to specifically use these kind of legs if available at the cost of more transitions and longer routes. But I'm not a fan of in my opinion misusing the MultiPointTripRequest in that way. However, an optimization method would also be applied for the whole trip.

To sum up my point of view: If you have separated trips with different search parameters, make it separated TripSearches as well. It would be very hard for a Journey Planner to implement support for leg-specific search parameters because from the perspective of OJP this is what it boils down to in the end. I would also argue that this is not what you would want from the users perspective as well. You either already know that there is a boat and you would like to take it, then you would try to find a trip to the boat, find a suitable boat journey and finally the rest of the trip to your final destination. If you don't know that there is a boat what are generally interested in scenic trips, then please use the already existing optimization method "scenic".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

6 participants