error 140 and error 170

Hi all,

I am writing equations in GAMS and its giving error 140 and 170 my codes are these


EQ19(I,F)…YF(I,F) =E= shry(I,F)*(SUM(A,PF(F)*FPD(F,A)*QF(F,A)));

EQ20(H)…YH(H) =E= SUM(F,YF(H,F))+ TR(H,‘GOVT’)CPI + TR(H,‘S’) + EXRTR(H,‘ROW’) ;

EQ21…HTS =E= SUM(H, MPS(H)*(1-ty(H))*YH(H) );

EQ22…HDS =E= HTS - SUM(H,EXR*TR(‘ROW’,H));

EQ23(H)…MPS(H) =E= mpsin(H)(1 + MPSADJmpsdum(H));

EQ24(H)…UH(H) =E= PROD(C,(QH(C,H)/beta(C,H))**beta(C,H));

EQ25(C,H)…QH(C,H) =E= beta(C,H)*EH(H)/PQ(C);

EQ26(H)…EH(H) =E= (1-MPS(H))*(1-ty(H))*YH(H);

EQ27(H)…CPIH(H) =E= PROD(C,PQ(C)**beta(C,H));

EQ28…CPI =E= SUM(H,MEU(H)*CPIH(H));

EQ29(H)…MEU(H) =E= UH ( H ) / SUM ( H,UH(H));

EQ30(C)…QINV(C) =E= INV(C)*IADJ;

EQ31…GBS =E= SUM( H, ty(H)YH(H) ) + EXRTR(‘GOVT’,‘ROW’)

  • SUM( C, tq(C)*( PD(C)*QD(C) + (PM(C)*QM(C))$CM(C) ) )
  • SUM( C$CM(C), tm(C)EXRPWM(C)*QM(C) )
  • YF(‘GOVT’,F)
  • SUM( H, CPI*TR(H,‘GOVT’) ) - TR(‘S’,‘GOVT’)
  • SUM(C$CE(C),te(C)EXRPWE(C)*QE(C))
  • SUM(C,PQ(C)*QG(C));

the error message it gives is domain violation or uncontrolled set can anyone help please?

Thanks
annoisa


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.

This is not enouph to help

Locate all gams code

and peoples will help You


21.03.2015, 15:19, “Annoisa” :

Hi all,

I am writing equations in GAMS and its giving error 140 and 170 my codes are these

EQ19(I,F)…YF(I,F) =E= shry(I,F)*(SUM(A,PF(F)*FPD(F,A)*QF(F,A)));

EQ20(H)…YH(H) =E= SUM(F,YF(H,F))+ TR(H,‘GOVT’)CPI + TR(H,‘S’) + EXRTR(H,‘ROW’) ;

EQ21…HTS =E= SUM(H, MPS(H)*(1-ty(H))*YH(H) );

EQ22…HDS =E= HTS - SUM(H,EXR*TR(‘ROW’,H));

EQ23(H)…MPS(H) =E= mpsin(H)(1 + MPSADJmpsdum(H));

EQ24(H)…UH(H) =E= PROD(C,(QH(C,H)/beta(C,H))**beta(C,H));

EQ25(C,H)…QH(C,H) =E= beta(C,H)*EH(H)/PQ(C);

EQ26(H)…EH(H) =E= (1-MPS(H))*(1-ty(H))*YH(H);

EQ27(H)…CPIH(H) =E= PROD(C,PQ(C)**beta(C,H));

EQ28…CPI =E= SUM(H,MEU(H)*CPIH(H));

EQ29(H)…MEU(H) =E= UH ( H ) / SUM ( H,UH(H));

EQ30(C)…QINV(C) =E= INV(C)*IADJ;

EQ31…GBS =E= SUM( H, ty(H)YH(H) ) + EXRTR(‘GOVT’,‘ROW’)
+ SUM( C, tq(C)*( PD(C)*QD(C) + (PM(C)*QM(C))$CM(C) ) )
+ SUM( C$CM(C), tm(C)EXRPWM(C)QM(C) )
+ YF(‘GOVT’,F)
- SUM( H, CPI
TR(H,‘GOVT’) ) - TR(‘S’,‘GOVT’)
- SUM(C$CE(C),te(C)EXRPWE(C)*QE(C))
- SUM(C,PQ(C)*QG(C));

the error message it gives is domain violation or uncontrolled set can anyone help please?

Thanks
annoisa


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.



With kindly regards!
Andre Savitsky
E-mail:andresavit@yandex.ru
andre_savit@yahoo.com



To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.

Thanks Andre,

I am attaching my file for full codes please anyone help me. I know its a small mistake but where cant get it.

Regards,
Annoisa

On Sunday, 22 March 2015 07:34:20 UTC+10:30, Savitsky Andre wrote:

