source: ThirdParty/Glpk/stable/1.4/glpk.patch @ 3340

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

downgrade to use glpk 4.30 again (because fixes in OsiGlpk? trunk to use it with glpk >= 4.31 are not merged into stable/0.99 yet)

File size: 1.9 KB
RevLine 
[1163]1diff -Naur glpkdummy/src/glpapi08.c glpk/src/glpapi08.c
2--- glpkdummy/src/glpapi08.c    Fri Aug 22 08:25:51 2008
[1109]3+++ glpk/src/glpapi08.c Fri Aug 22 08:31:53 2008
[1249]4@@ -349,9 +349,15 @@
[788]5       switch (ret)
6       {  case 0:
7             if (tree->mip->mip_stat == GLP_FEAS)
8-            {  if (parm->msg_lev >= GLP_MSG_ALL)
9-                  xprintf("INTEGER OPTIMAL SOLUTION FOUND\n");
10-               tree->mip->mip_stat = GLP_OPT;
11+             { if (ios_relative_gap(tree) > 0) {
12+                               if (parm->msg_lev >= GLP_MSG_ALL)
13+                                       xprintf("INTEGER FEASIBLE SOLUTION FOUND, GAP SMALLER THAN TOLERANCE\n");
14+                               tree->mip->mip_stat = GLP_FEAS;
15+               } else {
16+                       if (parm->msg_lev >= GLP_MSG_ALL)
17+                               xprintf("INTEGER OPTIMAL SOLUTION FOUND\n");
18+                       tree->mip->mip_stat = GLP_OPT;
19+               }
20             }
21             else
22             {  if (parm->msg_lev >= GLP_MSG_ALL)
[1163]23diff -Naur glpkdummy/src/glpios03.c glpk/src/glpios03.c
24--- glpkdummy/src/glpios03.c    Wed Aug 13 04:00:00 2008
[1109]25+++ glpk/src/glpios03.c Fri Aug 22 08:32:10 2008
[1249]26@@ -1346,7 +1346,7 @@
[788]27          {  if (tree->parm->msg_lev >= GLP_MSG_DBG)
28                xprintf("Relative gap tolerance reached; search terminat"
29                   "ed\n");
30-            ret = GLP_ETMLIM;
31+            ret = 0;
32             goto done;
33          }
34 #endif
[1249]35diff -Naur glpk/src/glplpx01.c.orig glpk/src/glplpx01.c
[1169]36--- glpk/src/glplpx01.c.orig    2008-09-05 19:44:36.000000000 +0200
37+++ glpk/src/glplpx01.c 2008-09-05 19:42:45.000000000 +0200
[1249]38@@ -333,7 +333,7 @@
[1169]39       ret = glp_simplex(lp, &parm);
40       switch (ret)
41       {  case 0:           ret = LPX_E_OK;      break;
42-         case GLP_EBADB:
43+         case GLP_EBADB:   ret = LPX_E_BADB;    break;
44          case GLP_ESING:
45          case GLP_ECOND:
46          case GLP_EBOUND:  ret = LPX_E_FAULT;   break;
Note: See TracBrowser for help on using the repository browser.