Hi!
I’m finding very hard to understand how the dollar condition works. I saw a model that declares a binary variable called x and after it fix it’s value by doing this:
x.fx(a,aa,s)$(p(a,s))=0
Can you explain what the dollar condition does in that expression?
Thank you
–
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/groups/opt_out.
Hola Daniela,
You can think of it like this: An expression affected by a dollar sign will only be written if the condition after the dollar sign is true.
For instance, in this example you give, the variable will only be fixed if p(a,s) [parameter] is nonzero.
Here’s a toy model with this parameter based dollar condition fixing variable situation for you can use to understand.
Regards!
Claudio
On Wed, Oct 2, 2013 at 12:55 PM, DT wrote:
Hi!
I’m finding very hard to understand how the dollar condition works. I saw a model that declares a binary variable called x and after it fix it’s value by doing this:
x.fx(a,aa,s)$(p(a,s))=0
Can you explain what the dollar condition does in that expression?
Thank you
–
Untitled_12.gms (2.1 KB)
Thank you
Quinta-feira, 3 de Outubro de 2013 4:51:55 UTC+1, Claudio Delpino escreveu:
Hola Daniela,
You can think of it like this: An expression affected by a dollar sign will only be written if the condition after the dollar sign is true.
For instance, in this example you give, the variable will only be fixed if p(a,s) [parameter] is nonzero.
Here’s a toy model with this parameter based dollar condition fixing variable situation for you can use to understand.
Regards!
Claudio
On Wed, Oct 2, 2013 at 12:55 PM, DT wrote:
Hi!
I’m finding very hard to understand how the dollar condition works. I saw a model that declares a binary variable called x and after it fix it’s value by doing this:
x.fx(a,aa,s)$(p(a,s))=0
Can you explain what the dollar condition does in that expression?
Thank you
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/groups/opt_out.