gams help

9 views
Skip to first unread message

esra

unread,
May 27, 2012, 4:02:18 PM5/27/12
to gamsworld
set
Y slug /s6,s7,s8/
E product/s1,s2,s3,s4,s5/

parameter
WI (E) initial size of the old slug
/ S1 75
S2 25
S3 125
S4 175
S5 75/

How can I do that

eq1(E,Y)..WO(E,Y-1)=E= WI(E);
for ord (y) =1,

please help

thanks

Arne Stolbjerg Drud

unread,
May 29, 2012, 4:28:31 AM5/29/12
to gams...@googlegroups.com
Esra:

You probably do not want Y-1 for ord(Y)=1 since there is no such element.

What I assume you want is:

eq1(E,Y)$(ord(Y) eq 1)..WO(E,Y)=E= WI(E);

Given your sets you may also write it as:

Eq1(E) .. WO(E,'S6') =E= WI(E);

Arne

PS: You seem to have two very different sets and you still name all the
elements with S. Why not

set
Y slug /y1,y2,y3/
E product/s1,s2,s3,s4,s5/

-------------------------------------------
Arne Stolbjerg Drud
ARKI Consulting & Development A/S
Bagsvaerdvej 246A, DK-2880 Bagsvaerd, Denmark
Phone: (+45) 44 49 03 23, Fax: (+45) 44 49 03 33, email: ad...@arki.dk
--
You received this message because you are subscribed to the Google Groups
"gamsworld" group.
To post to this group, send email to gams...@googlegroups.com.
To unsubscribe from this group, send email to
gamsworld+...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/gamsworld?hl=en.

Moha

unread,
May 29, 2012, 5:49:57 AM5/29/12
to gams...@googlegroups.com
Hello Esra,

This should do it for all Y. When Y=1, then WO(E,Y-1) will be zero because there is no element in set Y before its first element.

eq1(E,Y)$(ord (Y)=1)..WO(E,Y-1)=E= WI(E);

Hope this helps! 

ESRA UÇAKTÜRK

unread,
May 29, 2012, 6:55:30 AM5/29/12
to gams...@googlegroups.com
Arne
thanks your answer.You are right.I correct y and e sets



PS: You seem to have two very different sets and you still name all the
elements with S. Why not

set
Y slug /y1,y2,y3/
E product/s1,s2,s3,s4,s5/



2012/5/29 Arne Stolbjerg Drud <ad...@arki.dk>
Reply all
Reply to author
Forward
0 new messages