Error $149 while trying to find maximum across columns for a 2d variable table

Hi,
I am new to GAMS and I am trying to solve a MIP problem.
I have a 2d table X(i,j) (say 35 table) and following variables:
a) y _( 3 elements)
b) z[j] (5 elements) // binary

Now, I want to add an equation, where each element y <= maximum number in i’th row of X
z (ie. calculating maximum across columns of X, for each row)
If, I try to do:
coverage … smax((j), X(i,j)*z[j]) =g= y(i); // i.e Multiply each element in each row of X with corresponding element in z and then find max along each row
I get a $149 error as following:

66 coverage … smax((j), X(i,j)*z[j]) =g= y(i);
**** $149 $149

Does anybody have an idea as to how can I model the above mentioned constraint? I have been stuck on it for days.
I have also tried to do this in GLPK solver as well, but hit the same roadblock.

Any help would be greatly appreciated.

Thanks a lot,



\

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 Gupta

What about

Coverage(i) … smax((j), X(i,j)*z[j]) =g= y(i);

Hope this is what you are looking for

Cheers

Renger



From: gamsworld@googlegroups.com [mailto:gamsworld@googlegroups.com] On Behalf Of Pankhuri Gupta
Sent: Monday, November 25, 2013 9:25 AM
To: gamsworld@googlegroups.com
Subject: Error $149 while trying to find maximum across columns for a 2d variable table



Hi,

I am new to GAMS and I am trying to solve a MIP problem.

I have a 2d table X(i,j) (say 3*5 table) and following variables:

a) y _( 3 elements)

b) z[j] (5 elements) // binary



Now, I want to add an equation, where each element y <= maximum number in i’th row of X*z (ie. calculating maximum across columns of X, for each row)

If, I try to do:

coverage … smax((j), X(i,j)*z[j]) =g= y(i); // i.e Multiply each element in each row of X with corresponding element in z and then find max along each row

I get a $149 error as following:



66 coverage … smax((j), X(i,j)*z[j]) =g= y(i);

**** $149 $149



Does anybody have an idea as to how can I model the above mentioned constraint? I have been stuck on it for days.

I have also tried to do this in GLPK solver as well, but hit the same roadblock.



Any help would be greatly appreciated.



Thanks a lot,






\

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.\
\

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._

Thanks a lot Renger,
It worked. I was missing such a small thing!

Could you also kindly tell me, from where can I get the licensed version of GAMS. I downloaded the linux_x86_64 exe from the gamsworld.com site. However, this would only be the student/demo version.
I need to use this model for bigger data.

Thanks again.

On Monday, November 25, 2013 4:07:18 AM UTC-5, Renger van Nieuwkoop wrote:

Hi Gupta

What about

Coverage(i) … smax((j), X(i,j)*z[j]) =g= y(i);

Hope this is what you are looking for

Cheers

Renger



From: gams...@googlegroups.com [mailto:gams...@googlegroups.com] On Behalf Of Pankhuri Gupta
Sent: Monday, November 25, 2013 9:25 AM
To: gams...@googlegroups.com
Subject: Error $149 while trying to find maximum across columns for a 2d variable table



Hi,

I am new to GAMS and I am trying to solve a MIP problem.

I have a 2d table X(i,j) (say 3*5 table) and following variables:

a) y _( 3 elements)

b) z[j] (5 elements) // binary



Now, I want to add an equation, where each element y <= maximum number in i’th row of X*z (ie. calculating maximum across columns of X, for each row)

If, I try to do:

coverage … smax((j), X(i,j)*z[j]) =g= y(i); // i.e Multiply each element in each row of X with corresponding element in z and then find max along each row

I get a $149 error as following:



66 coverage … smax((j), X(i,j)*z[j]) =g= y(i);

**** $149 $149



Does anybody have an idea as to how can I model the above mentioned constraint? I have been stuck on it for days.

I have also tried to do this in GLPK solver as well, but hit the same roadblock.



Any help would be greatly appreciated.



