Package solver.constraints.reification

Examples of solver.constraints.reification.PropConditionnal


        final IntVar X = VariableFactory.enumerated("X", 1, 2, solver);
        final IntVar Y = VariableFactory.enumerated("Y", 1, 2, solver);
        final IntVar Z = VariableFactory.enumerated("Z", 1, 2, solver);

        solver.post(new Constraint("Conditionnal",
                new PropConditionnal(new IntVar[]{X, Y, Z},
                        new Constraint[]{IntConstraintFactory.arithm(X, "=", Y), IntConstraintFactory.arithm(Y, "=", Z)},
                        new Constraint[]{}) {
                    @Override
                    public ESat checkCondition() {
                        int nbNode = (int) solver.getMeasures().getNodeCount();
View Full Code Here


        final Solver solver = new Solver();
        final IntVar iv = VF.enumerated("iv", 0, 10, solver);
        solver.post(ICF.arithm(iv, ">=", 2));

        solver.post(new Constraint("Conditionnal",
                new PropConditionnal(new IntVar[]{iv},
                        new Constraint[]{ICF.arithm(iv, ">=", 4)},
                        new Constraint[]{solver.TRUE}) {
                    @Override
                    public ESat checkCondition() {
                        int nbNode = (int) solver.getMeasures().getNodeCount();
View Full Code Here

TOP

Related Classes of solver.constraints.reification.PropConditionnal

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.