Hi Andrew,

> NEW: The bound perturbation technique was implemented in the primal
> simplex solver (now this feature is enabled by default).

I did some testing and it seems to work fine: I run most of the
instances in the "Benchmark of Simplex LP solvers" by H. Mittelmann (
http://plato.asu.edu/ftp/lpsimp.html ) and for many fewer iterations
are needed now, while two more can be solved (neos2 and neos3).

One thing I noticed is that in some cases primal feasibility is lost
when removing the perturbation. The attached patch is a hack to
continue using the dual simplex solver when this happens. This further
improves solution times for some instances and allows two more to be
solved (self and stat96v1). I'm not suggesting to add this patch as
is, just sending it for easy testing.

Best Regards,

Chris Matrakidis
diff --git a/src/glpapi06.c b/src/glpapi06.c
index 4a5267c..f23fb25 100644
--- a/src/glpapi06.c
+++ b/src/glpapi06.c
@@ -245,7 +245,10 @@ static int solve_lp(glp_prob *P, const glp_smcp *parm)
          if (ret != 0) goto done;
       }
       if (parm->meth == GLP_PRIMAL)
-         ret = spx_primal(P, parm);
+      {  ret = spx_primal(P, parm);
+         if (ret == -1 && P->valid)
+            ret = spx_dual(P, parm);
+      }
       else if (parm->meth == GLP_DUALP)
       {  ret = spx_dual(P, parm);
          if (ret == GLP_EFAIL && P->valid)
diff --git a/src/simplex/spxprim.c b/src/simplex/spxprim.c
index 3f09b6c..ad29b4f 100644
--- a/src/simplex/spxprim.c
+++ b/src/simplex/spxprim.c
@@ -1040,6 +1040,12 @@ loop: /* main loop starts here */
                xprintf("Perturbation removed at iteration %d\n",
                   csa->it_cnt);
 #endif
+            if (check_feas(csa, 2, tol_bnd, tol_bnd1))
+            {  if (msg_lev >= GLP_MSG_ALL)
+                  xprintf("Switching to dual\n");
+               ret = -1;
+               goto fini;
+            }
          }
 #endif
          if (csa->beta_st != 1)
_______________________________________________
Help-glpk mailing list
Help-glpk@gnu.org
https://lists.gnu.org/mailman/listinfo/help-glpk

Reply via email to