Package solver.variables.events

Examples of solver.variables.events.IntEventType


            if (Configuration.PLUG_EXPLANATION) {
                solver.getExplainer().removeValue(this, value, cause);
            }
            this.contradiction(cause, IntEventType.REMOVE, MSG_REMOVE);
        } else if (inf == value || value == sup) {
      IntEventType e;
            if (value == inf) {
                if (reactOnRemoval) {
                    delta.add(value, value, cause);
                }
                SIZE.add(-1);
View Full Code Here


                }
                this.contradiction(cause, IntEventType.INSTANTIATE, MSG_INST);
            }
            return false;
        } else if (contains(value)) {
      IntEventType e = IntEventType.INSTANTIATE;

            int lb = 0;
            int ub = 0;
            if (reactOnRemoval) {
                lb = this.LB.get();
View Full Code Here

                if (Configuration.PLUG_EXPLANATION) {
                    solver.getExplainer().updateLowerBound(this, old, oub + 1, cause);
                }
                this.contradiction(cause, IntEventType.INCLOW, MSG_LOW);
            } else {
        IntEventType e = IntEventType.INCLOW;

                if (reactOnRemoval) {
                    if (old <= value - 1) delta.add(old, value - 1, cause);
                }
                SIZE.add(old - value);
View Full Code Here

                if (Configuration.PLUG_EXPLANATION) {
                    solver.getExplainer().updateUpperBound(this, old, olb - 1, cause);
                }
                this.contradiction(cause, IntEventType.DECUPP, MSG_UPP);
            } else {
        IntEventType e = IntEventType.DECUPP;

                if (reactOnRemoval) {
                    if (value + 1 <= old) delta.add(value + 1, old, cause);
                }
                SIZE.add(value - old);
View Full Code Here

    public boolean removeValue(int value, ICause cause) throws ContradictionException {
        assert cause != null;
        int inf = getLB();
        int sup = getUB();
        if (inf <= value && value <= sup) {
      IntEventType e = IntEventType.REMOVE;

            boolean done = var.removeValue(value, this);
            if (done) {
                if (value == inf) {
                    e = IntEventType.INCLOW;
View Full Code Here

    @Override
    public boolean updateLowerBound(int value, ICause cause) throws ContradictionException {
        assert cause != null;
        int old = this.getLB();
        if (old < value) {
      IntEventType e = IntEventType.INCLOW;
            boolean done = var.updateLowerBound(value, this);
            if (isInstantiated()) {
                e = IntEventType.INSTANTIATE;
            }
            if (done) {
View Full Code Here

    @Override
    public boolean updateUpperBound(int value, ICause cause) throws ContradictionException {
        assert cause != null;
        int old = this.getUB();
        if (old > value) {
      IntEventType e = IntEventType.DECUPP;
            boolean done = var.updateUpperBound(value, this);
            if (isInstantiated()) {
                e = IntEventType.INSTANTIATE;
            }
            if (done) {
View Full Code Here

        assert cause != null;
        if (value % cste == 0) {
            int inf = getLB();
            int sup = getUB();
            if (inf <= value && value <= sup) {
        IntEventType e = IntEventType.REMOVE;

                boolean done = var.removeValue(value / cste, this);
                if (done) {
                    if (value == inf) {
                        e = IntEventType.INCLOW;
View Full Code Here

    @Override
    public boolean updateLowerBound(int value, ICause cause) throws ContradictionException {
        assert cause != null;
        int old = this.getLB();
        if (old < value) {
      IntEventType e = IntEventType.INCLOW;
            boolean done = var.updateLowerBound(MathUtils.divCeil(value, cste), this);
            if (isInstantiated()) {
                e = IntEventType.INSTANTIATE;
            }
            if (done) {
View Full Code Here

    @Override
    public boolean updateUpperBound(int value, ICause cause) throws ContradictionException {
        assert cause != null;
        int old = this.getUB();
        if (old > value) {
      IntEventType e = IntEventType.DECUPP;
            boolean done = var.updateUpperBound(MathUtils.divFloor(value, cste), this);
            if (isInstantiated()) {
                e = IntEventType.INSTANTIATE;
            }
            if (done) {
View Full Code Here

TOP

Related Classes of solver.variables.events.IntEventType

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.