Package solver.variables

Examples of solver.variables.SetVar


    }

    @Test(groups = "1s")
    public void test64() {
        Solver solver = new Solver("Choco");
        SetVar U = VF.set("U", new int[]{2, 3}, solver);
        IntVar I = VF.enumerated("I", 1, 4, solver);

        solver.post(SCF.cardinality(U, I));

        Solver copy = solver.duplicateModel();
View Full Code Here


    }

    @Test(groups = "1s")
    public void test67() {
        Solver solver = new Solver("Choco");
        SetVar U = VF.set("U", new int[]{2, 3}, solver);

        solver.post(SCF.notEmpty(U));

        Solver copy = solver.duplicateModel();
View Full Code Here

    }

    @Test(groups = "1s")
    public void test68() {
        Solver solver = new Solver("Choco");
        SetVar U = VF.set("U", new int[]{2, 3}, solver);
        IntVar I = VF.enumerated("I", 1, 4, solver);

        solver.post(SCF.sum(U, I, false));

        Solver copy = solver.duplicateModel();
View Full Code Here

    }

    @Test(groups = "1s")
    public void test69() {
        Solver solver = new Solver("Choco");
        SetVar U = VF.set("U", new int[]{2, 3}, solver);
        IntVar I = VF.enumerated("I", 1, 4, solver);

        solver.post(SCF.max(U, I, false));

        Solver copy = solver.duplicateModel();
View Full Code Here

    }

    @Test(groups = "1s")
    public void test70() {
        Solver solver = new Solver("Choco");
        SetVar U = VF.set("U", new int[]{2, 3}, solver);
        IntVar I = VF.enumerated("I", 1, 4, solver);

        solver.post(SCF.min(U, I, false));

        Solver copy = solver.duplicateModel();
View Full Code Here

    @Test(groups = "1s")
    public void test71() {
        Solver solver = new Solver("Choco");
        BoolVar[] bvars = VF.boolArray("b", 4, solver);
        SetVar U = VF.set("U", new int[]{2, 3}, solver);

        solver.post(SCF.bool_channel(bvars, U, 1));

        Solver copy = solver.duplicateModel();
View Full Code Here

    }

    @Test(groups = "1s")
    public void test73() {
        Solver solver = new Solver("Choco");
        SetVar U = VF.set("U", new int[]{2, 3}, solver);
        SetVar V = VF.set("V", new int[]{1, 2, 3}, solver);

        solver.post(SCF.disjoint(U, V));

        Solver copy = solver.duplicateModel();
View Full Code Here

        Solver solver = new Solver("Choco");
        SetVar[] S = new SetVar[4];
        for (int i = 0; i < S.length; i++) {
            S[i] = VF.set("S_" + i, new int[]{1, 2, 3, 4}, solver);
        }
        SetVar U = VF.set("U", new int[]{2, 3}, solver);
        solver.post(SCF.partition(S, U));

        Solver copy = solver.duplicateModel();

        solver.findAllSolutions();
View Full Code Here

        SetVar[] S = new SetVar[2];
        for (int i = 0; i < S.length; i++) {
            S[i] = VF.set("S_" + i, new int[]{1, 2, 3, 4}, solver);
        }
        IntVar I = VF.enumerated("I", 1, 5, solver);
        SetVar T = VF.set("T", 1, 3, solver);

        solver.post(SCF.element(I, S, 1, T));

        Solver copy = solver.duplicateModel();
View Full Code Here

        Solver solver = new Solver("Choco");
        SetVar[] S = new SetVar[2];
        for (int i = 0; i < S.length; i++) {
            S[i] = VF.set("S_" + i, new int[]{1, 2, 3, 4}, solver);
        }
        SetVar T = VF.set("T", 1, 3, solver);

        solver.post(SCF.member(S, T));

        Solver copy = solver.duplicateModel();
View Full Code Here

TOP

Related Classes of solver.variables.SetVar

Copyright © 2018 www.massapicom. 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.