Package solver.variables

Examples of solver.variables.Variable


    @Override
    public void explain(Deduction d, Explanation e) {
        e.add(solver.getExplainer().getPropagatorActivation(this));
        e.add(aCause);
        // the current deduction is due to the current domain of the involved variables
        Variable var = d.getVar();
        if (var.equals(x)) {
            // a deduction has been made on x ; this is related to y only
            y.explain(VariableState.LB, e);
        } else if (var.equals(y)) {
            x.explain(VariableState.UB, e);
        } else {
            super.explain(d, e);
        }
    }
View Full Code Here


    }

    @Override
    public void explain(Deduction d, Explanation e) {
        e.add(solver.getExplainer().getPropagatorActivation(this));
        Variable reason = (d.getVar() == vars[0]) ? vars[1] : vars[0];
        reason.explain(VariableState.DOM, e);
        e.add(aCause);
    }
View Full Code Here

    @Override
    public void explain(Deduction d, Explanation e) {
        e.add(solver.getExplainer().getPropagatorActivation(this));
        e.add(aCause);
        // the current deduction is due to the current domain of the involved variables
        Variable var = d.getVar();
        if (var.equals(x)) {
            // a deduction has been made on x ; this is related to y only
            y.explain(VariableState.UB, e);
        } else if (var.equals(y)) {
            x.explain(VariableState.UB, e);
        } else {
            super.explain(d, e);
        }
    }
View Full Code Here

    }

    @Override
    public void explain(Deduction d, Explanation e) {
        e.add(solver.getExplainer().getPropagatorActivation(this));
        Variable var = d.getVar();
        if (var.equals(x)) {
            // a deduction has been made on x ; this is related to y only
            y.explain(VariableState.DOM, e);
        } else if (var != null) {
            x.explain(VariableState.DOM, e);
        }
View Full Code Here

    public String toString() {
        StringBuilder sb = new StringBuilder(32);
        sb.append("Regular@").append(_num).append("(");
        for (int i = 0; i < vars.length; i++) {
            if (i > 0) sb.append(", ");
            Variable var = vars[i];
            sb.append(var.getName());
        }
        sb.append(")");
        //        sb.append(propagators[0].toString());
        return sb.toString();
    }
View Full Code Here

                int pidx = props[j].getId();
                int prio = props[j].getPriority().priority;
                //System.out.printf("%s\n", props[j]);
                vars = props[j].getVars();
                for (int k = 0; k < vars.length; k++) {
                    Variable var = retrieveVar(vars[k]);
                    matrix[p2idx.get(pidx)][v2idx.get(var.getId())] = prio;
                }
            }
        }
        StringBuilder st = new StringBuilder();
        switch (type) {
View Full Code Here

    @Override
    public void explain(Deduction d, Explanation e) {
        e.add(solver.getExplainer().getPropagatorActivation(this));
        e.add(aCause);
        // the current deduction is due to the current domain of the involved variables
        Variable var = d.getVar();
        if (var.equals(x)) {
            // a deduction has been made on x ; this is related to y only
            y.explain(VariableState.LB, e);
        } else if (var.equals(y)) {
            x.explain(VariableState.UB, e);
        } else {
            super.explain(d, e);
        }
    }
View Full Code Here

    @Override
    public void explain(Deduction d, Explanation e) {
        e.add(solver.getExplainer().getPropagatorActivation(this));
        e.add(aCause);
        Variable reason = (d.getVar() == vars[0]) ? vars[1] : vars[0];
        reason.explain(VariableState.DOM, e);
    }
View Full Code Here

    @Override
    public void explain(Deduction d, Explanation e) {
        e.add(solver.getExplainer().getPropagatorActivation(this));
        e.add(aCause);
        // the current deduction is due to the current domain of the involved variables
        Variable var = d.getVar();
        if (var.equals(x)) {
            // a deduction has been made on x ; this is related to y only
            y.explain(VariableState.LB, e);
        } else if (var.equals(y)) {
            x.explain(VariableState.UB, e);
        } else {
            super.explain(d, e);
        }
    }
View Full Code Here

    public void init() throws ContradictionException {
    }

    @Override
    public Decision getDecision() {
        Variable decVar = firstNotInst(testingSet, 0, cIdx);
        if (decVar == null) {
            if (candidate != null && !candidate.isInstantiated()) {
                testingSet[cIdx++] = candidate;
                decVar = candidate;
            } else {
View Full Code Here

TOP

Related Classes of solver.variables.Variable

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.