Closed jeremydover closed 1 year ago
it is not an infinite loop. Thanks for the report.
Thanks for the report. I pushed the fix.
The issue were that we created Boolean variables, one per contiguous interval in the (lit1 && lit2 && lit3) => var in [a..b]U[c..d]. These literals were unbound when lit1 && lit2 && lit3 == false. This led to duplicate solutions.
Thank you very much for the quick solution! I'll check out the code at the next release and test.
What version of OR-Tools and what language are you using? Version: 9.5.2237 Language: Python
Which solver are you using (e.g. CP-SAT, Routing Solver, GLOP, BOP, Gurobi) CP-SAT
What operating system (Linux, Windows, ...) and version? Windows 11
What did you do? Steps to reproduce the behavior:
What did you expect to see There should only be one solution, which is confirmed by running the model variable by variable (at least the main sudoku cell variables) for each possible value.
What did you see instead? The solver produces the same solution repeatedly in what is presumably an infinite loop.
Anything else we should know about your project / environment Some of the model conditions are complex, and often when I see repeated solutions there is a logic area in the Boolean variables which allows them to "flap" on the same grid solution. But in this case, all of the Boolean variables used are the same in every solution.