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

John J Forrest jjforre at us.ibm.com
Fri Jun 30 04:04:06 EDT 2006


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.

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

John Forrest


                                                                           
             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





More information about the Coin-discuss mailing list