Answer the question
In order to leave comments, you need to log in
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
Google Maps Directions API Specify waypoints
in the array .waypoints
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.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question