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