v9.1 no longer work for CVRP with number of stops visited per each vehicle route
- Dominant language
- C++
- Stars
- 14.1k
- Forks
- 2.5k
- Avg merge
- 8h 39m
- Merged PRs (30d)
- 72
Description
**What version of OR-Tools and what language are you using?**
v.9.1 vs v8.0.8283
Language: C++/Java/Python/C#
Python
**Which solver are you using (e.g. CP-SAT, Routing Solver, GLOP, BOP, Gurobi)**
Routing Solver: CVRP module
**What operating system (Linux, Windows, ...) and version?**
Windows
**What did you do?**
Steps to reproduce the behavior:
In order to limit vehicle stops per each route, I added the following code before setting the first solution heuristic.
```py
count_stop_callback = routing.RegisterUnaryTransitCallback(lambda index: 1)
dimension_name = 'Counter'
routing.AddDimension(count_stop_callback, 0, 45000, True, 'Counter')
counter_dimension = routing.GetDimensionOrDie(dimension_name)
for vehicle_id in range(data['num_vehicles']):
index = routing.End(vehicle_id)
solver = routing.solver()
solver.Add(counter_dimension.CumulVar(index) <= data['stops'])
```
**What did you expect to see**
Expect to the number of stops per route does not exceed the stops being set i.e. data['stops'] for example 5 stops maximum
**What did you see instead?**
After upgrading the version to 9.0, the routing.SolveWithParameters(search_parameters) does not exit, it runs forever.
However, after re-install version 8.0.8283, it is back to normal.
Question is what has been changed could cause such confliction
Make sure you include information that can help us debug (full error message, model Proto).
**Anything else we should know about your project / environment**
Contributor guide
Assessment
This issue has not been assessed yet.