<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 <Jan-Willem.Goossens@nc3a.nato.int></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 <osi@list.coin-or.org></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">"Goossens Jan-Willem \[Internet\]" <Jan-Willem.Goossens@nc3a.nato.int></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>
OsiClpSolverInterface model;<br>
<br>
int start[] = { 0, 1, 2};<br>
int index[] = { 0, 0};<br>
double values[] = {1.0, 2.0};<br>
double collb[] = {0.0, 0.0};<br>
double colub[] = {10.0, 10.0};<br>
double obj[] = { 1.0, 1.0};<br>
double rowlb[] = { 0.0};<br>
double rowub[]= { 3.9};<br>
<br>
// obj: Max x0 + x1<br>
// st. x0 + 2 x1 <= 3.9<br>
// 0 <= x0 <= 10 and integer<br>
// 0 <= x1 <= 10<br>
model.loadProblem(2, 1, start, index, values, collb, colub, obj, rowlb, rowub);<br>
model.setObjSense(-1.0);<br>
model.initialSolve();<br>
<br>
std::cout << "algorithm:" << model.lastAlgorithm() << std::endl;<br>
std::cout << "iteration count:" << model.getIterationCount() << 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 Obj -0 Dual inf 2 (2)<br>
Clp0006I 1 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 "1 iterations", 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>