Package com.exigen.ie.constrainer

Examples of com.exigen.ie.constrainer.IntBoolExp


  public IfThen(javax.constraints.Constraint c1, javax.constraints.Constraint c2) {
    super(c1.getProblem());
    com.exigen.ie.constrainer.Constraint myC1 = (com.exigen.ie.constrainer.Constraint)c1.getImpl();
    com.exigen.ie.constrainer.Constraint myC2 = (com.exigen.ie.constrainer.Constraint)c2.getImpl();
    IntBoolExp b1 = myC1.toIntBoolExp();
    if (b1 == null)
      throw new RuntimeException("Constraint " + c1.getName()
          + " cannot be used inside ifThen");
    IntBoolExp b2 = myC2.toIntBoolExp();
    if (b2 == null)
      throw new RuntimeException("Constraint " + c2.getName()
          + " cannot be used inside ifThen");
    setImpl(myC1.constrainer().addConstraint(b1.implies(b2)));
    setName("ifThen");
View Full Code Here


    if (myC1 == null)
      error(c1);
    Object myC2 = c2.getImpl();
    if (myC2 == null)
      error(c2);
    IntBoolExp b1 = ((com.exigen.ie.constrainer.Constraint)myC1).toIntBoolExp();
    if (b1 == null)
      error(c1);
    IntBoolExp b2 = ((com.exigen.ie.constrainer.Constraint)myC2).toIntBoolExp();
    if (b2 == null)
      error(c2);
    IntBoolExp newConstraint;
    newConstraint = b1.or(b2);
    Problem p = (Problem)c1.getProblem();
    setImpl(p.getConstrainer().addConstraint(newConstraint));
  }
View Full Code Here

  public void storeToXML(OutputStream os, String comment) throws Exception {
    // TODO
  }
 
  public void defineConstraintImpl(Constraint constraint, IntExp constrainerVar, String oper, Var var) {
    IntBoolExp exp;
    IntExp cvar = (IntExp) var.getImpl();
    Oper op = stringToOper(oper);
    switch (op) {
    case EQ:
      exp = constrainerVar.eq(cvar);
View Full Code Here

    }
    constraint.setImpl(constrainerVar.constrainer().addConstraint(exp));
  }
 
  public void defineConstraintImpl(Constraint constraint, IntExp constrainerVar, String oper, int value) {
    IntBoolExp exp;
    Oper op = stringToOper(oper);
    switch (op) {
    case EQ:
      exp = constrainerVar.eq(value);
      break;
View Full Code Here

    if (myC1 == null)
      error(c1);
    Object myC2 = c2.getImpl();
    if (myC2 == null)
      error(c2);
    IntBoolExp b1 = ((com.exigen.ie.constrainer.Constraint)myC1).toIntBoolExp();
    if (b1 == null)
      error(c1);
    IntBoolExp b2 = ((com.exigen.ie.constrainer.Constraint)myC2).toIntBoolExp();
    if (b2 == null)
      error(c2);
    IntBoolExp newConstraint;
    newConstraint = b1.and(b2);
    Problem p = (Problem)c1.getProblem();
    setImpl(p.getConstrainer().addConstraint(newConstraint));
  }
View Full Code Here

TOP

Related Classes of com.exigen.ie.constrainer.IntBoolExp

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.