[Osi] OsiCbc, CbcMain

Lou Hafer lou at cs.sfu.ca
Tue Feb 22 11:43:31 EST 2011


Matt,

	Interesting suggestion. As you say, the current best practice for cbc is

 CbcModel cbc(*m_osi);
 CbcMain0(cbc);
 CbcMain1(argc, argv, cbc);

	The equivalent with OsiCbc would be

 OsiXXXSolverInterface m_osi() ;
 OsiCbcSolverInterface m_osicbc(m_osi) ;
 CbcMain0(m_osi.modelPtr()) ;
 CbcMain1(argc, argv, m_osi.modelPtr()) ;

So you could rewrite OsiCbcSolverInterface::branchAndBound() to do something 
like this:

 OsiCbcSolverInterface::branchAndBound()
 { << set up argc, argv somehow >>
   CbcMain0(modelPtr_) ;
   CbcMain1(argc, argv, modelPtr_) ; }

Might be useful. Try it and see if it works for you.

							Lou






More information about the Osi mailing list