I need to calculate a route by optimizing the intermediate waypoints. I find the Google Direction API but i need another feature.
The waypoints that i need to optimized should by group in pair of Origin and Destination because I need to organize a route for a sanitary transporter that shoud pick up and carry some patients.
I give an example:
(Initial) Origin and (Final) Destination : Address of transporter's garage
Intermediate waypoints :
- Address of first patient's house (fist origin)
- Address of hospital A ( first destination)
- Address of second patient's house (Second origin)
- Address of hospital B (second destination)
The destination point must be after his relative origin point.
Google directions API with Optimize = True could respond to me with the reordered list of waypoints where the destination point of a couple is before the relative origin waypoint. (so this means I should go to the hospital without first picking up the patient and that doesn't make sense ).
How can i solve this problem ?