<html><body>
<p>I wasn't looking closely enough.<br>
<br>
The problem is that OsiClp sticks to Osi conventions and thinks that basis information is in a CoinWarmStartBasis object.  This is not set up by the OsiClpSolverInterface constructor.<br>
<br>
If you add<br>
<br>
 presolveModelOsi.setWarmStart(NULL);<br>
<br>
after constructor, - that will move across the current ClpSimplex basis<br>
<br>
John Forrest<br>
<br>
<img width="16" height="16" src="cid:1__=0ABBFC21DFABCF808f9e8a93df938@us.ibm.com" border="0" alt="Inactive hide details for Rune Møller Jensen ---01/21/2010 04:29:49 AM---Thanks for the reply."><font color="#424282">Rune Møller Jensen ---01/21/2010 04:29:49 AM---Thanks for the reply.</font><br>
<br>

<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr valign="top"><td width="1%"><img width="96" height="1" src="cid:2__=0ABBFC21DFABCF808f9e8a93df938@us.ibm.com" border="0" alt=""><br>
<font size="2" color="#5F5F5F">From:</font></td><td width="100%"><img width="1" height="1" src="cid:2__=0ABBFC21DFABCF808f9e8a93df938@us.ibm.com" border="0" alt=""><br>
<font size="2">Rune Møller Jensen &lt;rmj@itu.dk&gt;</font></td></tr>

<tr valign="top"><td width="1%"><img width="96" height="1" src="cid:2__=0ABBFC21DFABCF808f9e8a93df938@us.ibm.com" border="0" alt=""><br>
<font size="2" color="#5F5F5F">To:</font></td><td width="100%"><img width="1" height="1" src="cid:2__=0ABBFC21DFABCF808f9e8a93df938@us.ibm.com" border="0" alt=""><br>
<font size="2">&lt;clp@list.coin-or.org&gt;</font></td></tr>

<tr valign="top"><td width="1%"><img width="96" height="1" src="cid:2__=0ABBFC21DFABCF808f9e8a93df938@us.ibm.com" border="0" alt=""><br>
<font size="2" color="#5F5F5F">Date:</font></td><td width="100%"><img width="1" height="1" src="cid:2__=0ABBFC21DFABCF808f9e8a93df938@us.ibm.com" border="0" alt=""><br>
<font size="2">01/21/2010 04:29 AM</font></td></tr>

<tr valign="top"><td width="1%"><img width="96" height="1" src="cid:2__=0ABBFC21DFABCF808f9e8a93df938@us.ibm.com" border="0" alt=""><br>
<font size="2" color="#5F5F5F">Subject:</font></td><td width="100%"><img width="1" height="1" src="cid:2__=0ABBFC21DFABCF808f9e8a93df938@us.ibm.com" border="0" alt=""><br>
<font size="2">Re: [Clp] Correct setup for individual pivots though OSI interface</font></td></tr>

