[Cbc] cbc.exe vs. Cbc API

Stefan Vigerske stefan at math.hu-berlin.de
Wed Feb 6 12:06:23 EST 2008


Hi,

> It looks like I have formulated the question wrongly. I meant to ask how 
> to solve a problem (an OsiCbc or CbcModel object), so that Cbc will use 
> the same settings as cbc.exe RUN WITHOUT ANY OPTIONS. In a way, I just 
> want to emulate the main executable in my own code...

Then I forgot to add that the cbc exectable is (afaik) using 
CbcMain0/CbcMain1, so running CbcMain0/1 by yourself will give you 
(more-or-less) the same as calling the executable.
The only difference should be how the model is provided.

> The example should make it clear why I want to do this this, as opposed 
> to just calling the branchAndBound() routine...

Maybe you can just try to simulate the cbc executable on your example. I 
mean, if your example where you observed so much different performance 
is in example.mps, then try (modulo typos)
OsiClpSolverInterface solver;
solver.readMps("example");
CbcModel model(solver);
CbcMain0(model);
char* args={"MyCbcExe", "-solve", "-quit"};
CbcMain1(3, args, model);

I hope it will give you the same as when you do
cbc example.mps

Best,
Stefan

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


More information about the Cbc mailing list