How do you use a where condition in a sum with two indices?

Hello,

I have to model an equation that includes this sum: SUM((t,a),z[k,a,i,t]), where the subsets are t=[u,l] anda=[1,sl-1], while in the general case t=[1,T] and a=[0,sl]. I tried to model it, but I keep getting errors. If you can help me, I would really appreciate it.

Thanks in advance.

You can use the .where condition on a Domain. See Conditions and Assignments — GAMSPy documentation for more explanation.