Error: overflow in + operation (addop)

Problems with syntax of GAMS
Post Reply
Jarenka
User
User
Posts: 50
Joined: 1 year ago

Error: overflow in + operation (addop)

Post by Jarenka » 3 weeks ago

Dear,

I posted a question in archive here: viewtopic.php?f=13&t=8650&p=25722#p25722

I have a problem with solving the overflow in an equation that contains just summation over three dimensions.

I need this variable, because it is used in the model.

Do you have any ideas, how to solve it?

Best
Jarenka

Fred
Posts: 151
Joined: 2 years ago

Re: Error: overflow in + operation (addop)

Post by Fred » 4 days ago

I replied to your question directly in the archive.

Fred

Jarenka
User
User
Posts: 50
Joined: 1 year ago

Re: Error: overflow in + operation (addop)

Post by Jarenka » 4 days ago

Hi,

it seems that the result of the assignment statement is > 1E300 which causes an overflow. Are you sure that you need such large numbers. And are you sure that you found the right line in your code? With include files this can be tricky, so I suggest to check the line number in the echo print of the input file https://www.gams.com/latest/docs/UG_GAM ... eInputFile

I hope this helps!

Fred
Hi Fred,

Thank you for the reply!

Yes, the equation is right. And I do not know how big/small values should be. The parameter 'tbybh' is an income, which is part of economy system and it should be included in later equations.
Probably I need pre-conditions or some kind of assumptions for this equation.
Currently, I put the predicted values into a constant value. And the loop (over years) works now.

Best
Jarenka

User avatar
Renger
Posts: 353
Joined: 2 years ago

Re: Error: overflow in + operation (addop)

Post by Renger » 4 days ago

Hi Jarenka
As a rule, I scale my data (usually economic data from the Input-Output-Table) so the values are around 1, which is for my data than usual billion dollars. The precision of the solution is less than 1E-7, so around 100$
Cheers
Renger
____________________________________
Enjoy modeling even more: The lazy economist

Post Reply