Examples of updateLowerBound()


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

        AntiDomain ad = new AntiDomInterval(v);
        for (int i = 1; i < 11; i++) {
            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));
View Full Code Here

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

        for (int i = 1; i < 11; i++) {
            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));
View Full Code Here

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

            // PREREQUISITE: val is the new LB, 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 BEFORE the new LB
                invdom.updateLowerBound(old, val + 1);
            }
        }
    }

    @Override
View Full Code Here

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

                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 {
                if (val > oldLB && !invdom.get(val)) {
                    explainValueRemoval(var, val - 1, cause);
                    invdom.updateLowerBound(oldLB, val);
                }
View Full Code Here

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

                explainValueRemoval(var, oldUB, cause);
                invdom.updateLowerBound(oldLB, oldUB + 1);
            } else {
                if (val > oldLB && !invdom.get(val)) {
                    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.updateLowerBound()

        AntiDomain ad = new AntiDomInterval(v);
        for (int i = 1; i < 11; i++) {
            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));
View Full Code Here

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

        for (int i = 1; i < 11; i++) {
            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));
View Full Code Here

Examples of solver.variables.IntVar.updateLowerBound()

        List<ICounter> counters = pi.getCounters();
        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);

        }
    }
View Full Code Here

Examples of solver.variables.IntVar.updateLowerBound()

                        newUB = val - 1;
                    } 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.updateLowerBound()

                    }
                }
                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)) {
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.