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);
}
}