Dimension error when summing

Problems with syntax of GAMS
Post Reply
acr31
User
User
Posts: 7
Joined: 5 months ago

Dimension error when summing

Post by acr31 » 3 months ago

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!

User avatar
bussieck
Moderator
Moderator
Posts: 832
Joined: 6 years ago

Re: Dimension error when summing

Post by bussieck » 3 months ago

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

Post Reply