Hi dear,
I want to form a set whose length depends on a scalar. In the other word, if I changed the value of the scalar variable, the length of the set must change. I tried to encode the case in GAMS. The code below may help you understand what I need exactly.
Scalar T ‘time interval (Minute)’ /10/;
Set i ‘index of time interval’ /i1*iT/;
I know that the code above does not work. Please help me as my situation will be resolved.
–
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.
Hi
You could use
$setglobal timint 10
Set i ‘index of time interval’ /i1*i%timint%/;
Cheers
Renger
From: gamsworld@googlegroups.com [mailto:gamsworld@googlegroups.com]
Sent: Freitag, 13. November 2015 11:37
To: gamsworld
Subject: I want to form a set whose length depends on a scalar
Hi dear,
I want to form a set whose length depends on a scalar. In the other word, if I changed the value of the scalar variable, the length of the set must change. I tried to encode the case in GAMS. The code below may help you understand what I need exactly.
Scalar T ‘time interval (Minute)’ /10/;
Set i ‘index of time interval’ /i1*iT/;
I know that the code above does not work. Please help me as my situation will be resolved.
–
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.