source: ThirdParty/Glpk/trunk/glpk.patch @ 788

Last change on this file since 788 was 788, checked in by stefan, 12 years ago

update to glpk 4.24
add patch to get correct status code if terminated because the gap is closed

File size: 1.9 KB
  • include/glpk.h

    diff -Naur glpk/include/glpk.h glpk.patched/include/glpk.h
    old new  
    3030
    3131/* library version numbers: */
    3232#define GLP_MAJOR_VERSION  4
    33 #define GLP_MINOR_VERSION  23
     33#define GLP_MINOR_VERSION  24
    3434
    3535#ifndef _GLP_PROB
    3636#define _GLP_PROB
  • src/glpapi08.c

    diff -Naur glpk.OLD/src/glpapi08.c glpk.patched/src/glpapi08.c
    old new  
    345345      switch (ret)
    346346      {  case 0:
    347347            if (tree->mip->mip_stat == GLP_FEAS)
    348             {  if (parm->msg_lev >= GLP_MSG_ALL)
    349                   xprintf("INTEGER OPTIMAL SOLUTION FOUND\n");
    350                tree->mip->mip_stat = GLP_OPT;
     348             { if (ios_relative_gap(tree) > 0) {
     349                               if (parm->msg_lev >= GLP_MSG_ALL)
     350                                       xprintf("INTEGER FEASIBLE SOLUTION FOUND, GAP SMALLER THAN TOLERANCE\n");
     351                               tree->mip->mip_stat = GLP_FEAS;
     352               } else {
     353                       if (parm->msg_lev >= GLP_MSG_ALL)
     354                               xprintf("INTEGER OPTIMAL SOLUTION FOUND\n");
     355                       tree->mip->mip_stat = GLP_OPT;
     356               }
    351357            }
    352358            else
    353359            {  if (parm->msg_lev >= GLP_MSG_ALL)
  • src/glpios03.c

    diff -Naur glpk.OLD/src/glpios03.c glpk.patched/src/glpios03.c
    old new  
    13411341         {  if (tree->parm->msg_lev >= GLP_MSG_DBG)
    13421342               xprintf("Relative gap tolerance reached; search terminat"
    13431343                  "ed\n");
    1344             ret = GLP_ETMLIM;
     1344            ret = 0;
    13451345            goto done;
    13461346         }
    13471347#endif
Note: See TracBrowser for help on using the repository browser.