This is not enouph to help

Locate all gams code

and peoples will help You


21.03.2015, 15:19, “Annoisa” :

Hi all,

I am writing equations in GAMS and its giving error 140 and 170 my codes are these


EQ19(I,F)..YF(I,F) =E= shry(I,F)*(SUM(A,PF(F)*FPD(F,A)*QF(F,A)));

EQ20(H)..YH(H) =E= SUM(F,YF(H,F))+ TR(H,'GOVT')*CPI + TR(H,'S') + EXR*TR(H,'ROW') ;

EQ21..HTS =E= SUM(H, MPS(H)*(1-ty(H))*YH(H) );

EQ22..HDS =E= HTS - SUM(H,EXR*TR('ROW',H));

EQ23(H)..MPS(H) =E= mpsin(H)*(1 + MPSADJ*mpsdum(H));

EQ24(H)..UH(H) =E= PROD(C,(QH(C,H)/beta(C,H))**beta(C,H));

EQ25(C,H)..QH(C,H) =E= beta(C,H)*EH(H)/PQ(C);

EQ26(H)..EH(H) =E= (1-MPS(H))*(1-ty(H))*YH(H);

EQ27(H)..CPIH(H) =E= PROD(C,PQ(C)**beta(C,H));

EQ28..CPI =E= SUM(H,MEU(H)*CPIH(H));

EQ29(H)..MEU(H) =E= UH ( H ) / SUM ( H,UH(H));

EQ30(C)..QINV(C) =E= INV(C)*IADJ;

EQ31..GBS =E= SUM( H, ty(H)*YH(H) ) + EXR*TR('GOVT','ROW')
            + SUM( C, tq(C)*( PD(C)*QD(C) + (PM(C)*QM(C))$CM(C) ) )
            + SUM( C$CM(C), tm(C)*EXR*PWM(C)*QM(C) )
            + YF('GOVT',F)
            - SUM( H, CPI*TR(H,'GOVT') ) - TR('S','GOVT')
            - SUM(C$CE(C),te(C)*EXR*PWE(C)*QE(C))
            - SUM(C,PQ(C)*QG(C));

the error message it gives is domain violation or uncontrolled set can anyone help please?

Thanks
annoisa


--

MTEXPAK.gms (15.6 KB)

Hey,



· You are missing the include file you use in the code so I am getting some extra errors

· You are not declaring anywhere YF(I,F) that you use in equation 19

· You are not declaring anywhere HTS that you use in equation 21 (look in the MTEXPAK.lst file you get and under each equation that starts with “****” you will see where GAMS does not know the variable/parameter you are using – check if you define it somewhere)



· You are using TR(H,‘S’) – what is ‘S’ ? You probably mean something else ; you are also using the S again in equation 31.



Hope this helps,

Bogdan





From: gamsworld@googlegroups.com [mailto:gamsworld@googlegroups.com] On Behalf Of Annoisa
Sent: Sunday, March 22, 2015 5:53 AM
To: gamsworld@googlegroups.com
Subject: Re: error 140 and error 170



Thanks Andre,

I am attaching my file for full codes please anyone help me. I know its a small mistake but where cant get it.

Regards,
Annoisa

On Sunday, 22 March 2015 07:34:20 UTC+10:30, Savitsky Andre wrote:

This is not enouph to help



Locate all gams code



and peoples will help You





21.03.2015, 15:19, “Annoisa” :

Hi all,

I am writing equations in GAMS and its giving error 140 and 170 my codes are these


EQ19(I,F)…YF(I,F) =E= shry(I,F)*(SUM(A,PF(F)*FPD(F,A)*QF(F,A)));

EQ20(H)…YH(H) =E= SUM(F,YF(H,F))+ TR(H,‘GOVT’)CPI + TR(H,‘S’) + EXRTR(H,‘ROW’) ;

EQ21…HTS =E= SUM(H, MPS(H)*(1-ty(H))*YH(H) );

EQ22…HDS =E= HTS - SUM(H,EXR*TR(‘ROW’,H));

EQ23(H)…MPS(H) =E= mpsin(H)(1 + MPSADJmpsdum(H));

EQ24(H)…UH(H) =E= PROD(C,(QH(C,H)/beta(C,H))**beta(C,H));

EQ25(C,H)…QH(C,H) =E= beta(C,H)*EH(H)/PQ(C);

EQ26(H)…EH(H) =E= (1-MPS(H))*(1-ty(H))*YH(H);

EQ27(H)…CPIH(H) =E= PROD(C,PQ(C)**beta(C,H));

EQ28…CPI =E= SUM(H,MEU(H)*CPIH(H));

EQ29(H)…MEU(H) =E= UH ( H ) / SUM ( H,UH(H));

