Package choco.kernel.model.constraints

Examples of choco.kernel.model.constraints.Constraint


                if (lowerbound > 0)
                    model.addConstraint(geq(intExp, lowerbound));
            }
        }
        else if (lit0 instanceof LinearLiteral) {
            Constraint cnstr = getConstraint(((LinearLiteral) lit0).getLinearInequality());
//            System.out.println("cnstr = " + cnstr.pretty());
            model.addConstraint(cnstr);
        }
        else
            throw new UnsupportedOperationException();
View Full Code Here


            if (unexp.getOperator() instanceof N) {
                IntegerExpressionVariable arg = getExpression(unexp.getArgument());
                return plus(totalNumberOfDegrees, mult(arg, -1));
            }
            else if(unexp.getOperator() instanceof NM){
                Constraint cnstr = lt(0,getExpression(unexp.getArgument()));
                return ifThenElse(cnstr,new IntegerConstantVariable(0),new IntegerConstantVariable(totalNumberOfDegrees));
            }
            else
                throw new UnsupportedOperationException();
        }
View Full Code Here

                if (lowerbound > 0)
                    model.addConstraint(geq(intExp, lowerbound));
            }
        }
        else if (lit0 instanceof LinearLiteral){
            Constraint cnstr = getConstraint(((LinearLiteral) lit0).getLinearInequality());
//            System.out.println("cnstr = " + cnstr.pretty());
            model.addConstraint(cnstr);
            }
        else
            throw new UnsupportedOperationException();
View Full Code Here

            if (unexp.getOperator() instanceof N) {
                IntegerExpressionVariable arg = getExpression(unexp.getArgument());
                return plus(numberOfDegrees, mult(arg, -1));
            }
            else if(unexp.getOperator() instanceof NM){
                Constraint cnstr = lt(0,getExpression(unexp.getArgument()));
                return ifThenElse(cnstr,new IntegerConstantVariable(0),new IntegerConstantVariable(numberOfDegrees));
            }
            else
                throw new UnsupportedOperationException();
        }
View Full Code Here

                if (lowerbound > 0)
                    model.addConstraint(geq(intExp, lowerbound));
            }
        }
        else if (lit0 instanceof LinearLiteral) {
            Constraint cnstr = getConstraint(((LinearLiteral) lit0).getLinearInequality());
//            System.out.println("cnstr = " + cnstr.pretty());
            model.addConstraint(cnstr);
        }
        else
            throw new UnsupportedOperationException();
View Full Code Here

            if (unexp.getOperator() instanceof N) {
                IntegerExpressionVariable arg = getExpression(unexp.getArgument());
                return plus(totalNumberOfDegrees, mult(arg, -1));
            }
            else if(unexp.getOperator() instanceof NM){
                Constraint cnstr = lt(0,getExpression(unexp.getArgument()));
                return ifThenElse(cnstr,new IntegerConstantVariable(0),new IntegerConstantVariable(totalNumberOfDegrees));
            }
            else
                throw new UnsupportedOperationException();
        }
View Full Code Here

   
   
    // constraints
    // repartition sur les plages horaires
    // les creneaux a placer ne doivent pas l'etre en meme temps
    Constraint c1 = Choco.disjunctive(creneauxAPlacer)
    m.addConstraint(c1);
   
    // precedences
    Constraint[] c2 = new Constraint[preced.length];
    for(int i = 0; i < c2.length; i++) {
View Full Code Here

TOP

Related Classes of choco.kernel.model.constraints.Constraint

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.