[Osi] [Clp] set row solution (activities)

Matthew Galati magh at lehigh.edu
Thu Aug 20 14:23:08 EDT 2009


That sounds good - can someone add it? Currently, I had to hack OsiClp/Clp
to get it to work.

Also, I think, Osi should provide a "setRowActivity()" in case the user
already calculated it. Then in some debug mode, it should check that your
input is in sync with the current colsol.



I agree with Ted. There should be a recomputeRowActivity() or something
> similar that uses the current colsol and updates the row activities.
>
> --Laci
>
>
> On Thu, 13 Aug 2009, Matthew Galati wrote:
>
>  True. That's a design question.
>>
>> In fact there is a note in OsiCpx that says you must set both concurrently
>> as of CPX7.
>>
>> Ok - then I need setColSolution to update rowActivity_ itself, or,
>> overload
>> setColSolution to accept a col and row solution. Basically, I just need
>> some
>> way to set row activities - so that when a CGL is called (like MIR) and
>> asks
>> for row activities, it gets back the correct value.
>>
>>
>> The row activity is determined by the column solution, so how could it
>>
>>> make sense to set it independently?
>>>
>>> Ted
>>>
>>> 2009/8/13 Matthew Galati <magh at lehigh.edu>:
>>>
>>>> Why not just add a method to ClpModel that sets rowActivity_ and then a
>>>>
>>> method to OsiClp that sets row solution?
>>>
>>>>
>>>>
>>>>
>>>>  Disgusting solution but you could create a class that inherits from
>>>>>
>>>> clpsimplex, provides functions to set rowactivity (protected) and cast
>>> to
>>> it.
>>>
>>>>
>>>>>
>>>>>
>>>>> From: clp-bounces at list.coin-or.org [mailto:
>>>>> clp-bounces at list.coin-or.org]
>>>>>
>>>> On Behalf Of Matthew Galati
>>>
>>>> Sent: Thursday, August 13, 2009 5:14 PM
>>>>> To: Lou Hafer
>>>>> Cc: osi at list.coin-or.org; clp at list.coin-or.org
>>>>> Subject: Re: [Clp] [Osi] set row solution (activities)
>>>>>
>>>>>
>>>>>
>>>>> 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> <
>>> http://coral.ie.lehigh.edu/%7Eted>
>>>
>>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/osi/attachments/20090820/b2509348/attachment.html>


More information about the Osi mailing list