Open qiannathancao opened 2 years ago
Please provide a small reproducible example.
Why not using AddConstantDimension instead ? https://github.com/google/or-tools/blob/2cb85b4eead4c38e1c54b48044f92087cf165bce/ortools/constraint_solver/routing.h#L554-L570
I'm not sure the problem is related to this constraint (which seems legit BTW). Routing team did lot of change (heuristic etc) so I suspect your problem to unfortunately work better with previous implem seed/setup etc...
Could you provide your search parameter setup ?
Also, did you enable log search ? guided local search and time limit ?
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.
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