Veda2.0 Released!


Errors when reading the solution - restart option
#1
Dear all, 

I am facing the following issue when running my model using the restart option: 
My model solves with unscaled infeasibilities (cplex status is: (5) optimal but with unscaled infeasibilities. The issue I am facing happens after this when the solution is read. Here is the log I get: 


ADDDATA.gms(1809413) 1358 Mb  16 secs
--- Executing after solve: elapsed 0:08:57.694
--- ADDDATA.gms(1809436) 1358 Mb
--- ADDDATA.gms(1809437) 1358 Mb
--- TIMES Solve status: Optimal
--- ADDDATA.gms(1809927) 1358 Mb
--- ADDDATA.gms(1809940) 1358 Mb
--- ADDDATA.gms(1809946) 1358 Mb
--- ADDDATA.gms(1809971) 1358 Mb
*** Error at line 1809971: division by zero (0)
--- ADDDATA.gms(1809996) 1358 Mb 1 Error
--- ADDDATA.gms(1810089) 1358 Mb 1 Error
--- ADDDATA.gms(1810150) 1358 Mb 1 Error
--- ADDDATA.gms(1810240) 1358 Mb 1 Error
--- ADDDATA.gms(1810327) 1358 Mb 1 Error
--- ADDDATA.gms(1810339) 1358 Mb 1 Error


When using Gams v40 and newer versions, this instigates a hard stop and the prevents the vd files from being written.
With old distribution of Gams (v24) the vd files are written. 

Can someone explain what this error suggests and most importantly where to look for potential errors in my model? 


I've attached a reproducible case here: https://www.dropbox.com/sh/ejr0n4npp084t...btkKa?dl=0
Please let me know if you need access to the reproducible case and I'll share it with you. 

Thank you in advance for your help, 
Mahmoud
Reply
#2
There was no listing file that would show the GAMS error; such would be highly useful.
Can you not provide the listing file from the case that reproduces the error?
Reply
#3
Thank you for your reply, Antti! I've just added a listing file from a run made using an old version of gams (v24) to the dropbox folder shared before.
Thanks again for your help!
Reply
#4
Thanks for reporting the issue!
The divide by zero issue turned out to be caused by a condition that had not been anticipated in the code, apparently due to NCAP_PASTI originally being thought as being only applicable to past investments before the model horizon. The necessary conditions for the issue were NCAP_PASTI defined within the active model periods, with a positive NCAP_ILED also being defined for it, and only when the process also has new capacity prohibited. In your case, these conditions triggered the error for the single process EP_Win-WinONS in Russia.

The mitigating factor is that as far as I can see, that condition was leading to a divide by zero whenever it may have also been causing some inconsistency in the results, and so I would think it should not have gone unnoticed. Anyway, I am glad that this condition was brought up by you, and has now been fixed, in TIMES v4.7.5, which is now available. So, please try and upgrade your TIMES.
Reply
#5
Hi Antti - Many thanks for fixing the issue in the new TIMES source code version. I tested it and it works. Can you please let me know where in the listing file one can spot such issue?

Many many thanks for your help,
Mahmoud
Reply
#6
Thanks for confirming that the new version fixed the error condition.

> Can you please let me know where in the listing file one can spot such issue?

The error message is included in the listing file in the context, which helps locating where the error occurs in the source code.  For normal users that would not be of much help, but whenever you see a GAMS error, either in the log output or in the listing file, and need help troubleshooting it, providing the listing file is always helpful. In fact, in general it would indeed be useful to report any unexpected GAMS errors you may encounter, because normally such should not occur.

BTW, looking at the wind power capacity statistics, it seems that your NCAP_ILED should actually have been defined with negative values, because the statistics show capacity additions in 2019 and 2020 matching the NCAP_PASTI values you had in the model. And with negative NCAP_ILED values you would not have encountered the GAMS error. But as said, I am anyway glad you did.  Big Grin
Reply
#7
I will make sure to include the listing file next time.

> it seems that your NCAP_ILED should actually have been defined with negative values
NCAP_ILED was set to 4 for EP_win-winOns. There were many issues with my previous run and I had restart from scratch before sync'ing to correct some issues. I haven't verified NCAP_ILED in browse before my run. Anyways, thank you so much for your help.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Solution aborted due to resource limit frangb99 10 2,708 24-04-2024, 12:28 PM
Last Post: VictorG
  errors on the control of CO2 emission dwroh 0 430 14-03-2024, 03:38 PM
Last Post: dwroh
  Restart option under Veda2 StephTM 1 828 28-02-2024, 05:21 PM
Last Post: AKanudia
  Comparison between Perfect Foresight and Myopia/Timestep-Solution Alexander Burkhardt 5 4,241 18-07-2022, 12:24 PM
Last Post: Alexander Burkhardt
  Problems with modeling a retrofit option Ceas19 2 1,878 28-06-2022, 09:49 PM
Last Post: Ceas19
  Errors JozefO 3 2,910 01-12-2021, 04:48 PM
Last Post: Ravinder
Question ERRORS IN INPUT DATA/COMPILE JozefO 13 13,995 23-12-2020, 08:49 PM
Last Post: AKanudia
  VEDA 2.0 Results Import Errors Jason 3 4,415 08-12-2020, 04:27 PM
Last Post: Jason
  Total option in the results? agailani 2 3,271 30-10-2020, 07:33 PM
Last Post: agailani

Forum Jump:


Users browsing this thread: 1 Guest(s)