I am a newbee with ortools. I am trying to set
minimum load for every acitve vehicles.
Here is my code :
for vehicle_id in range(data['num_vehicles']):
index = routing.End(vehicle_id)
min_capacity =int(data["product_d_capacity"][vehicle_id][0])
capacity_dimension.SetCumulVarSoftLowerBound(vehicle_id, min_capacity, 100000)
routing.SetVehicleUsedWhenEmpty(True, vehicle_id)
but
minimum constrant works not correct.
Another approach is: routing.solver().Add(product_d_dimension.CumulVar(routing.End(vehicle_id)) >= (min_capacity * routing.ActiveVehicleVar(vehicle_id))) but very slow and time out after 30p if I use more than 50 nodes.
Can you advise or any example?
I appreciate your help.