I have a condition where I need to sum over the next 5 elements of a set.
My condition is: sum(neighbor(x)) = 1 w.r.t x, from x+1 to x+5
Equation has_1_neighbor(x);
has_1_neighbor(x).. Sum(x,x + 1,x+5,neighbor(x)) =e= 1;
Unfortunately since I need to have x in the domain of the equation I'm not really allowed to sum with regards to x.
Does anyone know how to implement a constraint like this?