<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:"Calibri Light";
        panose-1:2 15 3 2 2 2 4 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;
        color:black;}
h1
        {mso-style-priority:9;
        mso-style-link:"Überschrift 1 Zchn";
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:24.0pt;
        font-family:"Times New Roman",serif;
        color:windowtext;
        font-weight:bold;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;
        color:black;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Vorformatiert Zchn";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";
        color:black;}
p.msonormal0, li.msonormal0, div.msonormal0
        {mso-style-name:msonormal;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;
        color:black;}
span.HTMLVorformatiertZchn
        {mso-style-name:"HTML Vorformatiert Zchn";
        mso-style-priority:99;
        mso-style-link:"HTML Vorformatiert";
        font-family:Consolas;
        color:black;}
span.E-MailFormatvorlage21
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
span.berschrift1Zchn
        {mso-style-name:"Überschrift 1 Zchn";
        mso-style-priority:9;
        mso-style-link:"Überschrift 1";
        font-weight:bold;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:216744446;
        mso-list-type:hybrid;
        mso-list-template-ids:-606561742 67567617 67567619 67567621 67567617 67567619 67567621 67567617 67567619 67567621;}
@list l0:level1
        {mso-level-start-at:0;
        mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Symbol;
        mso-fareast-font-family:"Times New Roman";
        mso-bidi-font-family:"Times New Roman";}
@list l0:level2
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:"Courier New";}
@list l0:level3
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Wingdings;}
@list l0:level4
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Symbol;}
@list l0:level5
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:"Courier New";}
@list l0:level6
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Wingdings;}
@list l0:level7
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Symbol;}
@list l0:level8
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:"Courier New";}
@list l0:level9
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Wingdings;}
ol
        {margin-bottom:0cm;}
