Thank you Hossein Karim, Pedro Ramirez and Jose Quezada
The model is working correctly
Best regards
VÃctor OrtÃz
-----Mensaje original-----
De:
gamsworld@googlegroups.com [mailto:
gamsworld@googlegroups.com] En nombre
de hossein karimi
Enviado el: domingo, 17 de febrero de 2013 01:11 a.m.
Para:
gamsworld@googlegroups.com
Asunto: Re: Set Covering Problem
The correct model is as following:
* TITLE Set Covering;
Set i / i1*i6 / ;
Set k / k1*k6 / ;
Table d(i,k)
k1 k2 k3 k4 k5 k6
i1 1 1 0 1 0 0
i2 1 1 1 0 0 0
i3 0 1 1 0 0 1
i4 1 0 0 1 1 0
i5 0 0 0 1 1 1
i6 0 0 1 0 1 1 ;
Binary Variable Y(k);
Variables
z "Set Covering"
Equation AgebtoPtoEnc(i) , Def_obj ;
AgebtoPtoEnc(i)..sum(k, Y(k)*d(i,k)) =g= 1 ; Def_obj..z =e= sum(k, Y(k));
Model setcovering / all / ; Solve setcovering using mip minimizing z;
Display z.l, y.l ;
On 2/17/13, Victor Ortiz wrote:
> > Hello All,
> >
> >
> >
> > I need help with the problem below, I think the problem is in the
> > equation “AgebtoPtoEnc..â€
> >
> >
> >
> > I’ll be very gratefully if someone could help me.
> >
> >
> >
> > Best Regards
> >
> > VÃctor OrtÃz
> >
> >
> >
> >
> >
> >
> >
> > * TITLE Set Covering;
> >
> >
> >
> > Set i / i1*i6 / ;
> >
> > Set k / k1*k6 / ;
> >
> >
> >
> > Table d(i,k)
> >
> >
> >
> > k1 k2 k3 k4 k5 k6
> >
> > i1 1 1 0 1 0 0
> >
> > i2 1 1 1 0 0 0
> >
> > i3 0 1 1 0 0 1
> >
> > i4 1 0 0 1 1 0
> >
> > i5 0 0 0 1 1 1
> >
> > i6 0 0 1 0 1 1 ;
> >
> >
> >
> > Binary Variable Y(k);
> >
> >
> >
> > Variables
> >
> > z "Set Covering"
> >
> >
> >
> > Equation AgebtoPtoEnc , Def_obj ;
> >
> >
> >
> > AgebtoPtoEnc..
> >
> >
> >
> > sum(k, Y(k)*d[i,k)) =g= 1 ;
> >
> >
> >
> > Def_obj..
> >
> >
> >
> > z =e= sum(k, Y(k));
> >
> >
> >
> > Model setcovering / all / ;
> >
> >
> >
> > Solve setcovering using mip minimizing z;
> >
> >
> >
> > Display z.l, y.l ;
> >
> > --
> > You received this message because you are subscribed to the Google
> > Groups "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?hl=en.
> > For more options, visit
https://groups.google.com/groups/opt_out.
> >
> >
> >
--
"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?hl=en.
For more options, visit
https://groups.google.com/groups/opt_out.