[Osi] set row solution (activities)

Matthew Galati magh at lehigh.edu
Thu Aug 13 18:35:37 EDT 2009


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.

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.




In Osi, the primal solution is referred to as the column solution,
> since there is one value for each column (and the dual solution is the
> row solution). So I'm not sure what you meant by the "(primal) row
> solution." Row activity is the inner product of the column solution
> with a given row of the constraint matrix, so it is not related to the
> dual solution. I assume that by setRowSolution(), you mean the method
> for setting the dual solution (currently called setRowPrices(), though
> for consistency, it probably shouldn't be). But this method would have
> no affect on the row activities, so what do you mean by
> "setRowSolution and do a memcpy into rowActivity_."?
>
> Ted
>
> On Thu, Aug 13, 2009 at 6:13 PM, Matthew Galati<magh at lehigh.edu> wrote:
> > I think setRowPrice sets the dual solution - not the (primal) row
> solution.
> >
> > Internally, it is the rowActivity_ array that needs to be set - that is
> what
> > is returned by getRowActivity(). That is why you are not seeing it come
> back
> > - you are actually setting the duals with setRowPrice.
> >
> > I am not sure what it does to internals, but I think all you need is a
> > method "setRowSolution" and do a memcpy into rowActivity_.
> >
> >
> >
> >
> >> Matt,
> >>
> >>        Osi.setColSolution and Osi.setRowPrice will set the column and
> row
> >> solution, respectively.  Row activity should follow from setColSolution.
> >>
> >>        Based on the Osi unit test, OsiClp ignores imposed row and column
> >> solutions (at least, they are not immediately reflected in the results
> >> returned
> >> for row activity and reduced costs).
> >>
> >>                                                Lou
> >>
> >> _______________________________________________
> >> Osi mailing list
> >> Osi at list.coin-or.org
> >> http://list.coin-or.org/mailman/listinfo/osi
> >
> >
> > _______________________________________________
> > Osi mailing list
> > Osi at list.coin-or.org
> > http://list.coin-or.org/mailman/listinfo/osi
> >
> >
>
>
>
> --
> Dr. Ted Ralphs
> Associate Professor, Lehigh University
> (610) 628-1280
> ted 'at' lehigh 'dot' edu
> coral.ie.lehigh.edu/~ted <http://coral.ie.lehigh.edu/%7Eted>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/osi/attachments/20090813/08ac763f/attachment.html>


More information about the Osi mailing list