Thank you Dr. Dirkse
That was helpful.
On Saturday, April 2, 2016 at 7:23:31 AM UTC+3, Steven Dirkse wrote:
Claudio,
You can make this data-driven in GAMS. For example, try something like this:
sets
i / i1*i5 /
t / 1*100 /
it(i,t) 'subset of t for each i'
;
parameter
lim(i) /
i1 14
i2 44
i3 54
i4 64
i5 [card(t)]
/
;
abort$[smin{i, lim(i) - lim(i-1)} lim(i-1)] and [ord(t) wrote:
Hey, as far as I know, there is no way to create a "family" of sets. It should be easy to copy-paste-search-replace-text-editor-automate this kind of structure:
set t /1*100/
tw1(t)
tw2(t)
...
twn(t)
tw1(t)=YES$(ord(t)>tl(1) and ord(t)tl(2) and ord(t)tl(n) and ord(t) wrote:
Hi every one
I have a q with GAMS
I need to introduce the set tw(i) as in this sample:
set i/1*3/,
parameters tl(i)
/1 3
2 1
3 5/,
tu(i)
/1 15
2 12
3 16/;
set tw(i) /tl(i)*tu(i)/; *Error and problem
I want tw sets for each i so the result should be:
tw(1) from 3 to 15
tw(2) from 1 to 12
tw(3) from 5 to 16
I used to enter it manually but now I need to program it to sum over 'tw' the subset of 't'
con2(i);
con2(i).. sum(tw(i),del(i,t)) =e= 1;
I appreciate any help
Thanks and Regards
--
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
https://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+...@googlegroups.com.
To post to this group, send email to gams...@googlegroups.com.
Visit this group at
https://groups.google.com/group/gamsworld.
For more options, visit
https://groups.google.com/d/optout.
--
Steven Dirkse, Ph.D.
GAMS Development Corp., Washington DC
Voice: (202)342-0180 Fax: (202)342-0181
sdi...@gams.com
http://www.gams.com
--
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
https://groups.google.com/group/gamsworld.
For more options, visit
https://groups.google.com/d/optout.