S
S
stfed842015-12-14 15:23:10
OpenStreetMap
stfed84, 2015-12-14 15:23:10

How to calculate the optimal route for several points?

Good day to all!
The task was to find the optimal route for several points.
The logistician has several delivery tasks, he needs to be prompted how to optimally build a route based on these tasks. Surely this problem has already been solved 1000 times. A ready-made service is not needed, since this is one of the application functions of a working CRM. You need either an API for a working service, or a simple do-it-yourself solution.
What we have:
1. Coordinates of the beginning and end of the path,
2. Coordinates, priority and time of intermediate points.
Priority may not be defined, i.e. 0
Time can be from 08.00 to 20.
One of the solutions seems to be:
First, the calculation of the distances between the starting point and all points along the coordinates - along a straight line, choosing the smallest one, moving to the selected point and repeating the algorithm. It seems like a solution, but not optimal. Checked.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
Y
Yakov Vylegzhanin, 2015-12-14
@vylegzhanin

Google Maps Directions API Specify waypoints
in the array .waypoints

P
pfg21, 2015-12-24
@pfg21

For routing on openstreetmaps, there are several different online services
wiki.openstreetmap.org/wiki/Routing/online_routers
plus
openrouteservice.org
most support intermediate points
, all of them can produce a gpx result that can be displayed on the site.

S
snami, 2020-08-28
@snami

Site https://poncy.su/
There is a calculation of the optimal route.
It is possible to work with the API

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question