source: ThirdParty/Glpk/releases/1.4.3/glpk.patch @ 1182

Last change on this file since 1182 was 1182, checked in by stefan, 11 years ago

lost changeset

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
[1179]4@@ -348,9 +348,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
[1179]26@@ -1364,7 +1364,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
[1182]35diff -Naur glpk/src/glpios03.c.orig glpk/src/glpios03.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
[1179]38@@ -376,7 +376,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.