Examples of updateUpperBound()


Examples of solver.explanations.antidom.AntiDomInterval.updateUpperBound()

            Assert.assertFalse(ad.get(i));
        }
        solver.getEnvironment().worldPush();
        ad.updateLowerBound(1, 4);
        ad.updateLowerBound(4, 5);
        ad.updateUpperBound(10, 7);
        Assert.assertTrue(ad.get(1));
        Assert.assertTrue(ad.get(2));
        Assert.assertTrue(ad.get(3));
        Assert.assertTrue(ad.get(4));
        Assert.assertFalse(ad.get(5));
View Full Code Here

Examples of solver.explanations.antidom.AntiDomain.updateUpperBound()

            // PREREQUISITE: val is the new UB, so val+1 is the one explained
            val++;
            if (!invdom.get(val)) {
                explainValueRemoval(var, val, cause);
                // we add -1, because val is the value just AFTER the new LB
                invdom.updateUpperBound(old, val - 1);
            }
        }
    }

View Full Code Here

Examples of solver.explanations.antidom.AntiDomain.updateUpperBound()

            }
        } else {
            if (val < oldLB) {
                // domain wipe out
                explainValueRemoval(var, oldLB, cause);
                invdom.updateUpperBound(oldUB, oldLB - 1);
            } else if (val > oldUB) {
                // domain wipe out
                explainValueRemoval(var, oldUB, cause);
                invdom.updateLowerBound(oldLB, oldUB + 1);
            } else {
View Full Code Here

Examples of solver.explanations.antidom.AntiDomain.updateUpperBound()

                    explainValueRemoval(var, val - 1, cause);
                    invdom.updateLowerBound(oldLB, val);
                }
                if (val < oldUB && !invdom.get(val)) {
                    explainValueRemoval(var, val + 1, cause);
                    invdom.updateUpperBound(oldUB, val);
                }
            }
        }
    }
View Full Code Here

Examples of solver.explanations.antidom.AntiDomain.updateUpperBound()

            Assert.assertFalse(ad.get(i));
        }
        solver.getEnvironment().worldPush();
        ad.updateLowerBound(1, 4);
        ad.updateLowerBound(4, 5);
        ad.updateUpperBound(10, 7);
        Assert.assertTrue(ad.get(1));
        Assert.assertTrue(ad.get(2));
        Assert.assertTrue(ad.get(3));
        Assert.assertTrue(ad.get(4));
        Assert.assertFalse(ad.get(5));
View Full Code Here

Examples of solver.variables.IntVar.updateUpperBound()

                    } else {
                        break;
                    }
                }
                v.updateLowerBound(newLB, this);
                v.updateUpperBound(newUB, this);
                if (v.isInstantiated()) {
                    poss.remove(i);
                    nbSure.add(1);
                }
            }
View Full Code Here

Examples of solver.variables.IntVar.updateUpperBound()

        int nbCounters = pi.getNbResources();
        for (int i = 0; i < nbCounters; i++) {
            IntVar z = this.z[i];
            Bounds bounds = counters.get(i).bounds();
            z.updateLowerBound(bounds.min.value, aCause);//, false);
            z.updateUpperBound(bounds.max.value, aCause);//, false);

        }
    }

    private void delayedBoundUpdate() throws ContradictionException {
View Full Code Here

Examples of solver.variables.IntVar.updateUpperBound()

                    } else {
                        break;
                    }
                }
                v.updateLowerBound(newLB, this);
                v.updateUpperBound(newUB, this);
                if (newLB > values[values.length - 1] || newUB < values[0]) {
                    poss.remove(i);
                }
            }
        }
View Full Code Here

Examples of solver.variables.IntVar.updateUpperBound()

                }
                poss.remove(i);
                nbSure.add(1);
            } else {
                v.updateLowerBound(values[0], this);
                v.updateUpperBound(values[values.length - 1], this);
                int newLB = v.getLB();
                int newUB = v.getUB();
                for (int val = v.getLB(); val <= newUB; val = v.nextValue(val)) {
                    if (!setValues.contains(val)) {
                        newLB = val + 1;
View Full Code Here

Examples of solver.variables.IntVar.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.