Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ NEXT MILESTONE

### Major features:
- Reduced integer overflows on large sum domain definition
- Fix declaring constraint for absolute constraint when the abs variable is already instantiated to 0
- No more constraints are posted within factories (instead when LCG is activated)

### Deprecated API (to be removed in next release):

Expand All @@ -18,6 +20,7 @@ See [milestone 6.0.2](https://github.com/chocoteam/choco-solver/milestone/xx)
#### Contributors to this release:
- Charles Prud'homme <charles.prudhomme@imt-atlantique.fr>
- Jean-Guillaume Fages <jg.fages@cosling.com>
- Arthur Godet <arth.godet@gmail.com>


**Full Changelog**: https://github.com/chocoteam/choco-solver/compare/v6.0.1...v6.0.2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import org.chocosolver.solver.Model;
import org.chocosolver.solver.constraints.Arithmetic;
import org.chocosolver.solver.constraints.Constraint;
import org.chocosolver.solver.constraints.unary.BooleanConstraint;
import org.testng.Assert;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
Expand All @@ -35,9 +36,19 @@ public void before() {
}

@Test(groups = "1s")
public void test1() throws IOException {
public void test0() throws IOException {
map.register("x", mSolver.intVar("x", 0, 2, true));
Flatzinc4Parser fp = parser("constraint int_le(1,x); % 0<= x\n", mSolver, map);
Flatzinc4Parser fp = parser("constraint int_le(0,x); % 0<= x\n", mSolver, map);
fp.constraint();
Assert.assertEquals(mSolver.getCstrs().length, 1);
Constraint c = mSolver.getCstrs()[0];
Assert.assertTrue(c instanceof BooleanConstraint);
}

@Test(groups = "1s")
public void test1() throws IOException {
map.register("x", mSolver.intVar("x", -1, 2, true));
Flatzinc4Parser fp = parser("constraint int_le(0,x); % 0<= x\n", mSolver, map);
fp.constraint();
Assert.assertEquals(mSolver.getCstrs().length, 1);
Constraint c = mSolver.getCstrs()[0];
Expand Down
Loading
Loading