Use the google maps API distance mapping to solve the problems of sellers of prblm w / time windows (TSPTW) or routing vehicles of Prblm w / Time windows (VRPTW)

The Google API offers good directions for the ab routing point and now offers several waypoints and TSP optimization ( https://developers.google.com/maps/documentation/directions/#Waypoints ).

I would like to take one more step and solve the Traveling Salesman problem with time windows (TSPTW), also known as the problem of routing vehicles with time windows. In other words, I want to add appointments and service time to the optimization phase.

Google Maps offers a distanceMatrix API method, which, given a set of multiple start locations and multiple end locations, returns a distance matrix AND the approximate travel time between them. Given this information, how could one calculate a route in which at a certain time n number of waypoints should appear, i.e. Appointment? https://developers.google.com/maps/documentation/javascript/reference#DistanceMatrixService

I found an article on this subject, but it’s hard for me to translate theory and mathematics into real code: http://www.akk.ke.hu/index.php?mid=60&did=739

I am a LAMP developer and am looking for a solution in PHP or JavaScript.

Are there any other VRPTW solutions using data from google maps APIs or any other mapping solution?

+4

Source: https://habr.com/ru/post/1537936/


All Articles