-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Description
What version of OR-Tools and what language are you using?
Version: v9.9 only.
Language: Python
Routing Solver
Macos 13.4
I am using code like this to solve heterogeneous VRP with reloads. Like in this example
https://github.com/google/or-tools/blob/stable/ortools/constraint_solver/samples/cvrp_reload.py
But my problem has different capacities for different vehicles.
self.r.AddDimensionWithVehicleCapacity(
evaluator_index=self.c[name],
slack_max=int(self.p.max_c[index]), # we are unloading max_cap but adding some slack
vehicle_capacities=self.p.max_capacities[:, index].astype(int).tolist(),
fix_start_cumul_to_zero=True,
name="max_capacities" + str(index),
)Making negative capacities at reloads equal to the biggest possible capacity of my vehicle and then adding slack to landfills.
At version 9.8 it works, but at 9.9 it does not accept the initial solution and does not use landfills for vehicles with non-maximum capacities.
After some debugging, I realized that reload capacities say -100 are considered out of bounds for vehicles with maximum capacity say 80. So it cannot use reloads and ignores the initial solution. How to solve the same problem in the 9.9 version I don't know. I would consider this a bug.