<html><body>
<p>Jan-Willem,<br>
<br>
It is a bug which crept in.  I was trying to get a more accurate count in the case when OsiClp does two solves (e.g. dual followed by primal) and missed out a line.  Can occur in initialSolve from an all slack basis.<br>
<br>
John<br>
<br>
<img width="16" height="16" src="cid:1__=0ABBFC97DFA988EB8f9e8a93df938@us.ibm.com" border="0" alt="Inactive hide details for Goossens Jan-Willem ---07/30/2009 09:45:15 AM---Hi, Either it's me, or the iteration count reported t"><font color="#424282">Goossens Jan-Willem ---07/30/2009 09:45:15 AM---Hi, Either it's me, or the iteration count reported through OsiClpSolverInterface is wrong.</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__=0ABBFC97DFA988EB8f9e8a93df938@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__=0ABBFC97DFA988EB8f9e8a93df938@us.ibm.com" border="0" alt=""><br>
<font size="2">Goossens Jan-Willem &lt;Jan-Willem.Goossens@nc3a.nato.int&gt;</font></td></tr>

<tr valign="top"><td width="1%"><img width="96" height="1" src="cid:2__=0ABBFC97DFA988EB8f9e8a93df938@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__=0ABBFC97DFA988EB8f9e8a93df938@us.ibm.com" border="0" alt=""><br>
<font size="2">osi &lt;osi@list.coin-or.org&gt;</font></td></tr>

<tr valign="top"><td width="1%"><img width="96" height="1" src="cid:2__=0ABBFC97DFA988EB8f9e8a93df938@us.ibm.com" border="0" alt=""><br>
<font size="2" color="#5F5F5F">Cc:</font></td><td width="100%" valign="middle"><img width="1" height="1" src="cid:2__=0ABBFC97DFA988EB8f9e8a93df938@us.ibm.com" border="0" alt=""><br>
<font size="2">&quot;Goossens Jan-Willem \[Internet\]&quot; &lt;Jan-Willem.Goossens@nc3a.nato.int&gt;</font></td></tr>

<tr valign="top"><td width="1%"><img width="96" height="1" src="cid:2__=0ABBFC97DFA988EB8f9e8a93df938@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__=0ABBFC97DFA988EB8f9e8a93df938@us.ibm.com" border="0" alt=""><br>
<font size="2">07/30/2009 09:45 AM</font></td></tr>

<tr valign="top"><td width="1%"><img width="96" height="1" src="cid:2__=0ABBFC97DFA988EB8f9e8a93df938@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__=0ABBFC97DFA988EB8f9e8a93df938@us.ibm.com" border="0" alt=""><br>
<font size="2">[Osi] OsiClp gives wrong iteration count?</font></td></tr>

<tr valign="top"><td width="1%"><img width="96" height="1" src="cid:2__=0ABBFC97DFA988EB8f9e8a93df938@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__=0ABBFC97DFA988EB8f9e8a93df938@us.ibm.com" border="0" alt=""><br>
<font size="2">osi-bounces@list.coin-or.org</font></td></tr>
</table>
<hr width="100%" size="2" align="left" noshade style="color:#8091A5; "><br>
<br>
<br>
<tt>Hi,<br>
<br>
Either it's me, or the iteration count reported through OsiClpSolverInterface is wrong.<br>
<br>
The following code solves a small problem:<br>
<br>
 &nbsp; &nbsp; &nbsp; &nbsp;OsiClpSolverInterface model;<br>
<br>
 &nbsp; &nbsp; &nbsp; &nbsp;int start[] = { 0, 1, 2};<br>
 &nbsp; &nbsp; &nbsp; &nbsp;int index[] = { 0, 0};<br>
 &nbsp; &nbsp; &nbsp; &nbsp;double values[] = {1.0, 2.0};<br>
 &nbsp; &nbsp; &nbsp; &nbsp;double collb[] = {0.0, 0.0};<br>
 &nbsp; &nbsp; &nbsp; &nbsp;double colub[] = {10.0, 10.0};<br>
 &nbsp; &nbsp; &nbsp; &nbsp;double obj[] = { 1.0, 1.0};<br>
 &nbsp; &nbsp; &nbsp; &nbsp;double rowlb[] = { 0.0};<br>
 &nbsp; &nbsp; &nbsp; &nbsp;double rowub[]= { 3.9};<br>
<br>
 &nbsp; &nbsp; &nbsp; &nbsp;// obj: Max x0 + x1<br>
 &nbsp; &nbsp; &nbsp; &nbsp;// &nbsp;st. x0 + 2 x1 &lt;= 3.9<br>
 &nbsp; &nbsp; &nbsp; &nbsp;// &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;0 &lt;= x0 &lt;= 10 and integer<br>
 &nbsp; &nbsp; &nbsp; &nbsp;// &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;0 &lt;= x1 &lt;= 10<br>
 &nbsp; &nbsp; &nbsp; &nbsp;model.loadProblem(2, 1, start, index, values, collb, colub, obj, rowlb, rowub);<br>
 &nbsp; &nbsp; &nbsp; &nbsp;model.setObjSense(-1.0);<br>
 &nbsp; &nbsp; &nbsp; &nbsp;model.initialSolve();<br>
<br>
 &nbsp; &nbsp; &nbsp; &nbsp;std::cout &lt;&lt; &quot;algorithm:&quot; &lt;&lt; model.lastAlgorithm() &lt;&lt; std::endl;<br>
 &nbsp; &nbsp; &nbsp; &nbsp;std::cout &lt;&lt; &quot;iteration count:&quot; &lt;&lt; model.getIterationCount() &lt;&lt; std::endl;<br>
<br>
<br>
The output is<br>
<br>
Coin0506I Presolve 1 (0) rows, 2 (0) columns and 2 (0) elements<br>
Clp0006I 0 &nbsp;Obj -0 Dual inf 2 (2)<br>
Clp0006I 1 &nbsp;Obj 3.9<br>
Clp0000I Optimal - objective value 3.9<br>
Clp0032I Optimal objective 3.9 - 1 iterations time 0.012<br>
algorithm:2<br>
iteration count:0<br>
<br>
So, Clp says &quot;1 iterations&quot;, but the OsiClpSolverInterface says 0.<br>
<br>
Is this a bug or a feature?<br>
<br>
I'm working with the source as they come with Cbc-2.3.0..<br>
Thanks in advance,<br>
<br>
Jan-Willem Goossens<br>
<br>
<br>
_______________________________________________<br>
Osi mailing list<br>
Osi@list.coin-or.org<br>
</tt><tt><a href="http://list.coin-or.org/mailman/listinfo/osi">http://list.coin-or.org/mailman/listinfo/osi</a></tt><tt><br>
</tt><br>
<br>
</body></html>