Page 1 of 1

Dimension error when summing

Posted: Fri Jun 24, 2022 2:23 pm
by acr31
Hi all!

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

Code: Select all

 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:

Code: Select all

 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!

Re: Dimension error when summing

Posted: Sat Jun 25, 2022 7:26 am
by bussieck
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