Hi Renger,
Thank you for the heads-up. I will rephrase my question here.
Basically, I have a set i, which has 48 elements. And I would like to define 48 equality constraints for each elements in my set i.
What I want to achieve is, for each i = 1:48, i have x(i)+y(i) =e= a(i) - b(i).
I expressed this as equ(i)… x(i)+y(i) =e= a(i) - b(i) ;
In this equation, x and y are decision variables (both have 48 numbers of variables); a and b are defined parameter.
Since GAMS does not recognize “i” as the index number, how can I represent those equation? I hope there will be other solutions, other than simply putting 48 equations there.
Thanks very much.
Regards,
Tian
On Tuesday, March 31, 2015 at 4:04:12 PM UTC+8, Renger van Nieuwkoop wrote:
Hi Tian
You have an error “uncontrolled set entered as constantâ€, but it is hard to see where this error originates, as you do not provide enough information (read the Guidelines to this forum).
Cheers
Renger
From: gams...@googlegroups.com [mailto:gams...@googlegroups.com] On Behalf Of Tian Zhang
Sent: Dienstag, 31. März 2015 05:17
To: gams...@googlegroups.com
Subject: How to define equality constraints? “Uncontrolled set entered as constant”
Dear all,
Very honored to join this helpful group.
May I ask how to define equality constraints on a certain set?
I wrote:
equ(i)… x(i)+y(i) =e= a(i) - b(i) ;
In this equation, I want express that for the set i, I have i equality constraints. x and y are decision variables; a and b are parameter, whose values are known.
But I got this error:“Uncontrolled set entered as constant”. I learnt that i cannot be used as the index number, yet still cannot figure out how to fix this.
Hope to hear from you soon. Thank you very much.
Cheers.
–
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.