ul
        {margin-bottom:0cm;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body bgcolor="white" lang="DE" link="blue" vlink="purple">
<div class="WordSection1">
<h1><span style="font-size:12.0pt;font-family:"Calibri Light",sans-serif;color:#1F497D;font-weight:normal">Sorry for
</span><span style="font-size:12.0pt;font-family:"Calibri Light",sans-serif;font-weight:normal">hijacking this thread but is there any chance to use this opportunity to document some of possible defines of CBC?<o:p></o:p></span></h1>
<h1><span style="font-size:12.0pt;font-family:"Calibri Light",sans-serif;font-weight:normal">I did a quick „grep | sort | unique“ search on trunk – see attachment.<o:p></o:p></span></h1>
<h1><span style="font-size:12.0pt;font-family:"Calibri Light",sans-serif;font-weight:normal">Wendel will probably remember KEEP_ORIGINAL_SOLVER and I can remember the story behind GOMORY_LONG but I doubt many others do. Stuff like MORE_GOMORY_CUTS and #ifdef
 MAKE_SOS_CLIQUES sound interesting.<o:p></o:p></span></h1>
<h1><span style="font-size:12.0pt;font-family:"Calibri Light",sans-serif;font-weight:normal">There are also some defines that look unnecessary and/or outdated:<o:p></o:p></span></h1>
<h1 style="margin-left:36.0pt;text-indent:-18.0pt;mso-list:l0 level1 lfo1"><![if !supportLists]><span style="font-size:12.0pt;font-family:Symbol;font-weight:normal"><span style="mso-list:Ignore">·<span style="font:7.0pt "Times New Roman"">        
</span></span></span><![endif]><span style="font-size:12.0pt;font-family:"Calibri Light",sans-serif;font-weight:normal">#if 0<o:p></o:p></span></h1>
<h1 style="margin-left:36.0pt;text-indent:-18.0pt;mso-list:l0 level1 lfo1"><![if !supportLists]><span style="font-size:12.0pt;font-family:Symbol;font-weight:normal"><span style="mso-list:Ignore">·<span style="font:7.0pt "Times New Roman"">        
</span></span></span><![endif]><span style="font-size:12.0pt;font-family:"Calibri Light",sans-serif;font-weight:normal">#if 1<o:p></o:p></span></h1>
<h1 style="margin-left:36.0pt;text-indent:-18.0pt;mso-list:l0 level1 lfo1"><![if !supportLists]><span style="font-size:12.0pt;font-family:Symbol;font-weight:normal"><span style="mso-list:Ignore">·<span style="font:7.0pt "Times New Roman"">        
</span></span></span><![endif]><span style="font-size:12.0pt;font-family:"Calibri Light",sans-serif;font-weight:normal">#ifdef USELESS (sic!)<o:p></o:p></span></h1>
<h1 style="margin-left:36.0pt;text-indent:-18.0pt;mso-list:l0 level1 lfo1"><![if !supportLists]><span style="font-size:12.0pt;font-family:Symbol;font-weight:normal"><span style="mso-list:Ignore">·<span style="font:7.0pt "Times New Roman"">        
</span></span></span><![endif]><span style="font-size:12.0pt;font-family:"Calibri Light",sans-serif;font-weight:normal">#ifdef XXXXXX<o:p></o:p></span></h1>
<h1 style="margin-left:36.0pt;text-indent:-18.0pt;mso-list:l0 level1 lfo1"><![if !supportLists]><span style="font-size:12.0pt;font-family:Symbol;font-weight:normal"><span style="mso-list:Ignore">·<span style="font:7.0pt "Times New Roman"">        
</span></span></span><![endif]><span style="font-size:12.0pt;font-family:"Calibri Light",sans-serif;font-weight:normal">#ifdef COIN_PRESOLVE_BUG<o:p></o:p></span></h1>
<h1 style="margin-left:36.0pt;text-indent:-18.0pt;mso-list:l0 level1 lfo1"><![if !supportLists]><span style="font-size:12.0pt;font-family:Symbol;font-weight:normal"><span style="mso-list:Ignore">·<span style="font:7.0pt "Times New Roman"">        
</span></span></span><![endif]><span style="font-size:12.0pt;font-family:"Calibri Light",sans-serif;font-weight:normal">#if defined (hp300)  - I doubt there is any compiler that supports hp300 and a sufficiently new version of c++ to build cbc.<o:p></o:p></span></h1>
<h1 style="margin-left:36.0pt;text-indent:-18.0pt;mso-list:l0 level1 lfo1"><![if !supportLists]><span style="font-size:12.0pt;font-family:Symbol;font-weight:normal"><span style="mso-list:Ignore">·<span style="font:7.0pt "Times New Roman"">        
</span></span></span><![endif]><span style="font-size:12.0pt;font-family:"Calibri Light",sans-serif;font-weight:normal">…<o:p></o:p></span></h1>
<h1><span style="font-size:12.0pt;font-family:"Calibri Light",sans-serif;font-weight:normal">Maybe we can kill some of them?<o:p></o:p></span></h1>
<h1><span style="font-size:12.0pt;font-family:"Calibri Light",sans-serif;font-weight:normal">Some are self explaining and/or used by the build system – e.g. #ifdef COIN_HAS_LAPACK, #ifdef _Win32  that need no documentation.
<o:p></o:p></span></h1>
<h1><span style="font-size:12.0pt;font-family:"Calibri Light",sans-serif;font-weight:normal">Some look like typos:<o:p></o:p></span></h1>
<h1 style="margin-left:36.0pt;text-indent:-18.0pt;mso-list:l0 level1 lfo1"><![if !supportLists]><span style="font-size:12.0pt;font-family:Symbol;font-weight:normal"><span style="mso-list:Ignore">·<span style="font:7.0pt "Times New Roman"">        
</span></span></span><![endif]><span style="font-size:12.0pt;font-family:"Calibri Light",sans-serif;font-weight:normal">#ifdef ALT_UPDATE_WEIGHTS vs #ifdef ALT_UPDATE_WEIGHTSz
<o:p></o:p></span></h1>
<h1><span style="font-size:12.0pt;font-family:"Calibri Light",sans-serif;font-weight:normal"><o:p> </o:p></span></h1>
<h1><span style="font-size:12.0pt;font-family:"Calibri Light",sans-serif;font-weight:normal">Tobias<o:p></o:p></span></h1>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext">Von:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext"> Cbc <cbc-bounces@coin-or.org>
<b>Im Auftrag von </b>John Forrest<br>
<b>Gesendet:</b> Sonntag, 6. Januar 2019 16:19<br>
<b>An:</b> cbc@list.coin-or.org<br>
<b>Betreff:</b> Re: [Cbc] Cbc changes solver pointer after solving a problem [c++ API]<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">If you update Cbc stable and add<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"> -DKEEP_ORIGINAL_SOLVER<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">to CXXDEFS in configure then solver will stay same.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Remember that the bounds on integer variables will have been changed to give an integer solution.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">John Forrest<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">On 05/01/2019 23:12, Wendel Melo wrote:<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<div>
<p class="MsoNormal">Dear friends<br>
<br>
I am giving my first steps with CBC to Mixed Integer Linear Programming (MILP) by means of the C++ API. My current goal is to turn Cbc one of the MILP solvers supported in Muriqui Optimizer, a free MINLP solver (<a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__www.wendelmelo.net_software&d=DwMDaQ&c=Ngd-ta5yRYsqeUsEDgxhcqsYYY1Xs5ogLxWPA_2Wlc4&r=zU1-bo4qay1GSxqnW8lKSuGZO4rtR2XKpD4FKabSFw8&m=Dlncezz6ZXqPDV70JRMj-7nMP89Z4J6ejU1siRSKD90&s=FcYkDDfmdBeP5OAt-9fgPycvrYTcrodyBArDYF92PqA&e=">www.wendelmelo.net/software</a>).<br>
<br>
Due to design questions, I have been constructing an object of the CbcModel class using an empty OsiSolverInterface object:<br>
<br>
OsiClpSolverInterface   clp ;<br>
CbcModel   *model = new (std::nothrow) CbcModel(clp);<br>
<br>
After that, I have been set the coefficients of my MILP problem by means of the pointer returned by the method CbcModel::solver, for example:<br>
<br>
OsiSolverInterface *solver = model->solver()<br>
<br>
solver->addCol(0, NULL, NULL,   0.0,  1000.0,   1.0);<br>
<br>
I am performing in this way to avoid delay copping the OsiSolverInterface object in the CbcModel constructor since I need to solve a sequence where the same MILP problem has to be solved several times just changing some parameters.<br>
<br>
But I have been getting some problems. After calling method CbcModel::branchAndBound by the second time, the pointer returned by CbcModel::solver is getting a different value of the previous call, for example:<br>
<br>
std::cout << "before BB solver pointer: " <<  model->solver() << std::endl;<br>
model->branchAndBound()<br>
std::cout << "after BB solver pointer: " <<  model->solver() << std::endl;<br>
<br>
The code above prints:<br>
<br>
before BB solver pointer:  0x1455a628<br>
after BB solver pointer:  0x14887f88<br>
<br>
So, we can see the solver pointer in CbcModel object was changed. Why is it happening? I believe creating new solver objects is bad because increase the computations. Is there a way to avoid the changing of solver object pointer? Are there other methods in
 CbcModel that can provoke the changing of the solver pointer?<br>
<br>
Thanks in advanced<br>
<br>
Best regards<br>
<br>
<br>
Wendel Melo<br>
<a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__www.wendeldelo.net&d=DwMDaQ&c=Ngd-ta5yRYsqeUsEDgxhcqsYYY1Xs5ogLxWPA_2Wlc4&r=zU1-bo4qay1GSxqnW8lKSuGZO4rtR2XKpD4FKabSFw8&m=Dlncezz6ZXqPDV70JRMj-7nMP89Z4J6ejU1siRSKD90&s=JYh8Yxd78YR1psLERivTyWK7ucneElUkq1Z8lpuKBIw&e=">www.wendeldelo.net</a><o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><br>
<br>
<o:p></o:p></p>
<pre>_______________________________________________<o:p></o:p></pre>
<pre>Cbc mailing list<o:p></o:p></pre>
<pre><a href="mailto:Cbc@list.coin-or.org">Cbc@list.coin-or.org</a><o:p></o:p></pre>
<pre><a href="https://urldefense.proofpoint.com/v2/url?u=https-3A__list.coin-2Dor.org_mailman_listinfo_cbc&d=DwMDaQ&c=Ngd-ta5yRYsqeUsEDgxhcqsYYY1Xs5ogLxWPA_2Wlc4&r=zU1-bo4qay1GSxqnW8lKSuGZO4rtR2XKpD4FKabSFw8&m=Dlncezz6ZXqPDV70JRMj-7nMP89Z4J6ejU1siRSKD90&s=RAbMHMb3ITS3FymBW1NhNKgJjpOwr-MTnXzqE7rsT2o&e=">https://list.coin-or.org/mailman/listinfo/cbc</a><o:p></o:p></pre>
</blockquote>
<p><o:p> </o:p></p>
</div>
</body>
</html>