Package solver.constraints.nary.sum

Examples of solver.constraints.nary.sum.PropSumEq


                    bvars[i] = (BoolVar) VARS[i];
                }
                return sum(bvars, OPERATOR, SUM);
            }
            if (OPERATOR.equals("=")) {
                return new Constraint("Sum", new PropSumEq(VARS, SUM));
            }
            int lb = 0;
            int ub = 0;
            for (IntVar v : VARS) {
                lb += v.getLB();
                ub += v.getUB();
            }
            IntVar p = VF.bounded(StringUtils.randomName(), lb, ub, SUM.getSolver());
            SUM.getSolver().post(new Constraint("Sum", new PropSumEq(VARS, p)));
            return arithm(p, OPERATOR, SUM);
        }
    }
View Full Code Here

TOP

Related Classes of solver.constraints.nary.sum.PropSumEq

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.