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

[BUG] Clause learning broken since Choco 4.10.14 #1118

Open
Holt59 opened this issue Nov 19, 2024 · 2 comments
Open

[BUG] Clause learning broken since Choco 4.10.14 #1118

Holt59 opened this issue Nov 19, 2024 · 2 comments
Labels

Comments

@Holt59
Copy link

Holt59 commented Nov 19, 2024

Describe the bug

I am trying to upgrade a project from Choco 4.10.13 to 4.10.14, but every time I try to run with clause-learning enabled, I get the following exception:

java.lang.IllegalStateException: cannot find maximum of an empty set
        at org.chocosolver.util.objects.setDataStructures.iterable.IntIterableRangeSet.max(IntIterableRangeSet.java:221) ~[carioca-solver-compute-functional-tests.jar:?]
        at org.chocosolver.solver.learn.LazyImplications.createDomain(LazyImplications.java:316) ~[carioca-solver-compute-functional-tests.jar:?]
        at org.chocosolver.solver.learn.LazyImplications.addEntry(LazyImplications.java:353) ~[carioca-solver-compute-functional-tests.jar:?]
        at org.chocosolver.solver.learn.LazyImplications.pushEvent(LazyImplications.java:383) ~[carioca-solver-compute-functional-tests.jar:?]
        at org.chocosolver.solver.learn.EventRecorder.updateLowerBound(EventRecorder.java:75) ~[carioca-solver-compute-functional-tests.jar:?]
        at org.chocosolver.solver.variables.view.integer.IntAffineView.updateLowerBound(IntAffineView.java:133) ~[carioca-solver-compute-functional-tests.jar:?]
        at org.chocosolver.solver.variables.IntVar.updateBounds(IntVar.java:415) ~[carioca-solver-compute-functional-tests.jar:?]
        at org.chocosolver.solver.constraints.ternary.PropXplusYeqZ.filterPlus(PropXplusYeqZ.java:91) ~[carioca-solver-compute-functional-tests.jar:?]
        at org.chocosolver.solver.constraints.ternary.PropXplusYeqZ.propagate(PropXplusYeqZ.java:72) ~[carioca-solver-compute-functional-tests.jar:?]
        at org.chocosolver.solver.propagation.PropagationEngine.propagateEvents(PropagationEngine.java:215) ~[carioca-solver-compute-functional-tests.jar:?]
        at org.chocosolver.solver.propagation.PropagationEngine.propagate(PropagationEngine.java:199) ~[carioca-solver-compute-functional-tests.jar:?]
        at org.chocosolver.solver.Solver.doPropagate(Solver.java:481) ~[carioca-solver-compute-functional-tests.jar:?]
        at org.chocosolver.solver.Solver.initialize(Solver.java:417) ~[carioca-solver-compute-functional-tests.jar:?]
        at org.chocosolver.solver.Solver.solve(Solver.java:305) ~[carioca-solver-compute-functional-tests.jar:?]

I cannot share the actual code since it's from a huge internal project, but I am available to discuss this on Discord. This might be linked to PropLexInt since I seem to only get the error when activating it.

Environment (please complete the following information):

  • Choco-solver version: 4.10.14 (works fine with 4.10.13).
  • JRE : 17.0.13
@Holt59 Holt59 added the bug label Nov 19, 2024
@cprudhom
Copy link
Member

I'm annoyed for two reasons:

  1. firstly because there's a bug
  2. but more importantly because I'm working on a completely different version of the explanations framework (namely LCG), which will soon replace the current system (by the end of the year maybe).

So, I would encourage you to wait for the release which will support LCG.
But it will force you to adapt your code (even more if you declare specific constraints).

NB: a public branch with this work in progress is available

@Holt59
Copy link
Author

Holt59 commented Nov 19, 2024

I'm annoyed for two reasons:

1. firstly because there's a bug

2. but more importantly because I'm working on a completely different version of the explanations framework (namely LCG), which will soon replace the current system (by the end of the year maybe).

So, I would encourage you to wait for the release which will support LCG. But it will force you to adapt your code (even more if you declare specific constraints).

NB: a public branch with this work in progress is available

There is no urgency on my side, and the only thing I'm using regarding clause-learning is Model.setLearningSignedClauses so hopefully the impact will be minimal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants