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

Remove poor transit results for short trips, when walking is better #3331

Closed
t2gran opened this issue Jan 28, 2021 · 0 comments · Fixed by #3335
Closed

Remove poor transit results for short trips, when walking is better #3331

t2gran opened this issue Jan 28, 2021 · 0 comments · Fixed by #3335
Assignees
Labels
Entur On Entur Roadmap improvement
Milestone

Comments

@t2gran
Copy link
Member

t2gran commented Jan 28, 2021

In OTP2 the street search and transit search is done as to separate searches, then the results are merged and filtered to remove none optimal itineraries. But, when the client do NOT provide a ´directMode´ OTP do not do the streetSearch and the removal of none optimal results do not happen. In other words OTP is forced to return at least one itinerary with at least one transit leg. So, instead of walking maybe 100 meters, the OTP suggest you need to walk to the closest buss stop, take the bus on stop and walk back - with much more walking.

Let say OTP produces these internal results:

  • Itinerary-1: Origin ~ Walk 100m ~ Destination (Street search)
  • Itinerary-2: Origin ~ Walk 120m ~ Stop A ~ Bus 10:00 10:05 ~ Stop B ~ Walk 200m ~ Destination (Raptor search)

API level results

  • Request 1: { directMode:WALK, access/egressMode: WALK, transitModes:[TRANSIT] }, OTP returns [ Itinerary-1 ]
  • Request 2: { directMode:null, access/egressMode: WALK, transitModes:[TRANSIT] }, OTP returns [ Itinerary-2 ]

In this case Itinerary-1 is clearly better in all ways compared to Itinerary-2. Some OTP clients run a separate searches for WALK-ALL-THE_WAY, BIKE-ALL-THE-WAY, and WALK+TRANSIT. In this case it would be best for the client that Request 2 above just return an empty set, not the silly Itinerary-2.

Version of OTP used (exact commit hash or JAR name)

Current OTP2

Purposed solution

  • If no directMode is set, always filter away itineraries with a generalized-cost that is higher than the WALK-ALL-THE-WAY.

Why use generalized-cost, and not walk distance or a full pareto comparison?

In general we assume that walking can be time-shifted; hence we can exclude arrival and departure time from the comparison. The transit might have a higher cost and shorter travel time than the walk-all-the-way itinerary, but this is theoretical and I have not managed to construct a good transit alternative.

If we compared just on walking distance we would still get silly results. E.g. if the only stop reachable within walking distance is a train station, we could get a itinerary like this:

  • Origin ~ Walk 50m ~ Stop 1a ~ Train 10:00 10:15 ~ Stop B ~ Train 10:20 10:35 ~ Stop 1d ~ Walk 50m ~ Destination -
  • NOT: Origin ~ Walk 120m ~ Destination
@t2gran t2gran added improvement Entur On Entur Roadmap labels Jan 28, 2021
@t2gran t2gran added this to the 2.1 milestone Jan 28, 2021
@t2gran t2gran added this to Issues backlog in OTP2 Development via automation Jan 28, 2021
@t2gran t2gran self-assigned this Jan 28, 2021
t2gran added a commit to entur/OpenTripPlanner that referenced this issue Jan 29, 2021
@t2gran t2gran changed the title Silly transit results for short trips: Origin ~ Walk 100m ~ Destination Remove poor transit results for short trips, when walking is better Jan 29, 2021
OTP2 Development automation moved this from Issues backlog to Done Feb 4, 2021
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
No open projects
Development

Successfully merging a pull request may close this issue.

1 participant