error code 57 and 52: VAR operands relational or boolean

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

error code 57 and 52: VAR operands relational or boolean

Post by douglaskuo » 1 month ago

Dear All,
I am struggling with my model.
There is zero in my data:
QDA0(a)=sum(c,sam(a,c))/PDA0(a);

I use "$" to control it and got the error: 57
Thank you for your help in advance.

CETfn(a)$(QDA0(a))..
QA(a)=e=scaleCET(a)*(deltaCET(a)*QDA(a)**rhoCET(a)+(1-deltaCET(a))*QE(a)**rhoCET(a))**(1/rhoCET(a));

CETZEROfn(a)$(QDA(a)=0)..
QA(a)=e=QE(a);
*
CETFOC(a)$(QDA0(a))..
PDA(a)/PE(a)=e=(deltaCET(a)/(1-deltaCET(a)))*(QE(a)/QDA(a))**(1-rhoCET(a));
*
CETZEROFOC(a)$(QDA(a))..
PDA(a)=e=PE(a);


**** The following MCP errors were detected in model cge:
**** 57 equation CETZEROfn.. VAR operands relational or boolean
**** 52 equation CETZEROFOC.. VAR $-control
HSRTWN20201206.gms
(20.5 KiB) Downloaded 9 times
samjuly20201019.xlsx
(43.43 KiB) Downloaded 10 times

douglaskuo
User
User
Posts: 21
Joined: 2 months ago

Re: error code 57 and 52: VAR operands relational or boolean

Post by douglaskuo » 1 month ago

I got some typing error!
CETZEROfn(a)$(QDA(a)=0)..
Should be QDA0(a)

- please ignore this post --

Thank you.

Post Reply