Examples of findAllSolutions()


Examples of solver.Solver.findAllSolutions()

    public void testbooltrue() {
        Solver solver = new Solver();
        BoolVar B = VF.bool("B", solver);
        SatFactory.addTrue(B);
        SMF.log(solver, true, false);
        solver.findAllSolutions();
    }
}
View Full Code Here

Examples of solver.Solver.findAllSolutions()

    @Test(groups = "verylong")
    public void testAll() {
        Solver sol;
        for (int j = 3; j < 7; j++) {
            sol = modeler(j);
            sol.findAllSolutions();
            long nbsol = sol.getMeasures().getSolutionCount();
            long node = sol.getMeasures().getNodeCount();
            for (int t = 0; t < PropagationEngineFactory.values().length; t++) {
                sol = modeler(j);
                PropagationEngineFactory.values()[t].make(sol);
View Full Code Here

Examples of solver.Solver.findAllSolutions()

            long nbsol = sol.getMeasures().getSolutionCount();
            long node = sol.getMeasures().getNodeCount();
            for (int t = 0; t < PropagationEngineFactory.values().length; t++) {
                sol = modeler(j);
                PropagationEngineFactory.values()[t].make(sol);
                sol.findAllSolutions();
                Assert.assertEquals(sol.getMeasures().getSolutionCount(), nbsol);
                Assert.assertEquals(sol.getMeasures().getNodeCount(), node);
            }

        }
View Full Code Here

Examples of solver.Solver.findAllSolutions()

        Solver solver = new Solver();
        IntVar[] CS = VF.enumeratedArray("CS", 4, 1, 5, solver);
        solver.post(ICF.regular(CS,
                new FiniteAutomaton("(1|2)(3*)(4|5)")));
        SMF.log(solver, true, false);
        solver.findAllSolutions();
    }

    @Test(groups = "1s")
    public void testscalar() {
        Solver solver = new Solver();
View Full Code Here

Examples of solver.Solver.findAllSolutions()

        IntVar[] CS = VF.enumeratedArray("CS", 4, 1, 4, solver);
        int[] coeffs = new int[]{1, 2, 3, 4};
        IntVar R = VF.bounded("R", 0, 20, solver);
        solver.post(ICF.scalar(CS, coeffs, R));
        SMF.log(solver, true, false);
        solver.findAllSolutions();
    }

    @Test(groups = "1s")
    public void testsort() {
        Solver solver = new Solver();
View Full Code Here

Examples of solver.Solver.findAllSolutions()

        Solver solver = new Solver();
        IntVar[] X = VF.enumeratedArray("X", 3, 0, 2, solver);
        IntVar[] Y = VF.enumeratedArray("Y", 3, 0, 2, solver);
        solver.post(ICF.sort(X, Y));
        SMF.log(solver, true, false);
        solver.findAllSolutions();
    }

    @Test(groups = "1s")
    public void testsubcircuit() {
        Solver solver = new Solver();
View Full Code Here

Examples of solver.Solver.findAllSolutions()

        Solver solver = new Solver();
        IntVar[] NODES = VF.enumeratedArray("NS", 5, 0, 4, solver);
        IntVar SI = VF.enumerated("SI", 2, 3, solver);
        solver.post(ICF.subcircuit(NODES, 0, SI));
        SMF.log(solver, true, false);
        solver.findAllSolutions();
    }

    @Test(groups = "1s")
    public void testsubpath() {
        Solver solver = new Solver();
View Full Code Here

Examples of solver.Solver.findAllSolutions()

        IntVar S = VF.enumerated("S", 0, 3, solver);
        IntVar E = VF.enumerated("E", 0, 3, solver);
        IntVar SI = VF.enumerated("SI", 2, 3, solver);
        solver.post(ICF.subpath(VS, S, E, 0, SI));
        SMF.log(solver, true, false);
        solver.findAllSolutions();
    }

    @Test(groups = "1s")
    public void testsum() {
        Solver solver = new Solver();
View Full Code Here

Examples of solver.Solver.findAllSolutions()

        Solver solver = new Solver();
        IntVar[] VS = VF.enumeratedArray("VS", 4, 0, 4, solver);
        IntVar SU = VF.enumerated("SU", 2, 3, solver);
        solver.post(ICF.sum(VS, "<=", SU));
        SMF.log(solver, true, false);
        solver.findAllSolutions();
    }

    @Test(groups = "1s")
    public void testtree() {
        Solver solver = new Solver();
View Full Code Here

Examples of solver.Solver.findAllSolutions()

        Solver solver = new Solver();
        IntVar[] VS = VF.enumeratedArray("VS", 4, 0, 4, solver);
        IntVar NT = VF.enumerated("NT", 2, 3, solver);
        solver.post(ICF.tree(VS, NT, 0));
        SMF.log(solver, true, false);
        solver.findAllSolutions();
    }

    @Test(groups = "1s")
    public void testtsp() {
        Solver solver = new Solver();
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.