my model has the following constraint:

s(i,j)*x(j)+sum((m,t_), MW(i,j,m,t_)*y(j,m,t_))+sum((k,t_),MWK(i,j,k,t_))+dM(i,j,t)-dP(i,j,t)=B(i,t)

The index domain is: (i,j,t)

I want the system to accumulate all MWK(i,j,k,t_) respectively all MW(i,j,m,t_)*y(j,m,t_) from t_0 until t_=t and then to add this solution to s(i,j)*x(j). Because t (periods) is already in the index domain I defined a second index t_ in the period set. Unfortunately the system sums up all MWK(i,j,k,t_) over all periods and add this in every t. So if there is a MWK(1,1,1,5)=1 then the system adds this also in t=0.

Is there any possibility to determine that the sum should start at t_=0 and end in t_=t?

Thanks in advance!

**Best answer by deannezhang**