Examples of updateUpperBound()


Examples of solver.variables.IntVar.updateUpperBound()

        for(int i=0;i<n;i++) {
          IntVar intVar = intVars[i];
          RealVar realVar = realVars[i];
          realVar.updateBounds((double) intVar.getLB() - epsilon, (double) intVar.getUB() + epsilon, aCause);
          intVar.updateLowerBound((int) Math.ceil(realVar.getLB() - epsilon), aCause);
          intVar.updateUpperBound((int) Math.floor(realVar.getUB() + epsilon), aCause);
          if (intVar.hasEnumeratedDomain()) {
            realVar.updateBounds((double) intVar.getLB() - epsilon, (double) intVar.getUB() + epsilon, aCause);
          }
        }
      }
View Full Code Here

Examples of solver.variables.IntVar.updateUpperBound()

      IntVar y = vars[j];
      while (x.getLB() != y.getLB() || x.getUB() != y.getUB()) {
        x.updateLowerBound(y.getLB(), aCause);
        x.updateUpperBound(y.getUB(), aCause);
        y.updateLowerBound(x.getLB(), aCause);
        y.updateUpperBound(x.getUB(), aCause);
      }
      if (x.hasEnumeratedDomain() && y.hasEnumeratedDomain()) {
        int ub = x.getUB();
        for (int val = x.getLB(); val <= ub; val = x.nextValue(val)) {
          if (!y.contains(val)) {
View Full Code Here

Examples of solver.variables.IntVar.updateUpperBound()

        if (objective.getSolver().getMeasures().getSolutionCount() > 0 && strict) {
          offset = 1;
        }
        IntVar io = (IntVar) objective;
        if (policy == ResolutionPolicy.MINIMIZE) {
          io.updateUpperBound(bestProvedUB.intValue() - offset, this);
          io.updateLowerBound(bestProvedLB.intValue(), this);
        } else {
          io.updateUpperBound(bestProvedUB.intValue(), this);
          io.updateLowerBound(bestProvedLB.intValue() + offset, this);
        }
View Full Code Here

Examples of solver.variables.IntVar.updateUpperBound()

        IntVar io = (IntVar) objective;
        if (policy == ResolutionPolicy.MINIMIZE) {
          io.updateUpperBound(bestProvedUB.intValue() - offset, this);
          io.updateLowerBound(bestProvedLB.intValue(), this);
        } else {
          io.updateUpperBound(bestProvedUB.intValue(), this);
          io.updateLowerBound(bestProvedLB.intValue() + offset, this);
        }
      } else {
        double offset = 0;
        if (objective.getSolver().getMeasures().getSolutionCount() > 0 && strict) {
View Full Code Here

Examples of solver.variables.IntVar.updateUpperBound()

        if (objective.getSolver().getMeasures().getSolutionCount() > 0 && strict) {
          offset = precision;
        }
        RealVar io = (RealVar) objective;
        if (policy == ResolutionPolicy.MINIMIZE) {
          io.updateUpperBound(bestProvedUB.doubleValue() - offset, this);
          io.updateLowerBound(bestProvedLB.doubleValue(), this);
        } else {
          io.updateUpperBound(bestProvedUB.doubleValue(), this);
          io.updateLowerBound(bestProvedLB.doubleValue() + offset, this);
        }
View Full Code Here

Examples of solver.variables.RealVar.updateUpperBound()

        if (objective.getSolver().getMeasures().getSolutionCount() > 0 && strict) {
          offset = precision;
        }
        RealVar io = (RealVar) objective;
        if (policy == ResolutionPolicy.MINIMIZE) {
          io.updateUpperBound(bestProvedUB.doubleValue() - offset, this);
          io.updateLowerBound(bestProvedLB.doubleValue(), this);
        } else {
          io.updateUpperBound(bestProvedUB.doubleValue(), this);
          io.updateLowerBound(bestProvedLB.doubleValue() + offset, this);
        }
View Full Code Here

Examples of solver.variables.RealVar.updateUpperBound()

        RealVar io = (RealVar) objective;
        if (policy == ResolutionPolicy.MINIMIZE) {
          io.updateUpperBound(bestProvedUB.doubleValue() - offset, this);
          io.updateLowerBound(bestProvedLB.doubleValue(), this);
        } else {
          io.updateUpperBound(bestProvedUB.doubleValue(), this);
          io.updateLowerBound(bestProvedLB.doubleValue() + offset, this);
        }
      }
    }
  }
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.