<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p style="margin-top:0;margin-bottom:0">First of all thank you for the ready answer.</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">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:</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0"></p>
<div>   OsiClpSolverInterface solver ; <br>
   ...<br>
// here the instance is generated<br>
   ...<br>
   solver.loadProblem(...the instance...) ;<br>
   for(int i=0; i<ni; i++){ solver.setInteger(i) ; }<br>
   CbcModel model ( solver ) ;<br>
   model.setMaximumSeconds( 15000 );<br>
   model.branchAndBound( ) ;<br>
<br>
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?<br>
<br>
</div>
Thank you again!<br>
<p></p>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>Da:</b> Cbc <cbc-bounces@coin-or.org> per conto di John Forrest <john.forrest@fastercoin.com><br>
<b>Inviato:</b> mercoledì 21 marzo 2018 12:30:51<br>
<b>A:</b> cbc@list.coin-or.org<br>
<b>Oggetto:</b> Re: [Cbc] CBC stand-alone vs callable</font>
<div> </div>
</div>
<div style="background-color:#FFFFFF">
<div class="x_moz-cite-prefix">Andrea,<br>
<br>
If you use CbcMain0 and CbcMain1 you can get the same functionality.  Look at the various driver*.cpp examples in Cbc/examples.<br>
<br>
John Forrest<br>
<br>
On 21/03/18 11:17, Andrea Manno wrote:<br>
</div>
<blockquote type="cite">
<div id="x_divtagdefaultwrapper" dir="ltr">
<p><span id="x_divtagdefaultwrapper">Dear all,</span></p>
<p><span id="x_divtagdefaultwrapper"><br>
</span></p>
<p><span id="x_divtagdefaultwrapper">I would kindly ask you two questions about the usage of CBC.
<br>
</span></p>
<p><span id="x_divtagdefaultwrapper"><br>
</span></p>
<p><span id="x_divtagdefaultwrapper">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.
<br>
</span></p>
<p><span id="x_divtagdefaultwrapper"><br>
</span></p>
<p><span id="x_divtagdefaultwrapper">2) In case preprocess/presolve is needed for the answer of question 1), which is the right way to invoke the
</span>preprocess/presolve before the <span id="x_divtagdefaultwrapper">branchAnbBound()
</span>method (It si not so clear from the examples and from the user guide). It si possible to have a simple example?</p>
<p><br>
</p>
<p>Thank you so much,</p>
<p><br>
</p>
<p>Andrea Manno<br>
</p>
</div>
<br>
<fieldset class="x_mimeAttachmentHeader"></fieldset> <br>
<pre>_______________________________________________
Cbc mailing list
<a class="x_moz-txt-link-abbreviated" href="mailto:Cbc@list.coin-or.org">Cbc@list.coin-or.org</a>
<a class="x_moz-txt-link-freetext" href="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=">https://list.coin-or.org/mailman/listinfo/cbc</a>
</pre>
</blockquote>
<p><br>
</p>
</div>
</body>
</html>