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

Last change on this file since 895 was 814, checked in by stefan, 13 years ago

include fix for mir cut backsubstitution into patch

File size: 2.5 KB
RevLine 
[814]1diff -Naur glpk-4.24/include/glpk.h glpk/include/glpk.h
2--- glpk-4.24/include/glpk.h    2007-11-21 10:00:00.000000000 +0100
3+++ glpk/include/glpk.h 2007-11-26 10:14:41.000000000 +0100
[788]4@@ -30,7 +30,7 @@
5 
6 /* library version numbers: */
7 #define GLP_MAJOR_VERSION  4
8-#define GLP_MINOR_VERSION  23
9+#define GLP_MINOR_VERSION  24
10 
11 #ifndef _GLP_PROB
12 #define _GLP_PROB
[814]13diff -Naur glpk-4.24/src/glpapi08.c glpk/src/glpapi08.c
14--- glpk-4.24/src/glpapi08.c    2007-11-21 10:00:00.000000000 +0100
15+++ glpk/src/glpapi08.c 2007-11-26 10:14:41.000000000 +0100
[788]16@@ -345,9 +345,15 @@
17       switch (ret)
18       {  case 0:
19             if (tree->mip->mip_stat == GLP_FEAS)
20-            {  if (parm->msg_lev >= GLP_MSG_ALL)
21-                  xprintf("INTEGER OPTIMAL SOLUTION FOUND\n");
22-               tree->mip->mip_stat = GLP_OPT;
23+             { if (ios_relative_gap(tree) > 0) {
24+                               if (parm->msg_lev >= GLP_MSG_ALL)
25+                                       xprintf("INTEGER FEASIBLE SOLUTION FOUND, GAP SMALLER THAN TOLERANCE\n");
26+                               tree->mip->mip_stat = GLP_FEAS;
27+               } else {
28+                       if (parm->msg_lev >= GLP_MSG_ALL)
29+                               xprintf("INTEGER OPTIMAL SOLUTION FOUND\n");
30+                       tree->mip->mip_stat = GLP_OPT;
31+               }
32             }
33             else
34             {  if (parm->msg_lev >= GLP_MSG_ALL)
[814]35diff -Naur glpk-4.24/src/glpios03.c glpk/src/glpios03.c
36--- glpk-4.24/src/glpios03.c    2007-11-21 10:00:00.000000000 +0100
37+++ glpk/src/glpios03.c 2007-11-26 10:14:41.000000000 +0100
[788]38@@ -1341,7 +1341,7 @@
39          {  if (tree->parm->msg_lev >= GLP_MSG_DBG)
40                xprintf("Relative gap tolerance reached; search terminat"
41                   "ed\n");
42-            ret = GLP_ETMLIM;
43+            ret = 0;
44             goto done;
45          }
46 #endif
[814]47diff -Naur glpk-4.24/src/glpios05.c glpk/src/glpios05.c
48--- glpk-4.24/src/glpios05.c    2007-11-21 10:00:00.000000000 +0100
49+++ glpk/src/glpios05.c 2007-12-06 15:00:33.000000000 +0100
50@@ -1084,7 +1084,16 @@
51             else
52             {  /* x'[k] = x[k] - lb[k] * x[kk] */
53                jj = mir->cut_vec->pos[kk];
54+#if 0
55                xassert(jj != 0);
56+#else
57+               if (jj == 0)
58+               {  ios_set_vj(mir->cut_vec, kk, 1.0);
59+                  jj = mir->cut_vec->pos[kk];
60+                  xassert(jj != 0);
61+                  mir->cut_vec->val[jj] = 0.0;
62+               }
63+#endif
64                mir->cut_vec->val[jj] -= mir->cut_vec->val[j] *
65                   mir->lb[k];
66             }
Note: See TracBrowser for help on using the repository browser.