[Coin-discuss] sychronising the solution for OsiCbc after branch and bound

Kish Shen kish.shen at crosscoreop.com
Fri Jun 30 11:30:03 EDT 2006


John,

Thanks for your reply!

On Friday 30 June 2006 09:04, John J Forrest wrote:
> I may get round to looking at this problem with OsiCbc but I will repeat
> for the umpteenth time that I really regret giving in to someone's request
> for OsiCbc as it is a circular idea with an OsiSolverInterface using
> another OsiSolverInterface.  It is far better to use Cbc directly and then
> a generic OsiSolver (OK - so that may break too but at least I will try and
> fix it).  sample2.cpp uses OsiClp not OsiCbc so it should be easy to move
> to Cbc directly.
>

Yes, I do remember this when I was working on my prototype last year. 
I have just taken a quick look at the code for OsiClpSolverInterface (which I 
downloaded in May), and there appears to be code for the branchAndBound() 
method, which I don't think was there last year. Is this doing its own B&B 
rather than using CBC? I also get a

Clp6002E 2 bad bound pairs or bad objectives were found - first at C0

error for one of the example problems I have [this runs fine with OsiCbc and 
when I use initialSolve() on it from OsiClp]

Is it better then to copy the problem to CBC for the branch and bound, as I 
think sample2 does? 

> I will discuss some performance issues at the DIMACS workshop and some of
> the code being developed may help.
>
> John Forrest
>

Would the materials (handouts, slides, papers, etc.) be available from the 
website after the workshop, for those of us that can't attend it? 

Thanks again,

Kish

>
>
>              Kish Shen
>              <kish.shen at crossc
>              oreop.com>                                                 To
>              Sent by:                  coin-discuss at list.coin-or.org
>              coin-discuss-boun                                          cc
>              ces at list.coin-or.
>              org                                                   Subject
>                                        [Coin-discuss] sychronising the
>                                        solution for OsiCbc after branch
>              06/29/06 11:36 PM         and bound
>
>
>              Please respond to
>              Discussions about
>                 open source
>                software for
>                 Operations
>                  Research
>              <coin-discuss at lis
>               t.coin-or.org>
>
>
>
>
>
>
> Hi,
>
> I have been trying to improve the performance of the MIP search while using
>
> the OsiCbcSolverInterface. Instead of just calling the branchAndBound()
> method, I tried to use the code from the sample2.cpp example in Cbc's
> Sample
> directory.
>
> I can see from the message that the MIP search seem to work correctly, but
> trying to access the solution state via OsiCbcSolverInterface does not
> work.
> I think this is because the sample2 code clones the solver before doing the
>
> search.
>
> I tried to do a dynamic cast (as John suggested in answer to another post
> of
> mine):
>
>              model.branchAndBound();
>              lpd->lp->Solver = dynamic_cast<
> OsiCbcSolverInterface*>(model.solver());
>
> where model is a CbcModel, and lpd->lp->Solver is a OsiCbcSolverInterface
> *.
> This however seg faults as soon as I make the next call using
> lpd->lp->Solver.
> I assume this is because model.solver() is the clp solver, rather than Cbc?
>
> How should I set the state of lpd->lp->Solver to the model's?
>
> I also need to preserve the reference solver of the original CbcModel
> pointer
> of lpd->lp->Solver, because I saved the original state of the problem
> before
> going into the branch and bound.
>
> Thanks in advance for any help!
>
> Cheers,
>
> Kish Shen
> _______________________________________________
> Coin-discuss mailing list
> Coin-discuss at list.coin-or.org
> http://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



More information about the Coin-discuss mailing list