Package solver.explanations

Examples of solver.explanations.ValueRemoval


    @Override
    public void explain(Deduction d, Explanation e) {
        e.add(solver.getExplainer().getPropagatorActivation(this));
        e.add(this);
        if (d != null && d.getmType() == Deduction.Type.ValRem) {
            ValueRemoval vr = (ValueRemoval) d;
            IntVar var = (IntVar) vr.getVar();
            int val = vr.getVal();
            // 1. find the pos of var in vars
            boolean ispos;
            if (pos < (l / 2)) {
                int i;
                for (i = 0; i < pos && vars[i].getId() != var.getId(); i++) {
View Full Code Here


    @Override
    public void explain(Deduction d, Explanation e) {
        e.add(solver.getExplainer().getPropagatorActivation(this));
        e.add(this);
        if (d != null && d.getmType() == Deduction.Type.ValRem) {
            ValueRemoval vr = (ValueRemoval) d;
            IntVar var = (IntVar) vr.getVar();
            int val = vr.getVal();
            TIntList nogoods = vars2nogood.get(var.getId());
            TIntList indices = vars2idxinng.get(var.getId());
            for (int i = 0; i < nogoods.size(); i++) {
                INogood ng = allnogoods.get(nogoods.get(i));
                int idx = indices.get(i);
View Full Code Here

    @Override
    public void explain(Deduction d, Explanation e) {
        e.add(solver.getExplainer().getPropagatorActivation(this));
        e.add(this);
        if (d != null && d.getmType() == Deduction.Type.ValRem) {
            ValueRemoval vr = (ValueRemoval) d;
            IntVar var = (IntVar) vr.getVar();
            int val = vr.getVal();
            // 1. find the pos of var in vars
            boolean ispos = vars[n].getId() != var.getId();
            if (val < var.getLB()) { // explain LB
                for (int i = 0; i < n; i++) { // first the positive coefficients
                    if (vars[i] != var) {
View Full Code Here

TOP

Related Classes of solver.explanations.ValueRemoval

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.