Maimal Covering Problem

Hello All,



I need help to run the problem below, unfortunately my version of gams is just a demo and the solution exceeds the capacity.



Note, attached are the model on Gams.



I’ll be glad if someone could help me to run it:




\

  • TITLE Max Covering;

Set i / i1*i22 / ;

Set k / k1*k30 / ;



Table d(i,k)

k1 k2 k3 k4 k5 k6 k7 k8 k9 k10 k11 k12 k13 k14 k15 k16 k17 k18 k19 k20 k21 k22 k23 k24 k25 k26 k27 k28 k29 k30

i1 1 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

i2 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

i3 0 1 1 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

i4 1 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

i5 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

i6 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

i7 0 0 1 0 0 0 0 1 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

i8 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

i9 0 0 0 0 0 0 0 0 1 1 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

i10 0 0 0 0 0 0 0 1 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

i11 0 0 0 0 0 0 0 0 0 1 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

i12 0 0 0 0 0 0 0 0 0 0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

i13 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0

i14 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0 0 0

i15 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0

i16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0

i17 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0 0 0

i18 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 1 1

i19 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1

i20 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0

i21 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0

i22 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0 ;



Scalar p

/ 7 / ;



Parameter a(i) / i1 200 ,i2 300 ,i3 200 ,i4 100 ,i5 300 ,i6 300 ,i7 100 ,i8 200 ,i9 100 ,i10 100 ,i11 300 ,i12 200 ,i13 400 ,i14 400 ,i15 300 ,i16 300 ,i17 100 ,i18 100 ,i19 200 ,i20 300 ,i21 300 ,i22 200 / ;



Binary Variable Y(k), Z(i);



Variables

w “Maximal Covering”



Equation AgebtoPtoEnc(i) , Def_obj, LimitAgeb;



Def_obj…



w =e= sum(i, a(i)*Z(i));



AgebtoPtoEnc(i)…



Z(i) =l= sum(k, Y(k)*d(i,k));



LimitAgeb…



sum (k, Y(k)) =e= p



Model maxcovering / all / ;



Solve maxcovering using mip maximazing w;



Display w.l, Y.l, Z.l ;





Thank you and best regards



Víctor Ortíz




Attachments-79/Maximal Covering-2.gms

You could try www.neos-server.org.

Cheers,
-Jeff

On 02/18/2013 08:48 PM, Victor Ortiz wrote:

Hello All,

I need help to run the problem below, unfortunately my version of gams
is just a demo and the solution exceeds the capacity.

Note, attached are the model on Gams.

I’ll be glad if someone could help me to run it:

  • TITLE Max Covering;

Set i / i1*i22 / ;

Set k / k1*k30 / ;

Table d(i,k)

       k1       k2       k3       k4       k5       k6

k7 k8 k9 k10 k11 k12 k13 k14
k15 k16 k17 k18 k19 k20 k21 k22
k23 k24 k25 k26 k27 k28 k29 k30

i1 1 1 0 1 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0

i2 1 1 1 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0

i3 0 1 1 0 0 1 1
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0

i4 1 0 0 1 1 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0

i5 0 0 0 1 1 1 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0

i6 0 0 0 0 1 1 1
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0

i7 0 0 1 0 0 0 0
1 1 0 0 1 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0

i8 0 0 0 0 0 0 0
1 1 1 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0

i9 0 0 0 0 0 0 0
0 1 1 1 0 0 1 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0

i10 0 0 0 0 0 0 0
1 0 0 0 1 1 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0

i11 0 0 0 0 0 0 0
0 0 1 0 1 1 1
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0

i12 0 0 0 0 0 0 0
0 0 0 1 0 1 1 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0

i13 0 0 0 0 0 0 0
0 0 0 0 0 0 0 1
1 1 1 1 0 0 0 0
0 0 0 0 0 0 0

i14 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 1 1 1 1 0 0 0
0 0 0 0 0 0 0

i15 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 1 1 1 0 0
0 0 0 0 0 0 0

i16 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 1 1 1 0
0 0 0 0 0 0 0

i17 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 1 1 1
1 0 0 0 0 0 0

i18 0 0 0 0 0 0 0
0 0 0 0 0 0 0 1
1 0 0 0 0 0 0 0
0 0 0 0 0 1 1

i19 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 1 1 1

i20 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 1 1 0 0

i21 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 1 1 1 0 0 0

i22 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 1
1 1 1 0 0 0 0 ;

Scalar p

/ 7 / ;

Parameter a(i) / i1 200 ,i2
300 ,i3 200 ,i4 100 ,i5
300 ,i6 300 ,i7 100 ,i8
200 ,i9 100 ,i10 100 ,i11
300 ,i12 200 ,i13 400 ,i14
400 ,i15 300 ,i16 300 ,i17
100 ,i18 100 ,i19 200 ,i20
300 ,i21 300 ,i22 200 / ;

Binary Variable Y(k), Z(i);

Variables

      w "Maximal Covering"

Equation AgebtoPtoEnc(i) , Def_obj, LimitAgeb;

Def_obj…

w =e= sum(i, a(i)*Z(i));

AgebtoPtoEnc(i)…

Z(i) =l= sum(k, Y(k)*d(i,k));

LimitAgeb…

sum (k, Y(k)) =e= p

Model maxcovering / all / ;

Solve maxcovering using mip maximazing w;

Display w.l, Y.l, Z.l ;

Thank you and best regards

Víctor Ortíz


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.


\

Jeff Linderoth, Professor
Dept. of Industrial and Systems Engineering
University of Wisconsin-Madison
O: 608-890-1931
http://www.engr.wisc.edu/ie/faculty/linderoth_jeffrey.html


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.


\