// // sum(a[i].x[i]) >= c // package weeSeepy.constraints; import weeSeepy.problem.*; import weeSeepy.variables.*; public class SumGEQ extends Constraint { int c, n; int[] a; IntVar[] x; public SumGEQ(Problem pb, int[] a, IntVar[] x, int c){ super(pb); this.c = c; this.a = a; this.x = x; this.n = x.length; name = "SumGEQ (with c = "+ c +"): "; addVariables(x); assert allPositive() : "all coeffs must be > 0 "+ this; } public void propagate(){ int sumOfMaxs = 0; for (int i=0;i