Yes setRowPrices is for setting the dual - which is fine. OsiClp does this right. OsiCpx does this wrong (see other email) - it actually sets the row activities when you call setRowPrices.<br><br>I need a setRowSolution or setRowActivitiy - whatever you want to call it. Yes it is just Ax, where x is the primal (column) solution. In CLP the underlying array is rowActivity_. So, the method would just need to memcpy into that array. That way, when I call getRowActivity, I get that value back.<br>
<br><br><br><div class="gmail_quote"><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">In Osi, the primal solution is referred to as the column solution,<br>
since there is one value for each column (and the dual solution is the<br>
row solution). So I'm not sure what you meant by the "(primal) row<br>
solution." Row activity is the inner product of the column solution<br>
with a given row of the constraint matrix, so it is not related to the<br>
dual solution. I assume that by setRowSolution(), you mean the method<br>
for setting the dual solution (currently called setRowPrices(), though<br>
for consistency, it probably shouldn't be). But this method would have<br>
no affect on the row activities, so what do you mean by<br>
"setRowSolution and do a memcpy into rowActivity_."?<br>
<br>
Ted<br>
<div><div></div><div class="h5"><br>
On Thu, Aug 13, 2009 at 6:13 PM, Matthew Galati<<a href="mailto:magh@lehigh.edu">magh@lehigh.edu</a>> wrote:<br>
> I think setRowPrice sets the dual solution - not the (primal) row solution.<br>
><br>
> Internally, it is the rowActivity_ array that needs to be set - that is what<br>
> is returned by getRowActivity(). That is why you are not seeing it come back<br>
> - you are actually setting the duals with setRowPrice.<br>
><br>
> I am not sure what it does to internals, but I think all you need is a<br>
> method "setRowSolution" and do a memcpy into rowActivity_.<br>
><br>
><br>
><br>
><br>
>> Matt,<br>
>><br>
>> Osi.setColSolution and Osi.setRowPrice will set the column and row<br>
>> solution, respectively. Row activity should follow from setColSolution.<br>
>><br>
>> Based on the Osi unit test, OsiClp ignores imposed row and column<br>
>> solutions (at least, they are not immediately reflected in the results<br>
>> returned<br>
>> for row activity and reduced costs).<br>
>><br>
>> Lou<br>
>><br>
>> _______________________________________________<br>
>> Osi mailing list<br>
>> <a href="mailto:Osi@list.coin-or.org">Osi@list.coin-or.org</a><br>
>> <a href="http://list.coin-or.org/mailman/listinfo/osi" target="_blank">http://list.coin-or.org/mailman/listinfo/osi</a><br>
><br>
><br>
> _______________________________________________<br>
> Osi mailing list<br>
> <a href="mailto:Osi@list.coin-or.org">Osi@list.coin-or.org</a><br>
> <a href="http://list.coin-or.org/mailman/listinfo/osi" target="_blank">http://list.coin-or.org/mailman/listinfo/osi</a><br>
><br>
><br>
<br>
<br>
<br>
</div></div><font color="#888888">--<br>
Dr. Ted Ralphs<br>
Associate Professor, Lehigh University<br>
(610) 628-1280<br>
ted 'at' lehigh 'dot' edu<br>
<a href="http://coral.ie.lehigh.edu/%7Eted" target="_blank">coral.ie.lehigh.edu/~ted</a><br>
</font></blockquote></div><br>