Project-OSRM / osrm-backend

Open Source Routing Machine - C++ backend
http://map.project-osrm.org
BSD 2-Clause "Simplified" License
6.21k stars 3.29k forks source link

What if using other Algorithm to calculate shortest path? #6424

Closed MoeinSHprogrammer closed 3 weeks ago

MoeinSHprogrammer commented 1 year ago

Hi I wanted to ask if the two algorithms CH and MLD are the best algorithms to find the shortest path in OSRM or can the result be improved by using other algorithms?

nilsnolde commented 1 year ago

AFAIK those are the only ones left in OSRM. Which algo to use depends on what your requests look like. You can get some degree of flexibility in OSRM with exclude_ flags in MLD or live traffic. Standard requests should return the same result for any algo (+/-, always some edge cases where results might differ). In principle, the same is true for switching the engine to Valhalla or Graphhopper or even Google Maps. But again, edge cases will behave differently. Routing on real-life road networks is crazy complex, and some algo might choose slightly different parameters to e.g. penalize u-turns.