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.

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

I am seeking help on the above error in my code “overflow in * operation (mulop)”.
I have attached the log and code files.
Anyone with an idea on how to rectify the error will be highly appreciated.

When I run the model the listing file points me to the problematic equation “**** Exec Error at line 449: overflow in * operation (mulop)”. Line 449 reads “E90…I_pv =e= IL1L - (Io1L * ((exp((Vb + (I_pv * Rs1L))/(a1L + 0.01))) - 1)) - ((Vb + (I_pv * Rs1L))/(Rsh1L + 0.01));”. So let’s look at the ingredients of the equations: variable I_pv is unitialized, hence this is at 0, a display of the other exogenous scalars show:

Obviously, the problematic part is the exp function. The argument to the exp function is exp((32+0*513.548)/(0+0.01)) = exp(3200) which is something 1e+1389. Doubles end around 1e308. GAMS and the solvers work with double floating point numbers. Moreover, solvers work with tolerances. What I have seen in the model (extremely large numbers and very small numbers) makes me fear that the model is not going to give you any reasonable answer (I also saw messages from Conopt “An initial function value is too large (larger than 1.0E+10)” which make Conopt stop without a solution). I suggest reading the scaling chapter in the GAMS/Conopt solver manual at https://www.gams.com/latest/docs/S_CONOPT.html#CONOPT_SCALING to get a sense for the problem area.

Hello Micheal, thank you for the guidance. I managed to modify the model as per guidance. However, I now added some modifications and I am getting some new errors related to the previous one.

Here requesting for assistance on my GAMS model, when I execute it I get the following errors:

Exec Error at line 710: division by zero (0)
Exec Error at line 710: A constant in a nonlinear expression in equation E96 evaluated to UNDF

I applied bounds and initial values on some variables but still no success. Attached is the GAMS file and input data file.
Anxiously waiting for your response.

Before looking into consequences of the third solve, I would first look at the second solve. Conopt fails because the Jacobian values are too big. Knitro can’t make the model feasible. You did not share the log/lst of your run. Did you succeed solving the second (“Thermal”) model? Only if this succeeds with good variable values it makes sense to analyze what’s going on in the third solve.

I don’t see any difference from the last iteration:

--- Generating NLP model Thermal[LST:1279]
--- PVT circular with tube insulation.gms(678) 7 Mb[FIL:"C:\Users\mbuss\Downloads\PVT circular with tube insulation.gms",678,0]
--- 3,691 rows 3,692 columns 10,897 non-zeroes
--- 15,296 nl-code 4,468 nl-non-zeroes
--- Range statistics (absolute non-zero finite values)
--- RHS [min, max] : [ 3.295E-03, 3.444E+05] - Zero values observed as well
--- Bound [min, max] : [ 1.000E-08, 1.000E-06]
--- Matrix [min, max] : [ 1.660E-08, 3.059E+18] - Zero values observed as well
--- PVT circular with tube insulation.gms(678) 5 Mb[FIL:"C:\Users\mbuss\Downloads\PVT circular with tube insulation.gms",678,0]
--- Executing CONOPT (Solvelink=2): elapsed 0:00:04.069[LST:4700]
CONOPT 3 42.2.0 ef14ea53 Feb 16, 2023 WEI x86 64bit/MS Window
C O N O P T 3 version 3.17N
Copyright (C) ARKI Consulting and Development A/S
Bagsvaerdvej 246 A
DK-2880 Bagsvaerd, Denmark
** An initial function value is too large (larger than 1.0E+10).
Scale the variables and/or equations or add bounds.

Conopt is very explicit about the equations it doesn’t like:

**** ERRORS/WARNINGS IN EQUATION E74(72)
1 error(s): Initial function value too large = 3.0E+10
**** ERRORS/WARNINGS IN EQUATION E75(1)
1 error(s): Initial function value too large = 3.0E+10
**** ERRORS/WARNINGS IN EQUATION E75(2)
1 error(s): Initial function value too large = 3.0E+10
**** ERRORS/WARNINGS IN EQUATION E75(3)
1 error(s): Initial function value too large = 3.0E+10
**** ERRORS/WARNINGS IN EQUATION E75(4)
1 error(s): Initial function value too large = 3.0E+10
**** ERRORS/WARNINGS IN EQUATION E75(5)
1 error(s): Initial function value too large = 3.0E+10
**** ERRORS/WARNINGS IN EQUATION E75(6)
1 error(s): Initial function value too large = 3.0E+10
**** ERRORS/WARNINGS IN EQUATION E75(7)
1 error(s): Initial function value too large = 3.0E+10
**** ERRORS/WARNINGS IN EQUATION E75(8)
1 error(s): Initial function value too large = 3.0E+10
**** ERRORS/WARNINGS IN EQUATION E75(9)
1 error(s): Initial function value too large = 3.0E+10

I guess this should give you enough information to improve the situation. Perhaps you use a different solver and get stuck at a different place. You should share your log file in this case.