[Osi] OsiClp WarmStarts

Goossens Jan-Willem Jan-Willem.Goossens at nc3a.nato.int
Fri Oct 31 06:44:30 EDT 2008


Hi,

I have some questions about WarmStarts using OsiClp.
I'm solving pure LPs and I tried to recreate my real problem using miplib 3.0s "p0548" (See http://www.caam.rice.edu/~bixby/miplib/miplib3.html)
See below for code and output.

Basically, I (1) solve the problem, store a warm start, (2) change the objective and resolve, and (3) restore original objecte, load warmstart and resolve.
I was expecting the step (3) to take zero iterations. However, this is not (always) the case: In this test problem,
Test run 1) if I do NOT set hints concerning DoDualIn*, then indeed (3) takes zero iterations.
Test run 2) but if I set HintTry for these to false (so use primal), then (3) reoptimises (see end of email)

In my real instances the (3) resolve takes a *lot* of iterations.
Note that this test problem doesn't completely represent my real problem: the real instances show this behaviour even without the DoDual = false settings, but the resulting iterations are the same.

What could be the cause for these reoptimizations?
A) different algorithm after warmstart compared to solve warmstart was based on?
B) presolve chooses to remove different rows/columns in resolve?
C) something else?

Or is this simply not what the warmstarts are for?

Any help would be appreciated.
Regards,

Jan-Wilem Goossens

----------------------

Here is the test problem

      OsiClpSolverInterface model;

      model.setHintParam(OsiHintParam::OsiDoDualInInitial, false); // comment out
      model.setHintParam(OsiHintParam::OsiDoDualInResolve, false); // comment out
      model.setHintParam(OsiHintParam::OsiDoPresolveInInitial);
      model.setHintParam(OsiHintParam::OsiDoPresolveInResolve);

      int status = model.readMps("p0548.mps", true, false);
      int n = model.getNumCols();
      for (int i = 0; i < n; i++) model.setContinuous(i); // change to LP

      // (1) do initial solve of original problem, and store warm start info
      model.initialSolve();
      CoinWarmStart *warmStart = model.getWarmStart();

      // (2) change the objective function and resolve
      const double * objCoefs = model.getObjCoefficients();
      double * oldCoefs = new double[n];
      for (int i = 0; i < n; i++) oldCoefs[i] = objCoefs[i];
      for (int i = 0; i < n; i++) model.setObjCoeff(i,1.0);

      model.resolve();

      // (3) restore the original problem, and load warm start
      model.setObjective(oldCoefs);
      model.setWarmStart(warmStart);
      model.resolve();

OUTPUT:
Test run 1, with commented out:
      // model.setHintParam(OsiHintParam::OsiDoDualInInitial, false); // comment out
      // model.setHintParam(OsiHintParam::OsiDoDualInResolve, false); // comment out

      // (1) do initial solve of original problem, and store warm start info
Coin0506I Presolve 163 (-13) rows, 543 (-5) columns and 1561 (-150) elements
Clp0006I 0  Obj 0 Primal inf 38.8018 (12)
Clp0006I 95  Obj 315.255
Clp0000I Optimal - objective value 315.255
Coin0511I After Postsolve, objective 315.255, infeasibilities - dual 0 (0), primal 0 (0)
Clp0006I 0  Obj 315.255
Clp0006I 0  Obj 315.255
Clp0000I Optimal - objective value 315.255

      // (2) change the objective function and resolve
Coin0506I Presolve 165 (-11) rows, 543 (-5) columns and 1579 (-132) elements
Clp0006I 0  Obj 59.3381 Primal inf 0.314674 (1) Dual inf 161381 (290)
Clp0006I 103  Obj 16.571 Primal inf 8.57907 (29)
Clp0006I 165  Obj 26.1669
Clp0000I Optimal - objective value 26.1669
Coin0511I After Postsolve, objective 26.1669, infeasibilities - dual 0 (0), primal 0 (0)

      // (3) restore the original problem, and load warm start
Coin0506I Presolve 163 (-13) rows, 543 (-5) columns and 1561 (-150) elements
Clp0006I 0  Obj 366.255 Primal inf 30.9296 (2) Dual inf 304.123 (2)
Clp0000I Optimal - objective value 315.255
Coin0511I After Postsolve, objective 315.255, infeasibilities - dual 0 (0), primal 0 (0)

Test run 2, with:
      model.setHintParam(OsiHintParam::OsiDoDualInInitial, false);
      model.setHintParam(OsiHintParam::OsiDoDualInResolve, false);

      // (1) do initial solve of original problem, and store warm start info
Coin0506I Presolve 163 (-13) rows, 543 (-5) columns and 1561 (-150) elements
Clp0028I Crash put 44 variables in basis, 0 dual infeasibilities
Clp0006I 0  Obj 0 Primal inf 38.8018 (12) Dual inf 5.62868e+012 (120)
Clp0006I 132  Obj 20103.2 Primal inf 1.08159 (1) Dual inf 1.10445e+011 (193)
Clp0006I 289  Obj 345.667 Dual inf 627.385 (26)
Clp0006I 316  Obj 315.255
Clp0000I Optimal - objective value 315.255
Coin0511I After Postsolve, objective 315.255, infeasibilities - dual 0 (0), primal 0 (0)
Clp0006I 0  Obj 315.255
Clp0006I 0  Obj 315.255
Clp0000I Optimal - objective value 315.255

      // (2) change the objective function and resolve
Coin0506I Presolve 165 (-11) rows, 543 (-5) columns and 1579 (-132) elements
Clp0006I 0  Obj 69.5868 Dual inf 38838.5 (125)
Clp0006I 94  Obj 26.1669
Clp0000I Optimal - objective value 26.1669
Coin0511I After Postsolve, objective 26.1669, infeasibilities - dual 0 (0), primal 0 (0)
Coin0506I Presolve 163 (-13) rows, 543 (-5) columns and 1561 (-150) elements

      // (3) restore the original problem, and load warm start
Clp0006I 0  Obj 1817.67 Dual inf 3514.68 (6)
Clp0029I End of values pass after 37 iterations
Clp0006I 37  Obj 1817.67 Dual inf 3515.85 (5)
Clp0006I 170  Obj 336.741 Dual inf 20.3286 (24)
Clp0006I 202  Obj 315.255
Clp0000I Optimal - objective value 315.255
Coin0511I After Postsolve, objective 315.255, infeasibilities - dual 0 (0), primal 0 (0)

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/osi/attachments/20081031/6df8e55f/attachment.html>


More information about the Osi mailing list