use of org.chocosolver.solver.variables.BoolVar in project scheduler by btrplace.
the class FastIFFEqTest method test7.
@Test
public void test7() {
Model csp = new Model();
BoolVar b = csp.boolVar(false);
IntVar x = csp.intVar("x", 0, 2, true);
int c = 3;
csp.post(new FastIFFEq(b, x, c));
Assert.assertEquals(3, csp.getSolver().findAllSolutions().size());
}
use of org.chocosolver.solver.variables.BoolVar in project scheduler by btrplace.
the class FastIFFEqTest method test4.
@Test
public void test4() {
Model csp = new Model();
BoolVar b = csp.boolVar(true);
IntVar x = csp.intVar("x", 0, 2);
int c = 3;
csp.post(new FastIFFEq(b, x, c));
Assert.assertEquals(0, csp.getSolver().findAllSolutions().size());
}
use of org.chocosolver.solver.variables.BoolVar in project scheduler by btrplace.
the class FastImpliesEqTest method test6.
@Test
public void test6() {
Model s = new Model();
BoolVar b = s.boolVar(false);
IntVar x = s.intVar("x", 0, 3, true);
int c = 2;
s.post(new FastImpliesEq(b, x, c));
Assert.assertEquals(4, s.getSolver().findAllSolutions().size());
}
use of org.chocosolver.solver.variables.BoolVar in project scheduler by btrplace.
the class FastImpliesEqTest method test7.
@Test
public void test7() {
Model s = new Model();
BoolVar b = s.boolVar(false);
IntVar x = s.intVar("x", 0, 2, true);
int c = 3;
s.post(new FastImpliesEq(b, x, c));
Assert.assertEquals(3, s.getSolver().findAllSolutions().size());
}
use of org.chocosolver.solver.variables.BoolVar in project scheduler by btrplace.
the class FastImpliesEqTest method test1.
@Test
public void test1() {
Model s = new Model();
// SMF.log(s, true, true);
BoolVar b = s.boolVar("b");
IntVar x = s.intVar("x", 0, 3, true);
int c = 2;
s.post(new FastImpliesEq(b, x, c));
Assert.assertEquals(5, s.getSolver().findAllSolutions().size());
}
Aggregations