Exit code = 2, Endogenous relational operations require model type "dnlp"?

Problems with syntax of GAMS
Post Reply
douglaskuo
User
User
Posts: 21
Joined: 2 months ago

Exit code = 2, Endogenous relational operations require model type "dnlp"?

Post by douglaskuo » 1 month ago

Dear all,

I am running one CGE model. Please find my GAMS code and EXCEL data attached. I encounter the problems as below. I appreciate it if someone can give me
HSRTWN20201115.gms
(19.61 KiB) Downloaded 10 times
help.
Regards,
Douglas

*** Error 57 in C:\Users\DOUGLAS KUO\Documents\Dissertation\HSRTWN20201115.gms
Endogenous relational operations require model type "dnlp"
*** Error 256 in C:\Users\DOUGLAS KUO\Documents\Dissertation\HSRTWN20201115.gms
Error(s) in analyzing solve statement. More detail appears
Below the solve statement above
--- HSRTWN20201115.gms(563) 3 Mb 2 Errors
*** Status: Compilation error(s)
--- Job HSRTWN20201115.gms Stop 12/05/20 08:19:42 elapsed 0:00:01.796
Exit code = 2
samjuly20201019.xlsx
(43.17 KiB) Downloaded 11 times

douglaskuo
User
User
Posts: 21
Joined: 2 months ago

Re: Exit code = 2, Endogenous relational operations require model type "dnlp"?

Post by douglaskuo » 1 month ago

I am looking for the answers on the Internet. Some one said "$" condition can not be use in equation.
I use it on line 423:
CETFOC(a)..
PDA(a)/PE(a)$(QDA(a)>0 and (QE(a)/QDA(a))>0)=e=(deltaCET(a)/(1-deltaCET(a)))*(QE(a)/QDA(a))**(1-rhoCET(a));
But, I need to make sure "(QE(a)/QDA(a) >0"

I skipped the equation temporarily, I got:
*** Error 71 in C:\Users\DOUGLAS KUO\Documents\Dissertation\HSRTWN20201115.gms
The symbol shown has been declared as an equation, but no
Symbolic equation (..) was found. hint - look for commas in the
Documentation text for the equations. use quotes around the
Text or eliminate the commas.
*** Error 256 in C:\Users\DOUGLAS KUO\Documents\Dissertation\HSRTWN20201115.gms
Error(s) in analyzing solve statement. More detail appears
Below the solve statement above
--- HSRTWN20201115.gms(563) 3 Mb 2 Errors
*** Status: Compilation error(s)
--- Job HSRTWN20201115.gms Stop 12/05/20 08:34:09 elapsed 0:00:02.285
Exit code = 2

User avatar
Renger
Posts: 633
Joined: 4 years ago

Re: Exit code = 2, Endogenous relational operations require model type "dnlp"?

Post by Renger » 1 month ago

Hi


You can use $-operators in equations, however, you can't, in an MCP model, use variables in the $-conditions. You should replace QA by QA0.
Read my answers to this topic this.

Cheers
Renger
____________________________________
Enjoy modeling even more: Read my blog on modeling at The lazy economist

douglaskuo
User
User
Posts: 21
Joined: 2 months ago

Re: Exit code = 2, Endogenous relational operations require model type "dnlp"?

Post by douglaskuo » 1 month ago

Dear Renger,
Thank you very much. I will try it.
Thanks and regards,
Douglas

Post Reply