Dimension error when summing

Hi all!

I am trying to compute the Leontief coefficients (io) for several industries (j). The initial function is:

 io(j)           = SUM[(i),DIO(i,j)]/XSTO(j)

However, I only want to take into account a subset of the commodities (i) that correspond to non-energy products. I have created a subset of i called NENI. With this in mind, I have tried to modify the code as follows:

 io(j)           = SUM[(i, NENI),DIO(i,NENI,j)]/XSTO(j)

But GAMS returns that there is a domain violation and it highlights “,j)]” of the equation above. I’m obviously missing something, but I’m not sure what. For me, the dimensions are respected, I’m just telling GAMS to overlook the energy sector in the sum. Can anyone help me? Thanks!

This is a question that can only be answered with more context. Post the entire model with data (or isolate the problem in an example that shows the error) so we have a chance to reproduce the issue and help you.

-Michael