EQ30(C)…QINV(C) =E= INV(C)*IADJ;

EQ31…GBS =E= SUM( H, ty(H)YH(H) ) + EXRTR(‘GOVT’,‘ROW’)

  • SUM( C, tq(C)*( PD(C)*QD(C) + (PM(C)*QM(C))$CM(C) ) )
  • SUM( C$CM(C), tm(C)EXRPWM(C)*QM(C) )
  • YF(‘GOVT’,F)
  • SUM( H, CPI*TR(H,‘GOVT’) ) - TR(‘S’,‘GOVT’)
  • SUM(C$CE(C),te(C)EXRPWE(C)*QE(C))
  • SUM(C,PQ(C)*QG(C));

the error message it gives is domain violation or uncontrolled set can anyone help please?

Thanks
annoisa


\

To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+...@googlegroups.com.
To post to this group, send email to gams...@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.




\

With kindly regards!

Andre Savitsky

E-mail:a...@yandex.ru

andre...@yahoo.com


\

To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.

Reply-to: gamsworld@googlegroups.com

thanks Bogdan will check accordingly

On Monday, 23 March 2015 23:48:56 UTC+10:30, Mihai-Bogd…@ec.europa.eu wrote:

Hey,



· You are missing the include file you use in the code so I am getting some extra errors

· You are not declaring anywhere YF(I,F) that you use in equation 19

· You are not declaring anywhere HTS that you use in equation 21 (look in the MTEXPAK.lst file you get and under each equation that starts with “****” you will see where GAMS does not know the variable/parameter you are using – check if you define it somewhere)



· You are using TR(H,‘S’) – what is ‘S’ ? You probably mean something else ; you are also using the S again in equation 31.



Hope this helps,

Bogdan





From: gams...@googlegroups.com [mailto:gams...@googlegroups.com] On Behalf Of Annoisa
Sent: Sunday, March 22, 2015 5:53 AM
To: gams...@googlegroups.com
Subject: Re: error 140 and error 170



Thanks Andre,

I am attaching my file for full codes please anyone help me. I know its a small mistake but where cant get it.

Regards,
Annoisa

On Sunday, 22 March 2015 07:34:20 UTC+10:30, Savitsky Andre wrote:

This is not enouph to help



Locate all gams code



and peoples will help You





21.03.2015, 15:19, “Annoisa” :

Hi all,

I am writing equations in GAMS and its giving error 140 and 170 my codes are these


EQ19(I,F)…YF(I,F) =E= shry(I,F)*(SUM(A,PF(F)*FPD(F,A)*QF(F,A)));

EQ20(H)…YH(H) =E= SUM(F,YF(H,F))+ TR(H,‘GOVT’)CPI + TR(H,‘S’) + EXRTR(H,‘ROW’) ;

EQ21…HTS =E= SUM(H, MPS(H)*(1-ty(H))*YH(H) );

EQ22…HDS =E= HTS - SUM(H,EXR*TR(‘ROW’,H));

EQ23(H)…MPS(H) =E= mpsin(H)(1 + MPSADJmpsdum(H));

EQ24(H)…UH(H) =E= PROD(C,(QH(C,H)/beta(C,H))**beta(C,H));

EQ25(C,H)…QH(C,H) =E= beta(C,H)*EH(H)/PQ(C);

EQ26(H)…EH(H) =E= (1-MPS(H))*(1-ty(H))*YH(H);

EQ27(H)…CPIH(H) =E= PROD(C,PQ(C)**beta(C,H));

EQ28…CPI =E= SUM(H,MEU(H)*CPIH(H));

EQ29(H)…MEU(H) =E= UH ( H ) / SUM ( H,UH(H));

EQ30(C)…QINV(C) =E= INV(C)*IADJ;

EQ31…GBS =E= SUM( H, ty(H)YH(H) ) + EXRTR(‘GOVT’,‘ROW’)

  • SUM( C, tq(C)*( PD(C)*QD(C) + (PM(C)*QM(C))$CM(C) ) )
  • SUM( C$CM(C), tm(C)EXRPWM(C)*QM(C) )
  • YF(‘GOVT’,F)
  • SUM( H, CPI*TR(H,‘GOVT’) ) - TR(‘S’,‘GOVT’)
  • SUM(C$CE(C),te(C)EXRPWE(C)*QE(C))
  • SUM(C,PQ(C)*QG(C));

the error message it gives is domain violation or uncontrolled set can anyone help please?

Thanks
annoisa


\

To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+...@googlegroups.com.
To post to this group, send email to gams...@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.




\

With kindly regards!

Andre Savitsky

E-mail:a...@yandex.ru

andre...@yahoo.com


\

To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+...@googlegroups.com.
To post to this group, send email to gams...@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.