<tr valign="top"><td width="1%"><img width="96" height="1" src="cid:2__=0ABBFC21DFABCF808f9e8a93df938@us.ibm.com" border="0" alt=""><br>
<font size="2" color="#5F5F5F">Sent by:</font></td><td width="100%"><img width="1" height="1" src="cid:2__=0ABBFC21DFABCF808f9e8a93df938@us.ibm.com" border="0" alt=""><br>
<font size="2">clp-bounces@list.coin-or.org</font></td></tr>
</table>
<hr width="100%" size="2" align="left" noshade style="color:#8091A5; "><br>
<br>
<br>
<font color="#1F497D" face="Calibri">Thanks for the reply. </font><br>
<font color="#1F497D" face="Calibri"> </font><br>
<font color="#1F497D" face="Calibri">Yes, but the fact is actually that we do a less aggressive presolve the second time with:</font><br>
<font color="#1F497D" face="Calibri">setDoDual(false);            </font><br>
<font color="#1F497D" face="Calibri">setDoSingleton(false);       </font><br>
<font color="#1F497D" face="Calibri">setDoDoubleton(false);       </font><br>
<font color="#1F497D" face="Calibri">setDoTripleton(false);       </font><br>
<font color="#1F497D" face="Calibri">setDoImpliedFree(false);      </font><br>
<font color="#1F497D" face="Calibri">setDoDupcol(false);          </font><br>
<font color="#1F497D" face="Calibri">setDoSingletonColumn(false);</font><br>
<font color="#1F497D" face="Calibri"> </font><br>
<font color="#1F497D" face="Calibri">This has to do with computing the non-linear objective efficiently for variables in the presolved model. We would like to keep the most aggressive presolve for initially solving the LP. My understanding is that after model.initalSolve(), model has a feasible basis ready for a warm start. Doing presolve on it maintains the optimal basis, so setting up the tableau for pivoting should be an operation with low complexity. Thus, I would expect running presolveModel-&gt;primal() or presolveModel-&gt;dual() basically just would confirm optimality and return fast. But they don’t. They behave as solving the problem from scratch with primal and dual infeasibilities. Why does this happen? Is there any way for me to setup the tableau of presolvedModel fast for pivoting?</font><br>
<font color="#1F497D" face="Calibri"> </font><br>
<font color="#1F497D" face="Calibri">Thanks a lot for any help on this!</font><br>
<font color="#1F497D" face="Calibri"> </font><br>
<font color="#1F497D" face="Calibri">Best,</font><br>
<font color="#1F497D" face="Calibri">Rune Møller Jensen</font><br>
<font color="#1F497D" face="Calibri"> </font><br>
<b><font face="Tahoma">From:</font></b><font face="Tahoma"> John J Forrest [</font><font face="Tahoma"><a href="mailto:jjforre@us.ibm.com">mailto:jjforre@us.ibm.com</a></font><font face="Tahoma">] </font><b><font face="Tahoma"><br>
Sent:</font></b><font face="Tahoma"> Wednesday, January 20, 2010 7:11 PM</font><b><font face="Tahoma"><br>
To:</font></b><font face="Tahoma"> Rune Møller Jensen</font><b><font face="Tahoma"><br>
Subject:</font></b><font face="Tahoma"> Re: [Clp] Correct setup for individual pivots though OSI interface</font><br>
<font size="4" face="Times New Roman"> </font>
<p><font size="4" face="Times New Roman">model.initialSolve() is probably doing presolve, solving, postsolving and then possibly doing primal to clean up any glitches.<br>
<br>
why not omit model.initialSolve() and try presolvedModel-&gt;dual() instead. That could easily be faster as you are just doing one presolve not two and one solve not two<br>
<br>
John Forrest<br>
<br>
</font><img src="cid:1__=0ABBFC21DFABCF808f9e8a93df938@us.ibm.com" width="16" height="16" alt="Inactive hide details for Rune Møller Jensen ---01/20/2010 10:58:02 AM---Hi,"><font size="4" color="#424282" face="Times New Roman">Rune Møller Jensen ---01/20/2010 10:58:02 AM---Hi,</font>
<p>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr valign="top"><td width="23%"><font color="#5F5F5F" face="Times New Roman"><br>
From:</font></td><td width="77%"><font face="Times New Roman"><br>
Rune Møller Jensen &lt;rmj@itu.dk&gt;</font></td></tr>

<tr valign="top"><td width="23%"><font color="#5F5F5F" face="Times New Roman"><br>
To:</font></td><td width="77%"><font face="Times New Roman"><br>
&lt;Clp@list.coin-or.org&gt;</font></td></tr>

<tr valign="top"><td width="23%"><font color="#5F5F5F" face="Times New Roman"><br>
Date:</font></td><td width="77%"><font face="Times New Roman"><br>
01/20/2010 10:58 AM</font></td></tr>

