[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-glpk] Assertion failure in glp_simplex GLPK-4.18

From: Andrew Makhorin
Subject: Re: [Bug-glpk] Assertion failure in glp_simplex GLPK-4.18
Date: Wed, 4 Jul 2007 13:52:31 +0400

> I am using GLPK-4.18 with the new version of octave 2.9.12. I've
> pasted in the octave program in case it is needed as a reference.
> The bug however is that in glplpx01.c the assertion on line 345
> fails because there is no case in the switch statement for error
> code 0x4.

> Here is the error code clipped from glpk.h:   
> #define GLP_EBOUND   0x04  /* invalid bounds */

> This error is returned by glp_simplex in routine lpx_simplex.
> Additionally, it lokks like many cases are not handled in this case
> statement.

> I'd send a patch but I don't know the error code mappings well
> enough to map between the error code sets.

Thank you for the bug report.

The error code GLP_EBOUND means that some double-bounded (auxiliary
or structural) variable has incorrect bounds, i.e. its lower bound
is not less than its upper bound, so the simplex solver cannot start
the search.

This code was introduced in glp_simplex, which replaces lpx_simplex,
however, I forgot to modify lpx_simplex accordingly.

To fix the bug, please add the corresponding case to the routine
lpx_simplex (see file glplpx01.c) as follows:

      ret = glp_simplex(lp, &parm);
      switch (ret)
      {  case 0:           ret = LPX_E_OK;      break;
         case GLP_EBADB:
         case GLP_ESING:
         case GLP_ECOND:
         case GLP_EBOUND:  ret = LPX_E_FAULT;   break;
         case GLP_EFAIL:   ret = LPX_E_SING;    break;
         case GLP_EOBJLL:  ret = LPX_E_OBJLL;   break;
         case GLP_EOBJUL:  ret = LPX_E_OBJUL;   break;
         case GLP_EITLIM:  ret = LPX_E_ITLIM;   break;
         case GLP_ETMLIM:  ret = LPX_E_TMLIM;   break;
         case GLP_ENOPFS:  ret = LPX_E_NOPFS;   break;
         case GLP_ENODFS:  ret = LPX_E_NODFS;   break;
         default:          xassert(ret != ret);
      return ret;

Andrew Makhorin

reply via email to

[Prev in Thread] Current Thread [Next in Thread]