Hi guys,
I try to use a dollar condition with one variable on gams but generate
an error in GAMS. for example:
r1(num, t)(power(num,t)=l=100)... price(num,t)=e=10;
r2(num, t)(power(num,t)=l=50)… price(num,t)=e=5;
where:
variables power(num,t), price(num,t)
Anyone knows how to do it? I really need help with this code.
Regards,
Tiago Sousa
\
Dear Tiago
This creates endogenous deceleration. One solution can be using binary variables to model what you mean.
Regards
Ù…Øمد صادق تولّلی
Mohammad Sadegh Tavallali
National University of Singapore
On Sat, Jun 4, 2011 at 6:13 PM, Tiago Sousa wrote:
Hi guys,
I try to use a dollar condition with one variable on gams but generate
an error in GAMS. for example:
r1(num, t)(power(num,t)=l=100)... price(num,t)=e=10;
r2(num, t)(power(num,t)=l=50)… price(num,t)=e=5;
where:
variables power(num,t), price(num,t)
Anyone knows how to do it? I really need help with this code.
Regards,
Tiago Sousa
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 Tiago,
I’m having exactly the same problem you had. How did you solve it?
I would really appreciate your help.
Jose Miguel Hernández.
El sábado, 4 de junio de 2011 05:13:20 UTC-5, Tiago Sousa escribió:
Hi guys,
I try to use a dollar condition with one variable on gams but generate
an error in GAMS. for example:
r1(num, t)(power(num,t)=l=100)... price(num,t)=e=10;
r2(num, t)(power(num,t)=l=50)… price(num,t)=e=5;
where:
variables power(num,t), price(num,t)
Anyone knows how to do it? I really need help with this code.
Regards,
Tiago Sousa
–
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
\
You cannot use a variable in a $ statement. This should however work with a parameter.
Renger
Sent from my iPhone
Am 04.04.2013 um 16:56 schrieb “jmharango@gmail.com” :
Hi Tiago,
I’m having exactly the same problem you had. How did you solve it?
I would really appreciate your help.
Jose Miguel Hernández.
El sábado, 4 de junio de 2011 05:13:20 UTC-5, Tiago Sousa escribió:
Hi guys,
I try to use a dollar condition with one variable on gams but generate
an error in GAMS. for example:
r1(num, t)$(power(num,t)=l=100)... price(num,t)=e=10;
r2(num, t)$(power(num,t)=l=50)... price(num,t)=e=5;
where:
variables power(num,t), price(num,t)
Anyone knows how to do it? I really need help with this code.
Regards,
Tiago Sousa
–
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
–
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
\
you can introduce 2 binary variables
B1(num, t) = 1 if power(num, t) < 100
B2(num, t) = 1 if power(num, t) < 50
then
price =E= B1*(1-B2)*10 + B2 *5;
El sábado, 4 de junio de 2011 05:13:20 UTC-5, Tiago Sousa escribió:
Hi guys,
I try to use a dollar condition with one variable on gams but generate
an error in GAMS. for example:
r1(num, t)(power(num,t)=l=100)... price(num,t)=e=10;
r2(num, t)(power(num,t)=l=50)… price(num,t)=e=5;
where:
variables power(num,t), price(num,t)
Anyone knows how to do it? I really need help with this code.
\
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
\