Solve aborted Error

I am attempting to execute a CGE (Computable General Equilibrium) model. While the calibration phase runs without issue, I am encountering errors when running the simulation file. I am currently unable to identify the root cause of the issue. Please find attached the model file in question. I would greatly appreciate any assistance you may be able to provide!
IFPRI CGE Model (3).zip (2.29 MB)

Hello,
I ran successfully 1model.gm without any change. Maybe your computer has a problem.

With regards,
Rodrigue

Hermela,

I looked at the 1model.log file in the .zip you sent. It looks like a normal and successful run. Where are you seeing errors? Please be specific about where you see errors, and why you consider them to be so.

-Steve

Thank you for your help Steve. The 1model runs just fine, however, when I run 2simulation.gms GAMS show me a lot of errors. As I am new to GAMS, I tried my best but couldn’t find the solution.

Hermela,

I don’t see the file 2simulation.log in the .zip file. Ditto for 2simulation.lst. If you send those, it is more likely you’ll get good help.

-Steve

1model.gdx (35.1 KB)

Thank you Steve. I have attached 2 simulation file.
1model.gms (66.4 KB)
1model.xlsx (167 KB)
2simulation.gms (17.3 KB)
2simulation.xlsx (143 KB)
Thank
model.gdx (427 KB)

Hermela,

I don’t see the files 2simulation.log and 2simulation.lst in your attachments. If you send those, it is more likely you’ll get good help.

-Steve

Hi Steve. I don’t have 2simulation.log and 2sim.lst files. Every time
1model.log (4.99 KB)
I run GAMS all I get is the following attachments. I couldn’t attached the .lst file as it is so I converted it to doc. I hope this will help me . Thank you very much
1model.docx (79.7 KB)

the solve aborted error is now solved, thank you so much all for your inputs. I am now facing a new error : error 170 domain violation for element. Some of the equations error is showing are
QHTAB(H,‘init’) = SUM(A, PA0(A)*QHA0(A,H)*hpop(H)) + SUM(C, PQ0(C)*QH0(C,H)*hpop(H));
QHTAB(‘TOTAL’,‘init’) = SUM((A,H), PA0(A)*QHA0(A,H)*hpop(H)) + SUM((C,H), PQ0(C)*QH0(C,H)*hpop(H));
QHTAB(H,XC)$QHTAB(H,‘init’) = ((QHTAB(H,XC)/QHTAB(H,‘Base’))**(1/TNUM)-1)*100;
Can someone kindly help me in solving this error please? GAMS shows that the error is occurring on set element ‘init’

I think the error is clear from the message, your symbol QHTAB has been declared over some sets (probably H,XC) that do not include the element ‘init’ (or ‘base’ or ‘total’) and hence the compiler gives you an error. Look at the declaration of QHTAB and confirm that the domain sets do not include ‘init’ (or the others). Now try to explain why you should be able to use the label. There are always ways around something like this (e.g. declare QHTAB over the universe, i.e. QHTAB(,), but GAMS does a domain check on purpose to detect model errors and the original modeler probably put some thoughts into this, so I would not lightly change that. Try to understand the issue and look for a good solution.

-Michael

PS The code you shared before does not mention the symbol QHTAB.

Hi Michael,

Thank you so much for your advice, it was very helpful. I am also getting error 649 domain violation while loading from GDX. How will you advice me to solve this error? I’m sorry, I’m new to CGEmodeling with GAMS and i’m constantly seeking advice :slight_smile:

That is serious. You can suppress the domain violation by only taking records that match your sets by replacing $loadDC by $load. This is extremely dangerous, since you have no clue of what you leave behind, so the results of the model are very questionable. If you have to use a complex model like IFPRI’s CGE model you need to invest in learning the basics. Depending on your set up and environment it might be advantageous to seek external help, e.g. your professor, or attending a GAMS class (e.g. Bruce McCarl’s on-line GAMS course in a few weeks: https://www.gams.com/courses/) or hiring consultant (check with support@gams.com for options).

-Michael

Hi Michael,
Thank you so much for your advice. I got support from an expert in IFPRI. It turns out I didn’t update the factors and household account in the result Excel file, while I altered it in the model file.