Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OR-Tools v9.9 regression: incorrect negative transit variables (with modulo > capacity) handling in heterogeneous VRP #4133

Open
Yamp opened this issue Mar 15, 2024 · 0 comments
Assignees
Labels
Bug Lang: Python Python wrapper issue Solver: Routing Uses the Routing library and the original CP solver
Milestone

Comments

@Yamp
Copy link

Yamp commented Mar 15, 2024

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.

@Mizux Mizux self-assigned this Mar 16, 2024
@Mizux Mizux added Bug Lang: Python Python wrapper issue Solver: Routing Uses the Routing library and the original CP solver labels Mar 16, 2024
@Mizux Mizux added this to the v10.0 milestone Mar 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Lang: Python Python wrapper issue Solver: Routing Uses the Routing library and the original CP solver
Projects
None yet
Development

No branches or pull requests

2 participants