use of org.chocosolver.solver.variables.BoolVar in project scheduler by btrplace.
the class FastIFFEqTest method test6.
@Test
public void test6() {
Model csp = new Model();
BoolVar b = csp.boolVar(false);
IntVar x = csp.intVar("x", 0, 3, true);
int c = 2;
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 test3.
@Test
public void test3() {
Model csp = new Model();
BoolVar b = csp.boolVar("b");
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 FastImpliesEqTest method test2.
@Test
public void test2() {
Model s = new Model();
BoolVar b = s.boolVar("b");
IntVar x = s.intVar("x", 0, 3, false);
int c = 2;
s.post(new FastImpliesEq(b, x, c));
Assert.assertEquals(5, s.getSolver().findAllSolutions().size());
}
use of org.chocosolver.solver.variables.BoolVar in project scheduler by btrplace.
the class FastImpliesEqTest method test5.
@Test
public void test5() {
Model s = new Model();
BoolVar b = s.boolVar(true);
IntVar x = s.intVar("x", 0, 3, true);
int c = 2;
s.post(new FastImpliesEq(b, x, c));
Assert.assertEquals(1, s.getSolver().findAllSolutions().size());
}
use of org.chocosolver.solver.variables.BoolVar in project scheduler by btrplace.
the class FastImpliesEqTest method test3.
@Test
public void test3() {
Model s = new Model();
BoolVar b = s.boolVar("b");
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());
}
Aggregations