Hi. I am new to the most parts of GAMS and I couldn’t figure out how to write a constraint.
- I have a set i and its alias j.
- I also have set k.
- The variable is y(i,j,k).
- I have a parameter of p(j) and a scalar M.
- The constraint is for every j and k, and goes as this
y(i,j,k)= M- p(k)* ( y(1,j,k)+y(2,j,k)+…+y(i-1,j,k) ) - p(k)*( y(j,1,k)+y(j,2,k)+…+y(j,i-1,k) )
How can I code this cumulative sum?