<div dir="ltr"><div><div><div><div>Miles is correct. Although it is commonly done, you technically cannot create works that combine code under the GPL and the EPL. It is a violation of the GPL. Even the author of the GPL&#39;d code cannot technically distribute combinations, but the author is obviously free to create an exception in the license for certain kinds of combinations. I requested such an exception be made to allow GMPL to be combined with other solvers, but I never got a response. I think it is clear that this is informally permissible, but the license of GMPL still technically disallows it. <br><br></div>From the standpoint of making the combination work programatically, you have the choice of either wrapping GMPL around Cbc (as is done with CPLEX and Gurobi) or Cbc around GMPL (as is already half implemented in Cbc). I&#39;m not sure which is easier, but it might be that mimicking what is done with CPLEX/Gurobi would be the path of least resistance. I hadn&#39;t thought of that before.<br><br></div>An even nicer solution would be to create a wrapper that uses the Open Solver Interface, which would provide links to all solvers with Osi implementations (<a href="https://projects.coin-or.org/Osi/">https://projects.coin-or.org/Osi/</a>). Of course, OsiCbc is not very well maintained at the moment (though I plan to change this in the long run), so that might not be a good solution for Cbc right now, but it would be very useful in general. <br><br></div>To link to Cbc in the same way as Gurobi and CPLEX, you could look at the recently developed C interface:<br><br><a href="https://projects.coin-or.org/Cbc/browser/releases/2.9.3/Cbc/src/Cbc_C_Interface.h">https://projects.coin-or.org/Cbc/browser/releases/2.9.3/Cbc/src/Cbc_C_Interface.h</a><br><br></div><div>This should allow everything to be done in almost exactly the same way as with Gurobi and CPLEX. In that case, the combined code would be a contribution to Glpk, though, I suppose, not Cbc. It would be nice if we could got the license issues worked out somehow to make this all technically legal.<br><br></div><div>Cheers,<br><br></div><div>Ted<br></div><br><div>  <br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Mar 18, 2015 at 8:32 PM, Noli Sicad <span dir="ltr">&lt;<a href="mailto:nsicad@gmail.com" target="_blank">nsicad@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">No. I don&#39; t thing so.<br>
<br>
Please visit: GLPK Wikibook<br>
<br>
<a href="http://en.wikibooks.org/wiki/GLPK/Mixing_GLPK_with_other_solver_packages" target="_blank">http://en.wikibooks.org/wiki/GLPK/Mixing_GLPK_with_other_solver_packages</a><br>
<br>
 3party_cplex_wrapper.c or 3party.c is from Andrew Makhorin.<br>
<br>
~~~~<br>
<br>
/* Filename : 3party.c<br>
 * Date     : July 2011<br>
 * Author   : Andrew Makhorin &lt;<a href="mailto:mao@gnu.org">mao@gnu.org</a>&gt;<br>
 * Tested   : GLPK v4.45<br>
 *<br>
 * Waiver: To the extent possible under law, Andrew Makhorin<br>
 * &lt;<a href="mailto:mao@gnu.org">mao@gnu.org</a>&gt; has waived all copyright and related or<br>
 * neighboring rights to this program code.<br>
 * <a href="http://creativecommons.org/publicdomain/zero/1.0/" target="_blank">http://creativecommons.org/publicdomain/zero/1.0/</a><br>
 *<br>
 * Caution: This code uses internal (non-public) data structures<br>
 * and should be rewritten to make use of published APIs instead.<br>
 */<br>
