<br><font size=2 face="sans-serif">Paulo,</font>
<br>
<br><font size=2 face="sans-serif">I think I have fixed it. &nbsp; setObjectiveAndRefresh
refreshed enough in dual but there was a bit more to refresh for primal.
&nbsp;I have also added a primitive paraobj to the OsiClp unit test. &nbsp;It
is pretty bad but I needed something to show the bug.</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>&quot;Paulo J. S. Silva&quot;
&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">03/06/2005 05:16 PM</font>
<td width=59%>
<table width=100%>
<tr>
<td>
<div align=right><font size=1 face="sans-serif">To</font></div>
<td valign=top><font size=1 face="sans-serif">coin-lpsolver@list.coin-or.org</font>
<tr>
<td>
<div align=right><font size=1 face="sans-serif">cc</font></div>
<td valign=top>
<tr>
<td>
<div align=right><font size=1 face="sans-serif">Subject</font></div>
<td valign=top><font size=1 face="sans-serif">[Coin-lpsolver] Parametric
Analysis using CLP + OSI</font></table>
<br>
<table>
<tr valign=top>
<td>
<td></table>
<br></table>
<br>
<br>
<br><font size=2><tt>Hello,<br>
<br>
I am trying to implement parametric analysis using CLP. I have a problem<br>
in the form:<br>
<br>
min c'x<br>
s.t. Ax = &nbsp;b<br>
 &nbsp; &nbsp; &nbsp;x &gt;= 0<br>
<br>
I want to study what happens if I change the objective function in a<br>
direction deltac, i.e. I want to study the solutions of<br>
<br>
min (c + alpha*deltac)'x<br>
s.t. Ax = &nbsp;b<br>
 &nbsp; &nbsp; &nbsp;x &gt;= 0<br>
<br>
for alpha &gt; 0.<br>
<br>
This is a &quot;simple&quot; problem, studied in textbooks for linear programming<br>
like Bazaraa, Jarvis and Sheralli's or Bertsimas' books. <br>
<br>
A very high-level view of the code is this:<br>
<br>
1) Find the first critical alpha and a variable to enter the basis<br>
2) call CLP's primalPivotResult to move the desired variable into the<br>
basis and find the leaving variable<br>
3) Update the objective using the critical alpha using CLP's<br>
setObjectiveAndRefresh<br>
4) goto 1<br>
<br>
For quite long time I had 3 coming before 2 above. This is rather<br>
natural, as once we have the critical alpha you can already change to<br>
the new objective. This is what Bazaraa book does. It is easy to see<br>
that the reduced cost is the same for both basis (before and after<br>
pivoting). However if I update the objective and then pivot the pivot<br>
code computes I wrong reduced cost.<br>
<br>
As far as I understand, If I call setObjectiveAndRefresh before pivoting<br>
I'll have a valid tableau. Then why is primalPivotResult &quot;messing
up&quot;<br>
with the reduced costs?<br>
<br>
Paulo<br>
<br>
Obs: A side note. I am calling OSI+CLP from Python. It is rather<br>
pleasing to avoid the compilations when writing the code. :-) <br>
<br>
-- <br>
Paulo José da Silva e Silva<br>
Professor Assistente do Dep. de Ciência da Computação<br>
(Assistant Professor of the Computer Science Dept.)<br>
Universidade de São Paulo - Brazil<br>
<br>
e-mail: rsilva@ime.usp.br &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Web: http://www.ime.usp.br/~rsilva<br>
<br>
Teoria é o que não entendemos o &nbsp; &nbsp; (Theory is something we don't)<br>
suficiente para chamar de prática. &nbsp;(understand well enough to call<br>
practice)<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>
</tt></font>
<br>