<div dir="ltr">I am trying to add one cut from the Cgl collection, e.g., CglProbing. The model is correctly defined but it seems that no cuts are ever added to it. Could anyone please help. Thanks,<br><br>Marco Caserta<br>
<br>This is the code I have:<br><br>&nbsp; MP_model m1(new OsiCbcSolverInterface);<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;here the model is properly defined&gt;<br><br>&nbsp; // add cut<br>&nbsp;&nbsp; OsiCuts cuts;<br>&nbsp;&nbsp; CglProbing probGen;<br><div dir="ltr">
&nbsp;&nbsp; probGen.setMaxProbe(10);<br><br>&nbsp;&nbsp; probGen.generateCuts(*m1.Solver, cuts);<br>&nbsp;&nbsp; <br>
&nbsp;&nbsp; m1.Solver-&gt;applyCuts(cuts);<br>&nbsp;&nbsp; cout &lt;&lt;cuts.sizeCuts() &lt;&lt;&quot; cuts were generated&quot; &lt;&lt;endl;<br><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;here I get that 0 cuts have been added&gt;<br><br>&nbsp;&nbsp; m1.minimize();<br><br>
</div>
<br><br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div dir="ltr"><br> OsiCuts cuts;<br>&nbsp;&nbsp; CglProbing probGen;<br>
&nbsp;&nbsp; probGen.setUsingObjective(true);<br>&nbsp;&nbsp; probGen.setMaxPass(1);<br>
&nbsp;&nbsp; probGen.setMaxPassRoot(5);<br>&nbsp;&nbsp; // Number of unsatisfied variables to look at<br>&nbsp;&nbsp; probGen.setMaxProbe(10);<br>&nbsp;&nbsp; probGen.setMaxProbeRoot(1000);<br>&nbsp;&nbsp; // How far to follow the consequences<br>&nbsp;&nbsp; probGen.setMaxLook(50);<br>

&nbsp;&nbsp; probGen.setMaxLookRoot(500);<br>&nbsp;&nbsp; // Only look at rows with fewer than this number of elements<br>&nbsp;&nbsp; probGen.setMaxElements(200);<br>&nbsp;&nbsp; probGen.setRowCuts(30);<br><br>&nbsp;&nbsp; probGen.generateCuts(*m1.Solver, cuts);<br>&nbsp;&nbsp; <br>

&nbsp;&nbsp; m1.Solver-&gt;applyCuts(cuts);<br>&nbsp;&nbsp; cout &lt;&lt;cuts.sizeCuts() &lt;&lt;&quot; cuts were generated&quot; &lt;&lt;endl;<br><br>&nbsp;&nbsp; m1.attach();<br>&nbsp;&nbsp; //m1.minimize(sum(F, fixed(F)*y(F)) + sum(F, sum(C, cost(F,C)*x(F,C))));<br>

&nbsp;&nbsp; m1.minimize();<br></div>
</blockquote>I am trying to add one cut from the Cgl collection, e.g., CglProbing. This is the code I have:<br></div><br></div>