[PPL-devel] [Fwd: Re: [Bug-glpk] Bug in glpk 4.21?]

Roberto Bagnara bagnara at cs.unipr.it
Sat Sep 1 06:20:11 CEST 2007



-------- Original Message --------
Subject: Re: [Bug-glpk] Bug in glpk 4.21?
Date: Sat, 1 Sep 2007 00:12:19 +0400
From: Andrew Makhorin <mao at gnu.org>
Reply-To: Andrew Makhorin <mao at gnu.org>
To: Roberto Bagnara <bagnara at cs.unipr.it>
CC: bug-glpk at gnu.org
References: <10376349.20070831204809 at gnu.org>

> For the attached testcase, we obtain that

> $ glpsol p0033.mps --max -o output.gomory --gomory

> gives an optimum of 5201, while

> $ glpsol p0033.mps --max -o output.intopt --intopt

> gives an optimum of 5131.  The optimum 5201 is confirmed
> by a completely different MIP solver.
> Does this behavior indicate there is a bug somewhere?

Thank you very much for your bug report.

The bug appears only in 4.21 in the mip preprocessor (which is part
of the routine glp_intopt).

To fix the bug please replace the fragment in the routine
ios_preprocess_node (file src/glpios02.c) between #if 0 and #else
by the corresponding fragment between #else and #endif as follows:

       /* determine original row bounds */
       L = xcalloc(1+m, sizeof(double));
       U = xcalloc(1+m, sizeof(double));
#if 0
       switch (mip->mip_stat)
       {  case GLP_UNDEF:
             L[0] = -DBL_MAX, U[0] = +DBL_MAX;
             break;
          case GLP_FEAS:
             switch (mip->dir)
             {  case GLP_MIN:
                   L[0] = -DBL_MAX, U[0] = mip->mip_obj;
                   break;
                case GLP_MAX:
                   L[0] = mip->mip_obj, U[0] = +DBL_MAX;
                   break;
                default:
                   xassert(mip != mip);
             }
             break;
          default:
             xassert(mip != mip);
       }
#else
       L[0] = -DBL_MAX, U[0] = +DBL_MAX;
#endif
       for (i = 1; i <= m; i++)
       {  L[i] = glp_get_row_lb(mip, i);
          U[i] = glp_get_row_ub(mip, i);
       }
       /* determine original column bounds */

and then compile the package as usual.


Andrew Makhorin


-- 
Prof. Roberto Bagnara
Computer Science Group
Department of Mathematics, University of Parma, Italy
http://www.cs.unipr.it/~bagnara/
mailto:bagnara at cs.unipr.it



More information about the PPL-devel mailing list