<br><font size=2 face="sans-serif">Paulo,</font>
<br>
<br><font size=2 face="sans-serif">primalPivotResult is just the last part
of a primal iteration in Clp (as no other solver implements it). &nbsp;Normally
the reduced costs are updated at the beginning of the next iteration. &nbsp;However
I agree that if you are using primalPivotResult you would expect the reduced
costs to be updated. &nbsp;I have added an extra parameter to primalPivotResult
to update dual solution which defaults to false so that nobody will be
affected. &nbsp;Tell me if it does not do what you want?</font>
<br>
<br><font size=2 face="sans-serif">I have always been a little uneasy about
the &quot;build your own simplex&quot; parts of OsiSolverInterface and
assuming that only Clp will ever implement it, it may be better to approach
it in a different way. &nbsp;If I knew how people use this interface I
could add a virtual class to Clp - rather like ClpEventHandler which would
modify the behavior of Clp without continually entering and leaving it.
&nbsp;This would be more robust and faster.</font>
<br>
<br><font size=2 face="sans-serif">Thoughts?</font>
<br>
<br><font size=2 face="sans-serif">John Forrest</font>
<br>
<br>
<br>
<table width=100%>
<tr valign=top>
<td width=40%><font size=1 face="sans-serif"><b>Paulo Jose da Silva e Silva
&lt;pjssilva@ime.usp.br&gt;</b> </font>
<br><font size=1 face="sans-serif">Sent by: coin-lpsolver-bounces@list.coin-or.org</font>
<p><font size=1 face="sans-serif">06/08/2006 03:31 AM</font>
<td width=59%>
<table width=100%>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">To</font></div>
<td><font size=1 face="sans-serif">coin-lpsolver@list.coin-or.org</font>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">cc</font></div>
<td>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">Subject</font></div>
<td><font size=1 face="sans-serif">[Coin-lpsolver] Shouldn't primalPivotResult
update reduced costs?</font></table>
<br>
<table>
<tr valign=top>
<td>
<td></table>
<br></table>
<br>
<br>
<br><tt><font size=2>Hello,<br>
<br>
I have a doubt on the use of primalPivotResult. Shouldn't it update the<br>
reduced costs?<br>
<br>
If the answer is yes, please can anyone point out my mistake in the<br>
reasoning below?<br>
<br>
I have the following code in a program:<br>
<br>
 &nbsp;setObjectiveAndRefresh(_originalObjective); <br>
 &nbsp;pivotStatus = primalPivotResult(in, 1, out, outStatus, stepSize,
NULL);<br>
 &nbsp;printf(&quot;1 - %e\n&quot;, getReducedCost()[653]);<br>
 &nbsp;setObjectiveAndRefresh(_originalObjective);<br>
 &nbsp;printf(&quot;2 - %e\n&quot;, getReducedCost()[653]);<br>
<br>
If primalPivotResult was updating the reduced cost correctly, I would<br>
expect the second call to setObjectiveAndRefresh to be redundant<br>
(actually a bad thing to do, as it generates some overhead). Moreover,
I<br>
would expect the values printed in the printf to be the same. However if<br>
I run the code above I get the following output:<br>
<br>
 &nbsp;1 - 0,000000e+00<br>
 &nbsp;2 - -7,825281e-02<br>
<br>
Note that the value labeled &quot;2&quot; is the right one (I have confirmed
this<br>
by manually updating the reduced cost after the pivot operation).<br>
<br>
If primalPivotResult is not supposed to update the reduced cost, is<br>
there a better way to compute it then calling setObjectiveAndRefresh?<br>
<br>
Thanks,<br>
<br>
Paulo<br>
<br>
<br>
<br>
<br>
<br>
<br>
_______________________________________________<br>
Coin-lpsolver mailing list<br>
Coin-lpsolver@list.coin-or.org<br>
http://list.coin-or.org/mailman/listinfo/coin-lpsolver<br>
</font></tt>
<br>