<html><body>
<p>Stupid mistake in primal (was okay in dual).  Surprising not found before.<br>
<br>
Fixed in 1.10<br>
<br>
<img width="16" height="16" src="cid:1__=0ABBFF0EDFEA7EE28f9e8a93df938@us.ibm.com" border="0" alt="Inactive hide details for Balazs Dezso ---04/19/2009 08:14:04 AM---Hi"><font color="#424282">Balazs Dezso ---04/19/2009 08:14:04 AM---Hi</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__=0ABBFF0EDFEA7EE28f9e8a93df938@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__=0ABBFF0EDFEA7EE28f9e8a93df938@us.ibm.com" border="0" alt=""><br>
<font size="2">Balazs Dezso &lt;deba.mf@gmail.com&gt;</font></td></tr>

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

<tr valign="top"><td width="1%"><img width="96" height="1" src="cid:2__=0ABBFF0EDFEA7EE28f9e8a93df938@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__=0ABBFF0EDFEA7EE28f9e8a93df938@us.ibm.com" border="0" alt=""><br>
<font size="2">04/19/2009 08:14 AM</font></td></tr>

<tr valign="top"><td width="1%"><img width="96" height="1" src="cid:2__=0ABBFF0EDFEA7EE28f9e8a93df938@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__=0ABBFF0EDFEA7EE28f9e8a93df938@us.ibm.com" border="0" alt=""><br>
<font size="2">[Clp] Second solve with Clp</font></td></tr>
</table>
<hr width="100%" size="2" align="left" noshade style="color:#8091A5; "><br>
<br>
<br>
<tt>Hi<br>
<br>
I written an infeasible problem in Clp, and I solved it with primal simplex <br>
twice. The first solving was really infeasible, but the second reported optimal <br>
solution.<br>
<br>
The code:<br>
#include &lt;coin/ClpSimplex.hpp&gt;<br>
<br>
const int rn = 2;<br>
const int cn = 1;<br>
<br>
<br>
double rub[rn] = { COIN_DBL_MAX, -2 };<br>
double rlb[rn] = { -1, -COIN_DBL_MAX };<br>
<br>
int ind[rn] = { 0, 1};<br>
double coeff[rn] = { 1, 1 };<br>
<br>
int main() {<br>
 &nbsp;ClpSimplex prob;<br>
<br>
 &nbsp;prob.addColumn(rn, ind, coeff, -COIN_DBL_MAX, COIN_DBL_MAX, 1);<br>
 &nbsp;prob.addRows(rn, rlb, rub, 0, 0, 0);<br>
<br>
 &nbsp;prob.primal();<br>
 &nbsp;prob.primal();<br>
 &nbsp; &nbsp;<br>
 &nbsp;return 0;<br>
}<br>
<br>
The problem is just:<br>
-1 &lt;= x1<br>
x1 &lt;= -2<br>
min x1<br>
<br>
The log message is<br>
Clp0006I 0 &nbsp;Obj 0 Primal inf 2 (1) Dual inf 1e+08 (1) w.o. free dual inf (0)<br>
Clp0006I 1 &nbsp;Obj -2 Primal inf 1 (1)<br>
Clp0001I Primal infeasible - objective value -2<br>
Clp0000I Optimal - objective value -2<br>
<br>
Is it a bug in Clp or I have missed something(maybe parameters for primal() or <br>
some cleaning codes between two iterations)?<br>
<br>
I tested 1.10 and 1.9 stable branch heads. The issue is important for right <br>
handling of Clp solver in LEMON LP/MIP solver interface (newly joined COIN-OR <br>
project).<br>
<br>
Best, Balazs<br>
<br>
_______________________________________________<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>