Entering some element of Subset twice

I’m planning aircrew allocation problem.
The error msg “Element is redifined” showed up when elements of set fday and tday was given below.

element “3” of set fday is supposed to be entered twice… “c” of set tday is as same as “3”.

Can you share with me the solution?

Regards…

set
f mission / 1 2 3 4 5 6 7 8 9 10 /
fday(f) today mission / 1 3 3 6 8 /
t takeoff time / a b c d e f g h i j /
tday(t) today takeoff time / a c c f h /
s seat number / 1 2 3 4 /
r pilot name / aa bb cc dd /
binary variable
X(f,s,t,r)

equations

pw1(f,t,r)$(ord(fday)=ord(tday))
SUM(s, X(f,s,t,r)) =e= 2 …

Error occured at Q1…


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/groups/opt_out.

Youngki, you can’t define a set that has two members with the same
name. You will need to find the way to arrange your model structure to
capture what you need. Ask if you need any additional help!.

Regards
Claudio

On Tue, Feb 18, 2014 at 12:54 AM, YOUNGKI CHOI wrote:

I’m planning aircrew allocation problem.
The error msg “Element is redifined” showed up when elements of set fday and
tday was given below.

element “3” of set fday is supposed to be entered twice… “c” of set tday
is as same as “3”.

Can you share with me the solution?

Regards…

set
f mission / 1 2 3 4 5 6 7 8 9 10 /
fday(f) today mission / 1 3 3 6 8 /
t takeoff time / a b c d e f g h i j /
tday(t) today takeoff time / a c c f h /
s seat number / 1 2 3 4 /
r pilot name / aa bb cc dd /
binary variable
X(f,s,t,r)

equations

pw1(f,t,r)$(ord(fday)=ord(tday))
SUM(s, X(f,s,t,r)) =e= 2 …

Error occured at Q1…


“gamsworld” group.
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/groups/opt_out.

\

hi! Claudio,
I’m trying to find the another way to arrange my model.
Thanks, Claudio for your reponse.


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/groups/opt_out.