[Coin-discuss] OsiClp branchAndBound changes state of model
John Forrest
john.forrest at fastercoin.com
Wed Feb 11 10:33:06 EST 2015
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 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/662686ef/attachment.html>
More information about the Coin-discuss
mailing list