I have an optimization request with x amount of stops, and 1 vehicle. Most of the times the ‘end_address’ is the depot, but sometimes it’s an customer. But the driver may only arive at the end_address in a certain time_window. I don’t want to set the end_address as normal ‘service’ because then the optimization may put it between two other services.
Is it anyway possible to set a time_window? Only setting latest_end will not work, because this only makes it that the driver must arive before a specified time.
return_to_depot: false would not exactly help, because than the problem arises that the last stop could be optimized between two other stops.
For example, I have a route with 6 stops.
The first stop is the HUB (so the start_address for the vehicle).
The second, third, fourth and fifth stops are customers that can visited in any order throughout the day.
The last stop is not the HUB, also a customer that must come last, but can only be visited between a certain time_window.
For the second to fifth stop, I can add a service with a time_window from the start until the end of the day. If I do the same for the sixth stop and press optimze, It is possible that GraphHopper returns a solution with stop six somewere in the middle, which I don’t want. If I set the sixth location as a end_address for my vehicle, I can’t enter a time_window and GraphHopper can return a solution where the sixth stop arr_time is way before the time_window I want to give to that stop.
That’s why I hoped there would be the option to give the end_address a time_window.