mapzen / eraser-map

Privacy-focused mapping application for Android
GNU General Public License v3.0
75 stars 24 forks source link

Multimodal routes use excessive walking #828

Open dhogan-io opened 7 years ago

dhogan-io commented 7 years ago

Routing along Camino Real in Palo Alto/Mountain View/Sunnyvale, CA easily triggers the bug since VTA bus 22 runs along the road.

Adding appropriate costing seems to fix the issue. "costing_options":{"transit":{"use_bus":"1.0","use_rail":"1.0","use_transfers":"0.3"}} works well based on a small amount of testing.

msmollin commented 7 years ago

Thanks for the feedback! I agree that does seem excessive.

My concern about costing options like that is in many cases there could be a good reason our backend is recommending that; either the bus might not be stopping there or the longer route is actually easier to get to given elevation and road systems. Making the suggested change would affect those cases as well. However I could be wrong on that!

To test this it would be useful to have either starting and ending lat/longs or a GPX trace of the route. Can you possibly provide either of those?

@dnesbitt61 is there any downsides to altering the costing model like suggested above?

dhogan-io commented 7 years ago

Here's an example:

https://valhalla.mapzen.com/route?json={"locations":[{"lat":37.42013,"lon":-122.13588},{"lat":37.44473,"lon":-122.16245}],"costing":"multimodal","date_time":{"type":1,"value":"2017-07-07T19:25"}} Summary: walk 1.8 km, take VTA bus 22 for one stop, walk ~1 km. Total time: 44 min (19:25-20:09)

https://valhalla.mapzen.com/route?json={"locations":[{"lat":37.42013,"lon":-122.13588},{"lat":37.44473,"lon":-122.16245}],"costing":"multimodal","date_time":{"type":1,"value":"2017-07-07T19:25"},"costing_options":{"transit":{"use_bus":"1.0","use_rail":"1.0","use_transfers":"0.3"}}} Summary: walk 0.3 km, take VTA bus 22 for nine stops, walk 0.3 km. Total time: 21 min (19:25-19:41)

msmollin commented 7 years ago

Great thanks for that. I had a discussion with our routing team and they agree in this case they can probably tweak the formula on the back-end a little bit more to help out with that problem. Feel free to subscribe to https://github.com/valhalla/valhalla/issues/821 to watch and see when it gets merged in.

In the mean time in EM we could add some additional settings specific for multimodal routes. The routing team did agree with my initial assessment that altering the weights universally will have impact worldwide that may not be conducive for other cities. Maybe we could add a couple check boxes to indicate preference from the end user to further modify the route? This would be similar to "Prefer local roads over highways" except more like "Prefer buses and trains over walking".

@sarahlensing any additional thoughts on that?

sarahsnow1 commented 7 years ago

...just a +1 to adding route options in EM. I've wanted to be able to configure toll and ferry options, this is a good opportunity to consider adding them in as well.