Examples of SetVar


Examples of solver.variables.SetVar

        ,VF.fixed(2,s)
        ,VF.fixed(5, s)
        ,VF.fixed(0,s)
        ,VF.fixed(2,s)
    };
    SetVar values = VF.fixed("values", new int[]{0,1,4},s);
    s.post(SCF.int_values_union(x,values));
    SMF.log(s, true, false);
    s.set(ISF.lexico_LB(x));
    s.findAllSolutions();
    Assert.assertEquals(s.getMeasures().getSolutionCount(), 0);
View Full Code Here

Examples of solver.variables.SetVar

        ,VF.fixed(2,s)
        ,VF.fixed(5, s)
        ,VF.fixed(0,s)
        ,VF.fixed(2,s)
    };
    SetVar values = VF.set("values", -1, 6, s);
    s.post(SCF.int_values_union(x, values));
    SMF.log(s, true, false);
    s.set(ISF.lexico_LB(x));
    s.findAllSolutions();
    System.out.println(values);
View Full Code Here

Examples of solver.variables.SetVar

        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.union(S, U));

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

Examples of solver.variables.SetVar

        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.intersection(S, U));

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

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

Examples of solver.variables.SetVar

    }

    @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

Examples of solver.variables.SetVar

    }

    @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

Examples of solver.variables.SetVar

    }

    @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

Examples of solver.variables.SetVar

    }

    @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

Examples of solver.variables.SetVar

    @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
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.