[Cbc] CBC stand-alone vs callable

Andrea Manno andrea.manno at polimi.it
Wed Mar 21 10:15:52 EDT 2018


First of all thank you for the ready answer.


I looked at  the driver*.cpp examples but I did not understand well how it works, mainly how CbcMain0() and CbcMain1() interact and how to call them. My code is structured in this way:


   OsiClpSolverInterface solver ;
   ...
// here the instance is generated
   ...
   solver.loadProblem(...the instance...) ;
   for(int i=0; i<ni; i++){ solver.setInteger(i) ; }
   CbcModel model ( solver ) ;
   model.setMaximumSeconds( 15000 );
   model.branchAndBound( ) ;

So the only parameters I need to modify are the integer variables and the MaximumSeconds. Which is the simplest way to modify this code by using CbcMain0 and CbcMain1 in order to approximately replicate the stand-alone performance?

Thank you again!

________________________________
Da: Cbc <cbc-bounces at coin-or.org> per conto di John Forrest <john.forrest at fastercoin.com>
Inviato: mercoledì 21 marzo 2018 12:30:51
A: cbc at list.coin-or.org
Oggetto: Re: [Cbc] CBC stand-alone vs callable

Andrea,

If you use CbcMain0 and CbcMain1 you can get the same functionality.  Look at the various driver*.cpp examples in Cbc/examples.

John Forrest

On 21/03/18 11:17, Andrea Manno wrote:

Dear all,


I would kindly ask you two questions about the usage of CBC.


1) I am using the callable version of CBC as the MILP solver unit embedded in a c++ code. So what I am doing is nothing but including all the needed CBC, OSI and CGL  header file and linking all the necessary library in order to use the branchAnbBound() method of the CbcModel class. However I would like to replicate exactly the performance of the stand-alone executable version of cbc that I have used on the same instances as AMPL solver. Anyone knows the setting of the stand-alone executable version of cbc? I'am referring to the default options of presolve/preprocess, heuristics and cuts in the stand-alone version.


2) In case preprocess/presolve is needed for the answer of question 1), which is the right way to invoke the preprocess/presolve before the branchAnbBound() method (It si not so clear from the examples and from the user guide). It si possible to have a simple example?


Thank you so much,


Andrea Manno



_______________________________________________
Cbc mailing list
Cbc at list.coin-or.org<mailto:Cbc at list.coin-or.org>
https://list.coin-or.org/mailman/listinfo/cbc<https://urldefense.proofpoint.com/v2/url?u=https-3A__list.coin-2Dor.org_mailman_listinfo_cbc&d=DwMD-g&c=Ngd-ta5yRYsqeUsEDgxhcqsYYY1Xs5ogLxWPA_2Wlc4&r=dBOP3vGsEpOKdmO_6WA1VbOOW7KsIDZD9JZdy53cT2E&m=H8iXwTip_eiBZ-Ci59g2dhtuuqs_SJh_xuF2G6wyak0&s=C85QkRMp0U5PVm6O1o_pGXV6aExagY5_ZtxWukbj8ME&e=>


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/cbc/attachments/20180321/3f03b2fd/attachment-0001.html>


More information about the Cbc mailing list