<div dir="ltr">Hi Haroldo, all,<div><br></div><div>I&#39;ve done some preliminary work on this, removing over 1000 lines of crufty code including multiple synonyms and unimplemented stubs. There is also an interface to set parameters which translate directly to cbc command-line arguments. I think this is a lightweight way to deal with parameters, instead of trying to mirror all of cbc&#39;s parameters in explicit functions. For example, to disable logging, you write:</div>

<div><br></div><div>Cbc_setParameter(model, &quot;log&quot;, &quot;0&quot;);<br></div><div><br></div><div>To disable cuts:</div><div><br></div><div>Cbc_setParameter(model, &quot;cuts&quot;, &quot;off&quot;);</div><div><br>
</div><div>Etc. </div><div><br></div><div>This is committed to trunk. For some example code, see <a href="https://projects.coin-or.org/Cbc/browser/trunk/Cbc/test/CInterfaceTest.c">https://projects.coin-or.org/Cbc/browser/trunk/Cbc/test/CInterfaceTest.c</a>. There&#39;s still more work to be done (I haven&#39;t looked at callbacks yet), but beta-testers and feedback are welcome.</div>
<div><br></div><div>Miles</div><div><br></div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Mar 10, 2014 at 8:21 PM, Haroldo Santos <span dir="ltr">&lt;<a href="mailto:haroldo.santos@gmail.com" target="_blank">haroldo.santos@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Hi Miles,<br><br>This would great.  CbcMain0 and CbcMain1 are where the best settings are kept and you really should use these.<br>
</div>
<div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br>It would nice also to add a clean interface  to configure cuts, heuristics and pre-preprocessing in CBC (at least the most important options) (this would be translated to CbcMain1 parameters).<br>

<br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">This would probably be a better way to call CBC from C++ too, since CbcMain0 and CbcMain1 are a functional but ugly way of calling the solver IMHO.<br>

<br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Using opaque data types in C would also be nice to keep a low level of required includes.<br><br>Cheers,<br><br>Haroldo<br><br><br></div>

<div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_extra"><br><br><div class="gmail_quote">
<div><div class="h5">
On Mon, Mar 10, 2014 at 7:52 PM, Miles Lubin <span dir="ltr">&lt;<a href="mailto:miles.lubin@gmail.com" target="_blank">miles.lubin@gmail.com</a>&gt;</span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div><div class="h5">
<div dir="ltr">Hi all,<div><br></div><div>I&#39;m planning on doing some significant restructuring on the Cbc C interface (<a href="https://projects.coin-or.org/Cbc/browser/trunk/Cbc/src/Cbc_C_Interface.h" target="_blank">https://projects.coin-or.org/Cbc/browser/trunk/Cbc/src/Cbc_C_Interface.h</a>), which doesn&#39;t seem to have received much attention in the past number of years. Before making any breaking changes, I wanted to share my plans and get feedback from potential users (and current users, if any). </div>


<div><br></div><div>The main redesign points are:</div><div>- Use CbcMain0/CbcMain1</div><div>- Drop LP-specific functionality (dual solutions, rays, etc.) -- Most of this was never even implemented, while Clp already has a fully functional C interface. </div>


<div>- Break 1-1 correspondence with C++ names, if appropriate. Some tweaking of the names could help for non-expert users. The C interface should be accessible to someone who isn&#39;t necessarily familiar with the C++ interface.</div>


<div>- Include unit tests.</div><div><br></div><div>Overall the goal is to have a lightweight, well documented interface that makes Cbc easy to access from outside of C++, including from dynamic languages like Python and Julia, following CoinMP&#39;s lead but included directly in Cbc.</div>


<div><br></div><div>Thanks,</div><div>Miles</div></div>
<br></div></div>_______________________________________________<br>
Cbc mailing list<br>
<a href="mailto:Cbc@list.coin-or.org" target="_blank">Cbc@list.coin-or.org</a><br>
<a href="http://list.coin-or.org/mailman/listinfo/cbc" target="_blank">http://list.coin-or.org/mailman/listinfo/cbc</a><br>
<br></blockquote></div><span class="HOEnZb"><font color="#888888"><br><br clear="all"><br>-- <br><span style="font-family:courier new,monospace">=============================================================<br>Haroldo Gambini Santos<br>
Computing Department<br>Universidade Federal de Ouro Preto - UFOP<br>
email: haroldo [at ] <a href="http://iceb.ufop.br" target="_blank">iceb.ufop.br</a><br>home/research page: <a href="http://www.decom.ufop.br/haroldo/" target="_blank">www.decom.ufop.br/haroldo</a><br></span>
</font></span></div></div>
</blockquote></div><br></div>