Examples of unpost()


Examples of solver.Solver.unpost()

        final IntVar Z = VariableFactory.enumerated("Z", 1, 2, solver);
        Constraint c1 = IntConstraintFactory.arithm(X, "=", Y);
        Constraint c2 = IntConstraintFactory.arithm(X, "=", Z);
        solver.post(c1);
        solver.post(c2);
        solver.unpost(c2);
        solver.unpost(c1);
        solver.set(engine.make(solver));
        solver.findAllSolutions();
        Assert.assertEquals(solver.getMeasures().getSolutionCount(), 8);
        Assert.assertEquals(solver.getNbCstrs(), 0);
View Full Code Here

Examples of solver.Solver.unpost()

        Constraint c1 = IntConstraintFactory.arithm(X, "=", Y);
        Constraint c2 = IntConstraintFactory.arithm(X, "=", Z);
        solver.post(c1);
        solver.post(c2);
        solver.unpost(c2);
        solver.unpost(c1);
        solver.set(engine.make(solver));
        solver.findAllSolutions();
        Assert.assertEquals(solver.getMeasures().getSolutionCount(), 8);
        Assert.assertEquals(solver.getNbCstrs(), 0);
    }
View Full Code Here

Examples of solver.Solver.unpost()

        solver.post(c1);
        solver.post(c2);
        solver.plugMonitor(new IMonitorSolution() {
            @Override
            public void onSolution() {
                solver.unpost(c1);
                solver.unpost(c2);
            }
        });
        solver.set(engine.make(solver));
        solver.findAllSolutions();
View Full Code Here

Examples of solver.Solver.unpost()

        solver.post(c2);
        solver.plugMonitor(new IMonitorSolution() {
            @Override
            public void onSolution() {
                solver.unpost(c1);
                solver.unpost(c2);
            }
        });
        solver.set(engine.make(solver));
        solver.findAllSolutions();
        Assert.assertEquals(solver.getMeasures().getSolutionCount(), 5);
View Full Code Here

Examples of solver.Solver.unpost()

        Constraint c = LCF.or(
                ICF.arithm(x, "<", y),
                ICF.arithm(x, "<", z));
        solver.post(c);
        solver.findSolution();
        solver.unpost(c);
    }
}
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.