Reputation: 95
I am trying to introduce lunch and dinner time into my vehicle routing problem using Google or-tools. Please see the following code (for only the lunch time):
solver = routing.solver()
for veh in range(num_vehicles):
lunch = solver.FixedDurationIntervalVar(780, 840, 60, True, "Lunch")
time_dimension.SetBreakIntervalsOfVehicle([lunch], veh)
The code runs but the result is exactly the same as not including the above section, i.e. the lunch time is ignored.
Any help is greatly appreciated!
Upvotes: 1
Views: 1149
Reputation: 39
Better late than never, but I think the True is the optional paramater. Which means that the breaks are optional so it prefers not to do it to optimize your performance.
Upvotes: 1