Thanks a lot,






\

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.\
\

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._

Www.gams.com
Cheers
Renger

sent from my iPad

Am 25.11.2013 um 22:17 schrieb “Pankhuri Gupta” :

Thanks a lot Renger,
It worked. I was missing such a small thing!

Could you also kindly tell me, from where can I get the licensed version of GAMS. I downloaded the linux_x86_64 exe from the gamsworld.com site. However, this would only be the student/demo version.
I need to use this model for bigger data.

Thanks again.

On Monday, November 25, 2013 4:07:18 AM UTC-5, Renger van Nieuwkoop wrote:

Hi Gupta

What about

Coverage(i) ..     smax((j), X(i,j)*z[j]) =g= y(i);

Hope this is what you are looking for

Cheers

Renger



From: gams...@googlegroups.com [mailto:gams...@googlegroups.com] On Behalf Of Pankhuri Gupta
Sent: Monday, November 25, 2013 9:25 AM
To: gams...@googlegroups.com
Subject: Error $149 while trying to find maximum across columns for a 2d variable table



Hi,

   I am new to GAMS and I am trying to solve a MIP problem.

   I have a 2d table X(i,j)  (say 3*5 table) and following variables:

     a) y _( 3 elements)

     b) z[j]   (5 elements)     // binary



   Now, I want to add an equation, where each element y
   If, I try to do:

   coverage ..     smax((j), X(i,j)*z[j]) =g= y(i);                  // i.e Multiply each element in each row of X with corresponding element in z and then find max along each row

   I get a $149 error as following:



  66          coverage ..     smax((j), X(i,j)*z[j]) =g= y(i);

****                                              $149            $149



   Does anybody have an idea as to how can I model the above mentioned constraint? I have been stuck on it for days.

   I have also tried to do this in GLPK solver as well, but hit the same roadblock.



   Any help would be greatly appreciated.



Thanks a lot,







--
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.


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.\


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._

Thanks !

On Tuesday, November 26, 2013 12:00:01 AM UTC-5, Renger van Nieuwkoop wrote:

Www.gams.com
Cheers
Renger

sent from my iPad

Am 25.11.2013 um 22:17 schrieb “Pankhuri Gupta” :

Thanks a lot Renger,
It worked. I was missing such a small thing!

Could you also kindly tell me, from where can I get the licensed version of GAMS. I downloaded the linux_x86_64 exe from the gamsworld.com site. However, this would only be the student/demo version.
I need to use this model for bigger data.

Thanks again.

On Monday, November 25, 2013 4:07:18 AM UTC-5, Renger van Nieuwkoop wrote:

    Hi Gupta

    What about

    Coverage(i) ..     smax((j), X(i,j)*z[j]) =g= y(i);

    Hope this is what you are looking for

    Cheers

    Renger



    From: gams...@googlegroups.com [mailto:gams...@googlegroups.com] On Behalf Of Pankhuri Gupta
    Sent: Monday, November 25, 2013 9:25 AM
    To: gams...@googlegroups.com
    Subject: Error $149 while trying to find maximum across columns for a 2d variable table



    Hi,

       I am new to GAMS and I am trying to solve a MIP problem.

       I have a 2d table X(i,j)  (say 3*5 table) and following variables:

         a) y _( 3 elements)

         b) z[j]   (5 elements)     // binary



       Now, I want to add an equation, where each element y
       If, I try to do:

       coverage ..     smax((j), X(i,j)*z[j]) =g= y(i);                  // i.e Multiply each element in each row of X with corresponding element in z and then find max along each row

       I get a $149 error as following:



      66          coverage ..     smax((j), X(i,j)*z[j]) =g= y(i);

    ****                                              $149            $149



       Does anybody have an idea as to how can I model the above mentioned constraint? I have been stuck on it for days.

       I have also tried to do this in GLPK solver as well, but hit the same roadblock.



       Any help would be greatly appreciated.



    Thanks a lot,







    --
    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.

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

\

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._