<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)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><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;
        panose-1:2 15 5 2 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;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0cm;
        margin-right:0cm;
        margin-bottom:0cm;
        margin-left:36.0pt;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
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;}
span.E-MailFormatvorlage18
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
@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:1570920073;
        mso-list-type:hybrid;
        mso-list-template-ids:-816007512 -667384864 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:Calibri;
        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 lang="DE" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal" style="margin-bottom:12.0pt">>>I am creating a CbcModel's object by passing an object of OsiClpSolverInterface to the class. This is being passed to CbcMain0 which in turn is passed to CbcMain1 with "-solve" and "-quit" as the parameters.
 This calls the MILP solver and taking some time.<o:p></o:p></p>
<p class="MsoNormal" style="margin-bottom:12.0pt">This is a correct way to call cbc. The arguments passed to CbcMain1 are the same passed to the command line. See
<a href="https://projects.coin-or.org/CoinBinary/export/1059/OptimizationSuite/trunk/Installer/files/doc/cbcCommandLine.pdf">
https://projects.coin-or.org/CoinBinary/export/1059/OptimizationSuite/trunk/Installer/files/doc/cbcCommandLine.pdf</a><span style="color:#1F497D"> In my experience options like cut generators are set to reasonable defaults. Nevertheless playing around with
 them might give a significant speedup for your problem.<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span style="color:#1F497D">Note that solving a MIP is NP-hard, so there are models that take a lot of time. You may want to set a gap or a time limit if a good but not necessarily optimal solution is sufficient.<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span style="color:#1F497D">There are a few typical reasons why an MIP takes long to solve. The console output of CBC helps to investigate.<o:p></o:p></span></p>
<p class="MsoListParagraph" style="margin-bottom:12.0pt;text-indent:-18.0pt;mso-list:l0 level1 lfo1">
<![if !supportLists]><span style="font-family:Symbol;color:#1F497D"><span style="mso-list:Ignore">·<span style="font:7.0pt "Times New Roman"">        
</span></span></span><![endif]><span style="color:#1F497D">Bad relaxation e.g. large gap. You can try change your model to get a tighter relaxation.<o:p></o:p></span></p>
<p class="MsoListParagraph" style="margin-bottom:12.0pt;text-indent:-18.0pt;mso-list:l0 level1 lfo1">
<![if !supportLists]><span style="font-family:Symbol;color:#1F497D"><span style="mso-list:Ignore">·<span style="font:7.0pt "Times New Roman"">        
</span></span></span><![endif]><span style="color:#1F497D">Slow LP relaxation. Changing the model can help.<o:p></o:p></span></p>
<p class="MsoListParagraph" style="margin-bottom:12.0pt;text-indent:-18.0pt;mso-list:l0 level1 lfo1">
<![if !supportLists]><span style="font-family:Symbol;color:#1F497D"><span style="mso-list:Ignore">·<span style="font:7.0pt "Times New Roman"">        
</span></span></span><![endif]><span style="color:#1F497D">Branching does not really improve the lower bound => search tree gets huge. This occures for example if there is symmetry in the model.<o:p></o:p></span></p>
<p class="MsoListParagraph" style="margin-bottom:12.0pt;text-indent:-18.0pt;mso-list:l0 level1 lfo1">
<![if !supportLists]><span style="font-family:Symbol;color:#1F497D"><span style="mso-list:Ignore">·<span style="font:7.0pt "Times New Roman"">        
</span></span></span><![endif]><span style="color:#1F497D">Solver needs a lot of time to find the first feasible solution. You can try to write a problem specific heuristic (depending on the model this can be easy) or pass a feasible solution to CBC (CbcModel
 has a method to do this).<o:p></o:p></span></p>
<p class="MsoListParagraph" style="margin-bottom:12.0pt;text-indent:-18.0pt;mso-list:l0 level1 lfo1">
<![if !supportLists]><span style="font-family:Symbol;color:#1F497D"><span style="mso-list:Ignore">·<span style="font:7.0pt "Times New Roman"">        
</span></span></span><![endif]><span style="color:#1F497D">This list is not complete.<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:12.0pt"><o:p> </o:p></p>
<p class="MsoNormal" style="margin-bottom:12.0pt"><o:p> </o:p></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>
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">Von:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> Cbc [mailto:cbc-bounces@coin-or.org]
<b>Im Auftrag von </b>A P SHYAM SANKAR ch13b059<br>
<b>Gesendet:</b> Montag, 5. Juni 2017 13:34<br>
<b>An:</b> cbc@list.coin-or.org<br>
<b>Betreff:</b> [Cbc] Usage of CbcMain1<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal"><span style="border:solid windowtext 1.0pt;padding:0cm"><img border="0" width="100" height="100" style="width:1.0416in;height:1.0416in" id="_x0000_i1025" src="cid:~WRD000.jpg" alt="Das Bild wurde vom Absender entfernt."></span><o:p></o:p></p>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">Dear team,<o:p></o:p></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt">I am Shyam, currently a final year undergraduate at Department of Chemical Engineering, Indian Institute of Technology Madras, India. My project thesis is on optimizing supply chain network using model predictive
 control techniques under Prof. Raghunathan Rengaswamy. <o:p></o:p></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt">In my current problem formulation, I am solving an integer problem and I am working on CBC for that. I am currently struck at the way CbcMain1 is being used.<o:p></o:p></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt">I am creating a CbcModel's object by passing an object of OsiClpSolverInterface to the class. This is being passed to CbcMain0 which in turn is passed to CbcMain1 with "-solve" and "-quit" as the parameters.
 This calls the MILP solver and taking some time.<o:p></o:p></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt">The heuristic which I am developing involves calling the MILP solver interface multiple times in the programme. This is taking a lot of computation time each time it is being called. My query here is that if
 I am using the correct parameters to call the model? Also it would be great if you could provide me with a documentation for CbcMain1. Additionally, I don't have any choice of particular cut generators. I want the solver to choose it's default cut generator
 or if there is a way by which the solver could figure out the optimal cut generator based on the problem, variables and constraints.<o:p></o:p></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt">My question is very basic and I am relatively a noob in code optimization techniques though. Any suggestions, or help would be highly appreciated. Looking forward to hearing from you.<br>
<br>
<o:p></o:p></p>
</div>
<p class="MsoNormal">Thanks and Regards<o:p></o:p></p>
</div>
<p class="MsoNormal">Shyam Sankar<o:p></o:p></p>
</div>
<p class="MsoNormal">Senior Undergraduate<o:p></o:p></p>
</div>
<p class="MsoNormal">IIT Madras<o:p></o:p></p>
</div>
<p class="MsoNormal">Chennai, India<o:p></o:p></p>
</div>
</div>
</body>
</html>