Hi every body,
I have a code like the following:
set i/citieis/
alias(i,ii)
set OD(i,ii)
*
each element of OD is a pair of (origin,destination). I wonder how can I refer t the first element of a pair in a constriant. I know we can use ORD to refer to a specific element of a set but I want to refer to a n element inside an element of a set/
Thanks
\
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 can specifically refer to the elements by putting them in single quotation like (‘x’,’y’) given that ‘x’ and ‘y’ are elements of set i.
Yonas
From: gamsworld@googlegroups.com [mailto:gamsworld@googlegroups.com] On Behalf Of Fateme Fotuhi
Sent: 8. april 2014 03:42
To: gamsworld@googlegroups.com
Subject: refer to an element of a two dimensional set
Hi every body,
I have a code like the following:
*
set i/citieis/
alias(i,ii)
set OD(i,ii)
each element of OD is a pair of (origin,destination). I wonder how can I refer t the first element of a pair in a constriant. I know we can use ORD to refer to a specific element of a set but I want to refer to a n element inside an element of a set/
Thanks
\
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.
Thank you but my cities are not in text format, they are numbers and if I want to write a constriant over all OD pairs, I can not refer to the first element like this: ‘i’
it will give me an error
On Tuesday, April 8, 2014 6:30:29 AM UTC-4, Yonas Gebrekiros wrote:
HI,
You can specifically refer to the elements by putting them in single quotation like (‘x’,’y’) given that ‘x’ and ‘y’ are elements of set i.
Yonas
From: gams...@googlegroups.com [mailto:gams...@googlegroups.com] On Behalf Of Fateme Fotuhi
Sent: 8. april 2014 03:42
To: gams...@googlegroups.com
Subject: refer to an element of a two dimensional set
Hi every body,
I have a code like the following:
*
set i/citieis/
alias(i,ii)
set OD(i,ii)
each element of OD is a pair of (origin,destination). I wonder how can I refer t the first element of a pair in a constriant. I know we can use ORD to refer to a specific element of a set but I want to refer to a n element inside an element of a set/
Thanks
\
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.