[Coin-discuss] OSI branchAndBound vs CBC

Stefan Vigerske stefan at math.hu-berlin.de
Fri May 22 07:04:18 EDT 2009


Hi,

> Ok - I need to review old postings - but simple question....
> 
> Is OSI::branchAndBound and/or CBC::branchAndBound really B&B or is it
> Branch-and-Cut-(and Heuristics). I.e., if it is really just B&B, I don't
> want it. 

I think it does more than plain B&B, but not as much as the
standalone-Cbc. OsiCbc::branchAndBound() calls
CbcModel::branchAndBound(), as far as I see.

> I am looking for a simple interface to call a full blown MILP
> solver.... and my model originated in OSI - but I am ok translating to
> whatever object I need to. So, how do I do that with CBC?

You should look into examples/driver4.cpp in Cbc. It shows how to use
the CbcMain0/CbcMain1 routines that give you access to the "full blown
Cbc solver". It expects an OsiClp object as input.

> I'd expect something like:
> 
> CbcModel m(*osiObject);
> m.solve();
> 
> ??

Yes, the CbcMain0... is somehow similar to this.

Also the following pieces of code use this way to run Cbc:
https://projects.coin-or.org/OS/browser/trunk/OS/src/OSSolverInterfaces/OSCoinSolver.cpp#L634
https://projects.coin-or.org/GAMSlinks/browser/stable/0.4/GAMSlinks/src/Cbc/GamsCoinCbc.cpp

If you need some kind of solver-independence (i.e., one input for many
solvers) and only a "one-instance-one-solve", then the OS project could
be interesting for you.

Stefan

-- 
Stefan Vigerske
Humboldt University Berlin, Numerical Mathematics
http://www.math.hu-berlin.de/~stefan




More information about the Coin-discuss mailing list