[Cbc] A very general question: achieving the 'same' performance between using the API and the standalone Cbc

Stefan Vigerske stefan at math.hu-berlin.de
Wed Aug 8 15:09:25 EDT 2012


Hi,

you can achieve pretty much the same performance when using CBC on a 
callable library as when calling it from the command line by using the 
CbcMain0, CbcMain1 functions.

See examples/driver4.cpp on an example on how to use these.
In your code you would mainly have to replace the call to 
CbcModel::branchAndBound by a call to CbcMain0 and CbcMain1.

Stefan


On 08/08/2012 08:20 PM, Alexis Guigue wrote:
> Dear all,
>
> I have started to implement my problem with the API from CBC. My problem
> is essentially
> a MIP where the constraints are SOS constraints of type 1. What I have
> done so far
> is probably the simplest that can be done: just populate the problem
> with the
> objective function, constraints (in the first version of my code, I have
> not even used CbcSOS
> objects), and variables, and from there, call the branchAndBound function.
>
> For comparison purposes, I have generated the lp file and the run the
> standalone Cbc.
> The computation time difference is huge: 800s for the API vs 1s for the
> standalone Cbc.
> My objective is to try to reproduce the same performance with the API. I
> am trying
> to think about the steps to achieve that. What I can I think of is:
>
> - inclusion of cuts. I believe now that my basic version does only
> branching.
> - 'smart' branching for my SOS constraints. It is not clear to me yet
> what does it
> do for the optimizer when creating a specific CbcSOS object for a SOS
> constraint
> rather than just creating a general constraint.
>
> I was wondering if there would be any example (or guidelines) available how
> to include cuts in the branch and bound process (tree). Also, I would like
> to understand better what creating a CbcSOS object is actually doing.
>
> Cheers
>
> Alexis
>



More information about the Cbc mailing list