[GraphHopper] Bigger penalty for ferries?
Peter K
peathal at yahoo.de
Tue Dec 3 10:35:42 UTC 2013
Hi Thomas,
thanks for this example - indeed, the ferry handling needs a bit more
tuning.
> return (int) speedEncoder.setValue(0, unknownSpeed);
This just returns the speed value at the correct position of the
'flags', no magic ;)
> I don't necessarily want to avoid them all together, but they should
be avoided if there's a reasonable alternate route.
This is somehow tricky as (at the moment) we can only lower the speed
for the ferries to put a penalty on them. Probably this is already fixed
as there was a request some days before to lower the speed for
living_street:
https://github.com/graphhopper/graphhopper/commit/9eb34278f917e1c2435a5ece7bb7597487c58613
You could try locally if this fixes the problem. But even if it does, we
probably should think about a better solution.
Regards,
Peter.
>
> Hi,
>
> I'm pretty new to working with OSM, so please forgive any gross
> misconceptions here..
>
> GraphHopper often ends preferring a ferry here near our office instead
> of driving around on the nearest bridge (with car):
>
> http://graphhopper.com/maps/?point=50.694636%2C7.181025&point=50.688689%2C7.165897&locale=en-US
>
> In comparison Google Maps prefers the bridge, as it estimated 22
> minutes for crossing with the ferry, while driving around the bridge
> is estimated to less than 15 minutes:
>
> http://goo.gl/aKSnmD
>
> (Check Route options -> 'Avoid highways' to have Google Maps use the
> ferry)
>
> My real experience from taking this ferry is that it very often loses
> out to driving. There is only one ferry, and waiting time is anywhere
> from 0 to 2 crossings + loading time. A crossing is about 6 minutes,
> and loading is 3, so the average time to get across is around 15
> minutes. Additionally there's an expensive fee, and under certain
> conditions (Hochwasser), the ferry doesn't ship at all.
>
> OSRM makes the same (wrong, in my opinion) decision as GraphHopper,
> which led me to believe that the underlying OSM data is to blame:
>
> http://osrm.at/5LW
>
> I've been debugging what happens in the
> com.graphhopper.routing.util.AbstractFlagEncoder#handleFerry method.
>
> Here are all the tags from the way object:
>
> fee=yes, estimated_distance=371.4757924566722, route=ferry,
> name=Autoschnellfähre Bad Godesberg-Niederdollendorf, toll=yes
>
> As there is no duration here, GraphHopper ends up with this logic:
>
> // unknown speed -> put penalty on ferry transport
> return (int) speedEncoder.setValue(0, unknownSpeed);
>
> I'm not sure how the result is used (these byte flags are a bit hard
> to read), but I reckon that the penalty is not strong enough.
>
> In the end, I guess my question is: How do I best go about
> instrumenting GraphHopper to be more restrictive about using ferries?
> I don't necessarily want to avoid them all together, but they should
> be avoided if there's a reasonable alternate route.
>
> _______________________________________________
> GraphHopper mailing list
> GraphHopper at openstreetmap.org
> https://lists.openstreetmap.org/listinfo/graphhopper
>
More information about the GraphHopper
mailing list