opentripplanner / OpenTripPlanner

An open source multi-modal trip planner
http://www.opentripplanner.org
Other
2.16k stars 1.02k forks source link

Issue routing to and from stations with quays spread over a wide area #5848

Open habrahamsson-skanetrafiken opened 4 months ago

habrahamsson-skanetrafiken commented 4 months ago

Problem: We've got stations with quays spread over a large area. Here is the overview of Malmö central station with all its quays marked in orange:

malmoc

When searching to or from a station by id, OTP currently searches to and from all the quays belonging to that station. This causes some unwanted behaviours. Here are two examples:

1) Disembark early and walk to a nearby quay. We sometimes get the behaviour that it is cheaper and faster to disembark a bus ride and walk to one of the quays instead of continuing on the bus ride until the destination:

actual_egress Current Behaviour: (this shows the egress using walking to a nearby quay belonging to Malmö C)

expected_egress Expected Behaviour: (This shows the trip going all the way to Malmö C by the bus line)


2) Wierdness in direct search. The same underlying issue causes some strange behaviour for direct street searches where you search for a path to Malmö C but are directed to a quay that is far away from the actual station building that users expect.

walk_actual Current Behaviour: This shows two street searches from opposite sides of Malmö C. Both searches have Malmö C as their destination. F and T means "From" and "To" in the image.


walk_expected Expected Behaviour: A user would expect both searches to end at the same place in the central station building like this:

Possible solution

Our proposed solution to this issue is to enable a new behaviour where access/egress/direct search always uses the centroid coordinate when searching from a station id.

This should only affect search results where the itinerary starts/ends with an access/egress leg (also direct searches). If you search from Malmö C and there is a bus leaving from a quay belonging to Malmö C, you shouldn't have to walk from the centroid to the quay but get a result starting directly at the quay like it currently works.

t2gran commented 3 months ago

We can extend OTP to support an access/egress to a point at a Station. But, we should not use the centroid, since the purpose is for displaying the name in the map. If we use a point, we should extend the model with a StopPlace/Station "meeting point". If no "meeting point" exist we should fall back to todays implementation navigating to one of the quays.

t2gran commented 3 weeks ago

I went another round on this here at Entur, and we came up with a simpler solution. I think the use-cases for this feature are rare, so maybe we should aim for a simpler solution. So an alternative solution is:

habrahamsson-skanetrafiken commented 3 weeks ago

@t2gran Using the centroid for only a list of stations would be a fine solution for us. That way we could enable it for only the stations where we actually have this problem.

I didn't quite understand how you meant this could be implemented. My idea was to modify the access/egress-search something like this:

t2gran commented 2 weeks ago

When using a centroid, you will need to add time/cost to the access/egress to make Raptor pick the stops closer to the centroid over the stops futher away. We can do that be having a special AccessEgress implementation or remove the leg afterwards - it does not matter. In both cases the time and cost of the path/itinerary need to be adjusted (remove the "fake" part).