GIScience / openrouteservice

🌍 The open source route planner api with plenty of features.
https://openrouteservice.org
GNU General Public License v3.0
1.45k stars 399 forks source link

Improve speed estimation #622

Open takb opened 4 years ago

takb commented 4 years ago

The problem reported in #506 is not a bug but a case where the speed as calculated in the VehicleFlagEncoder for traveling over the highway ramps is higher than the speed over the highway itself.

It seems to happen rather frequently, I found multiple Autobahn junctions near Heidelberg on a quick look-around where a similar problem occurs. It happens easily wherever the highway crossing the junction has a speed limit so that the ramps have higher speed limits in relation.

One simple workaround is to heuristically assume a lower speed for said ramps (identified by "highway:*_link" tag on the ways) - it's more realistic anyway for those kinds of ways, than current solution that calculates with 90% of allowed max speed.

aoles commented 4 years ago

We decided to look into alternatives not requiring special handling of highway:*_link ways.

takb commented 4 years ago

On closer investigation the culprit turned out to be the adjustSpeedForAcceleration. For the case in #506 adjusting the parameter ACCELERATION_SPEED_CUTOFF_MAX fixes the problem. Will investigate further on how to improve the speed estimation.

aoles commented 4 years ago

What's the status on altering ACCELERATION_SPEED_CUTOFF_MAX? There seem to be other examples such as https://github.com/GIScience/openrouteservice/issues/673 where setting it to a lower value could potentially help to address the problem.

aoles commented 3 years ago

Yet another example of suboptimal routing, probably caused by the acceleration heuristic.

image

koebi commented 2 months ago

Another example for this can be found in this thread in the forum.