The Google API offers good directions for routing point a-b, and now offer multiple waypoints and TSP optimization (https://developers.google.com/maps/documentation/directions/#Waypoints).
I'd like to take it a step further and solve the Traveling Salesman Problem with time windows (TSPTW) also known as vehicle routing problem with time windows. In other words, I want to add appointments and service time into the optimization step.
Google maps offers the distanceMatrix API method which, given a set of multiple starting locations and multiple ending locations, returns a matrix of distance AND estimated travel time between each. Given that information, how would one go about calculating a route where n number of waypoints have to be visted at certain times, i.e. an appointment? https://developers.google.com/maps/documentation/javascript/reference#DistanceMatrixService
I've found a paper on the subject, but am having a hard time transalting the theory and math into actual code: http://www.akk.ke.hu/index.php?mid=60&did=739
I'm a LAMP developer, and am looking for a solution in PHP or JavaScript.
Are there any other suggestions for solving the VRPTW using data from google maps API, or any other mapping solution?