GAN
GAN

Reputation: 95

Or-tools Python Vehicle Routing Prob with Breaks

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

Answers (1)

bcoghe
bcoghe

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

Related Questions