Question??

Good morning Everybody.

I have a question about programming in Gams.

I don’t know how solve the following error?

Equation

RESPAY(gr,te) … LAMBDA(nd,te) =G= DATGEN(gr,‘fixo’) * v(gr,te)

  • DATGEN(gr,‘coste’) * GTR(gr,te);

Error
498 RESPAY(gr,te) … LAMBDA(nd,te) =G= DATGEN(gr,‘fixo’) * v(gr,te)
**** $149
**** LINE 63 INPUT C:****.gms

I’ll be waiting the help of group or the experts in programming.
Regards,

Eng. Wladimir Páez Guerra
Estudante Doutorado em Engenharia Elétrica
Departamento de Engenharia Elétrica - ENE
Faculdade de Tecnologia - FT
Universidade de Brasília - UnB
Grupo de Sistemas Elétricos de Potência - GSEP

\

To post to this group, send email to gamsworld@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.

Hi Wladmimir

If you look up the error number 149, you will find “Uncontrolled set entered as constant”.

Your equation RESPAY is defined over the sets “gr” and “te”, but in the equation itself, you have LAMBDA(nd,te) =G=…., a variable (or parameter) defined over the set “nd”.

As this set is not part of the equation definition, Gams does not know what to do with it (it is uncontrolled).

It would be controlled, if you define the equation as RESPAY(gr,te,nd), or if you have something like sum(nd, LAMBDA(nd,te)) in your equation.

Hope this helps

Renger




\


Modelworks

Gewerbestrasse 15

3600 Thun – Switzerland

+41 79 818 53 73

Info@modelworks.ch

blog.modelworks.ch







From: gamsworld@googlegroups.com [mailto:gamsworld@googlegroups.com] On Behalf Of Wlado
Sent: Friday, August 17, 2012 6:19 PM
To: gamsworld@googlegroups.com
Subject: Question??



Good morning Everybody.



I have a question about programming in Gams.



I don’t know how solve the following error?



Equation



RESPAY(gr,te) … LAMBDA(nd,te) =G= DATGEN(gr,‘fixo’) * v(gr,te)

  • DATGEN(gr,‘coste’) * GTR(gr,te);



    Error

498 RESPAY(gr,te) … LAMBDA(nd,te) =G= DATGEN(gr,‘fixo’) * v(gr,te)

**** $149

**** LINE 63 INPUT C:****.gms



I’ll be waiting the help of group or the experts in programming.

Regards,


Eng. Wladimir Páez Guerra
Estudante Doutorado em Engenharia Elétrica
Departamento de Engenharia Elétrica - ENE
Faculdade de Tecnologia - FT
Universidade de Brasília - UnB
Grupo de Sistemas Elétricos de Potência - GSEP


To post to this group, send email to gamsworld@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.


To post to this group, send email to gamsworld@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.

Equation
RESPAY(gr,te) … LAMBDA(nd,te) =G= DATGEN(gr,‘fixo’) * v(gr,te)
+ DATGEN(gr,‘coste’) * GTR(gr,te);
Error
498 RESPAY(gr,te) … LAMBDA(nd,te) =G= DATGEN(gr,‘fixo’) * v(gr,te)
**** $149
**** LINE 63 INPUT C:****.gms

from the info you provided, “nd” is an uncontrolled index in your equation.
you may try if this works:

RESPAY(nd, gr,te) … LAMBDA(nd,te) =G= DATGEN(gr,‘fixo’) * v(gr,te)

  • DATGEN(gr,‘coste’) * GTR(gr,te);

HTH,

Yan

\

Thanks for your help and advice. I think I solved the error with your suggestion and modify the code.
Regards,


2012/8/19 任彦

\

Equation
RESPAY(gr,te) … LAMBDA(nd,te) =G= DATGEN(gr,‘fixo’) * v(gr,te)
+ DATGEN(gr,‘coste’) * GTR(gr,te);
Error
498 RESPAY(gr,te) … LAMBDA(nd,te) =G= DATGEN(gr,‘fixo’) * v(gr,te)
**** $149
**** LINE 63 INPUT C:****.gms

from the info you provided, “nd” is an uncontrolled index in your equation.
you may try if this works:

RESPAY(nd, gr,te) … LAMBDA(nd,te) =G= DATGEN(gr,‘fixo’) * v(gr,te)

  • DATGEN(gr,‘coste’) * GTR(gr,te);

HTH,

Yan


To post to this group, send email to gamsworld@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.



\

Eng. Wladimir Páez Guerra
Estudante Doutorado em Engenharia Elétrica
Departamento de Engenharia Elétrica - ENE
Faculdade de Tecnologia - FT
Universidade de Brasília - UnB
Grupo de Sistemas Elétricos de Potência - GSEP
Tel. +(55) 61 8183-7912


To post to this group, send email to gamsworld@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.