Project-OSRM / osrm-backend

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

I want calculate point sort #1315

Closed solidsnake2013 closed 9 years ago

solidsnake2013 commented 9 years ago

Hi

I using osrm calculate route, I have very speed calculate route, but some time I realized that the point order is unreasonable.

The function of OSRM provide point sort?

TheMarex commented 9 years ago

What do you mean by 'sort points'

solidsnake2013 commented 9 years ago

I would like to calculate point sorting To calculate the shortest distance Please check example :

This is unsorted: osrm_2

This is After ordering : osrm_1

Thank you for your prompt reply!

TheMarex commented 9 years ago

So you want to calculate the shortest route that visits all points?

This problem is called Traveling Salesman Problem and can be solved using the table plugin that computes all pair-wise distances.

OSRM has no build-in solution to solve this problem for you. But a quick google search should turn up algorithms to solve this.

solidsnake2013 commented 9 years ago

Do you have any good recommendation?? Thanks

emiltin commented 9 years ago

duplicate to #611