[Coin-discuss] OsiClp branchAndBound changes state of model

Matthew Galati matthew.galati at gmail.com
Wed Feb 11 21:00:30 EST 2015


A related question -- how do I shut off one cut or another (which I would
base off the cut timings I see)?

I don't see any options about cuts in CbcModel.hpp.

On Wed, Feb 11, 2015 at 8:28 PM, Matthew Galati <matthew.galati at gmail.com>
wrote:

> I changed to CbcModel. How do I get the cut timings?
>
> On Wed, Feb 11, 2015 at 12:53 PM, Matthew Galati <matthew.galati at gmail.com
> > wrote:
>
>> Thanks John.
>>
>> I'll switch to CbcModel and will let you know how it goes.
>>
>> On Wed, Feb 11, 2015 at 10:33 AM, John Forrest <
>> john.forrest at fastercoin.com> wrote:
>>
>>>  Matt,
>>>
>>> If line 1 is actually
>>>
>>> OsiClpSolverInterface o;
>>>
>>> you are in trouble anyway - OsiClpSolverInterface:branchAndBound() was
>>> only written to satisfy requirements.  OsiCbcSolverInterface is also not so
>>> good.
>>>
>>> So many things will have changed in a CbcModel after search - cutoffs,
>>> number of nodes etc.  I would set up whatever cuts, heuristics and initial
>>> model in CbcModel baseModel and then
>>>
>>> baseModel.solver()-.addRow();
>>> CbcModel workingModel = baseModel;
>>>     workingModel.branchAndBound();
>>>
>>> On another of your questions - for flexibility I would pass in a Derived
>>> message handler (see for example Clp/examples/driver2.cpp) and then do
>>> exactly what you want in "print".
>>>
>>> You can get timings for cut generators, but for strong branching you are
>>> going to have to use profiling e.g. gprof.
>>>
>>> John Forrest
>>>
>>>
>>> On 10/02/15 22:23, Matthew Galati wrote:
>>>
>>> The following workflow is not doing what I expected.
>>>
>>>  1 OsiClp o;
>>> 2 o.loadProblem(...)
>>> 3 o.branchAndBound();
>>> 4 o.addRow();
>>> 5 o.branchAndBound();
>>>
>>>  After 3, the model seems to be changed - for example, a bunch of
>>> columns are fixed to 0 and some are fixed to 1. Presumably presolve or the
>>> reduced model in the tree at the end of solve.
>>>
>>>  So, when I add my row, I am no longer working with the original model.
>>>
>>>  Bug? Expected behavior?
>>>
>>>  How does one go about doing what I want - which is: solve, add a row,
>>> solve again.
>>>
>>>
>>>
>>> _______________________________________________
>>> Coin-discuss mailing listCoin-discuss at list.coin-or.orghttp://list.coin-or.org/mailman/listinfo/coin-discuss
>>>
>>>
>>>
>>> _______________________________________________
>>> Coin-discuss mailing list
>>> Coin-discuss at list.coin-or.org
>>> http://list.coin-or.org/mailman/listinfo/coin-discuss
>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/coin-discuss/attachments/20150211/3df93703/attachment.html>


More information about the Coin-discuss mailing list