<br>
If you download the CBC solver src, you can see that the cbc has 3<br>
party software including glpk - (MathProg -&gt;CBC ) but there is no<br>
there is no CBC -&gt; MathProg for post processing (solution back to<br>
MathProg) . It is hard to implement, I guess.<br>
<span class=""><br>
&gt; There&#39;s nothing preventing you from writing this wrapper for your own<br>
&gt; purposes and sharing it with others<br>
<br>
</span>I am not C/C++ programmer. I need the help of the CBC community to help me.<br>
<br>
Yes, I was studying all the examples in cbc example folder and<br>
searching the net if I could get a cbc_interface that look like the<br>
cplex.h and gurobi.h.<br>
<br>
Anybody like to help?<br>
<br>
Thanks.<br>
<br>
Regards, Noli<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
On 3/19/15, Miles Lubin &lt;<a href="mailto:miles.lubin@gmail.com">miles.lubin@gmail.com</a>&gt; wrote:<br>
&gt; Aren&#39;t there are serious legal issues with this? Cbc is licensed under EPL,<br>
&gt; while GLPK is GPL, and according to wikipedia (<br>
&gt; <a href="http://en.wikipedia.org/wiki/Eclipse_Public_License" target="_blank">http://en.wikipedia.org/wiki/Eclipse_Public_License</a>):<br>
&gt;<br>
&gt; The EPL 1.0 is not compatible with the GPL, and a work created by combining<br>
&gt; a work licensed under the GPL with a work licensed under the EPL cannot be<br>
&gt; lawfully distributed.<br>
&gt;<br>
&gt; There&#39;s nothing preventing you from writing this wrapper for your own<br>
&gt; purposes and sharing it with others, but at least from my limited<br>
&gt; understanding of the licences, this wrapper could not be officially<br>
&gt; distributed with cbc.<br>
&gt;<br>
&gt; On Wed, Mar 18, 2015 at 5:14 PM, Noli Sicad &lt;<a href="mailto:nsicad@gmail.com">nsicad@gmail.com</a>&gt; wrote:<br>
&gt;<br>
&gt;&gt; Hi,<br>
&gt;&gt;<br>
&gt;&gt; CBC MIP solver is quicker and can solve difficult MIP problem compare<br>
&gt;&gt; to current GLPK MIP solver.<br>
&gt;&gt;<br>
&gt;&gt; GLPK/MathProg has very good data management, pre and post processing<br>
&gt;&gt; (i.e. input and output to various formats (database, CVS, etc.), far<br>
&gt;&gt; better than AMPL.<br>
&gt;&gt;<br>
&gt;&gt; CBC solver has &quot;half&quot; support for MathProg, only input at the moment.<br>
&gt;&gt;<br>
&gt;&gt; I think it would be better if we would adapt this approach:<br>
&gt;&gt;<br>
&gt;&gt; GLPK -&gt; CBC MIP-&gt; GLPK  wrapper which uses GLPK to parse a MathProg<br>
&gt;&gt; model with data files, generates mps file, solve it with CBC, and uses<br>
&gt;&gt; the post solve features of GLPK/MathProg.<br>
&gt;&gt;<br>
&gt;&gt; With CBC solver can be user&#39;s friendly and popular :-).<br>
&gt;&gt;<br>
&gt;&gt; Gurobi and Cplex have these wrappers for glpsol. I am attaching these<br>
&gt;&gt; 2 files (i.e. wrapper_gurobi.c and 3party_cplex_wrapper.c.<br>
&gt;&gt;<br>
&gt;&gt; John and Ted,<br>
&gt;&gt;<br>
&gt;&gt; What do you think about this approach of having support for CBC in<br>
&gt;&gt; glpsol? Is the doable.<br>
&gt;&gt;<br>
&gt;&gt; Thanks in advance.<br>
&gt;&gt;<br>
&gt;&gt; Regards, Noli<br>
&gt;&gt;<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; Cbc mailing list<br>
&gt;&gt; <a href="mailto:Cbc@list.coin-or.org">Cbc@list.coin-or.org</a><br>
&gt;&gt; <a href="http://list.coin-or.org/mailman/listinfo/cbc" target="_blank">http://list.coin-or.org/mailman/listinfo/cbc</a><br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;<br>
_______________________________________________<br>
Cbc mailing list<br>
<a href="mailto:Cbc@list.coin-or.org">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>
</div></div></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature"><div dir="ltr">Dr. Ted Ralphs<br>Professor, Lehigh University<br>(610) 628-1280<br>ted &#39;at&#39; lehigh &#39;dot&#39; edu<br><a href="http://coral.ie.lehigh.edu/~ted" target="_blank">coral.ie.lehigh.edu/~ted</a><br></div></div>
</div>