<tr valign="top"><td width="23%"><font color="#5F5F5F" face="Times New Roman"><br>
Subject:</font></td><td width="77%"><font face="Times New Roman"><br>
[Clp] Correct setup for individual pivots though OSI interface</font></td></tr>

<tr valign="top"><td width="23%"><font color="#5F5F5F" face="Times New Roman"><br>
Sent by:</font></td><td width="77%"><u><font color="#0000FF" face="Times New Roman"><br>
</font></u><a href="mailto:clp-bounces@list.coin-or.org"><u><font color="#0000FF" face="Times New Roman">clp-bounces@list.coin-or.org</font></u></a></td></tr>
</table>
<hr width="100%" size="2" align="left" noshade><br>
<font size="4" face="Times New Roman"><br>
<br>
</font><font size="4" face="Calibri"><br>
Hi,</font><font size="4" face="Times New Roman"><br>
</font><font size="4" face="Calibri"><br>
We first solve a Clp model to optimality</font><font size="4" face="Times New Roman"><br>
</font><font size="4" face="Calibri"><br>
ClpSimplex model<br>
… code loading problem<br>
model.initalSolve()</font><font size="4" face="Times New Roman"><br>
</font><font size="4" face="Calibri"><br>
We then want to make a couple of pivots to reduce a slightly changed non-linear objective (which we compute on the side)</font><font size="4" face="Times New Roman"><br>
</font><font size="4" face="Calibri"><br>
We first presolve</font><font size="4" face="Times New Roman"><br>
</font><font size="4" face="Calibri"><br>
ClpPresolve presolveInfo; <br>
ClpSimplex * presolvedModel = presolveInfo.presolvedModel(model); </font><font size="4" face="Times New Roman"><br>
</font><font size="4" face="Calibri"><br>
Then setup an Osi interface to do individual pivots</font><font size="4" face="Times New Roman"><br>
</font><font size="4" face="Calibri"><br>
 OsiClpSolverInterface presolveModelOsi(presolvedModel);          <br>
 presolveModelOsi.enableSimplexInterface(1);                        </font><font size="4" face="Times New Roman"><br>
</font><font size="4" face="Calibri"><br>
And finally do individual pivots</font><font size="4" face="Times New Roman"><br>
</font><font size="4" face="Calibri"><br>
while (running)<br>
   …<br>
  presolveModelOsi.pivot(colIn,colOut,outStatus);<br>
  …</font><font size="4" face="Times New Roman"><br>
</font><font size="4" face="Calibri"><br>
Unfortunately pivots only seems to be carried out correctly if we resolve the presolved model (e.g.,  by executing presolveModel.primal() before making the Osi interface). The problem seems to be that not all necessary status variables of the tableau are instantiated in presolveModel to do individual pivots, but is there a less time consuming way to get the tableau ready for individual pivots? </font><font size="4" face="Times New Roman"><br>
</font><font size="4" face="Calibri"><br>
Any help on this is greatly appreciated.     </font><font size="4" face="Times New Roman"><br>
</font><font size="4" face="Calibri"><br>
Best,<br>
Rune M. Jensen</font><font size="4" face="Times New Roman"><br>
<br>
</font><font face="Courier New"><br>
_______________________________________________<br>
Clp mailing list<br>
Clp@list.coin-or.org</font><u><font color="#0000FF" face="Courier New"><br>
</font></u><a href="http://list.coin-or.org/mailman/listinfo/clp"><u><font color="#0000FF" face="Courier New">http://list.coin-or.org/mailman/listinfo/clp</font></u></a><font face="Courier New"><br>
</font><tt>_______________________________________________<br>
Clp mailing list<br>
Clp@list.coin-or.org<br>
</tt><tt><a href="http://list.coin-or.org/mailman/listinfo/clp">http://list.coin-or.org/mailman/listinfo/clp</a></tt><tt><br>
</tt><br>
<br>
</body></html>