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