[Cmpl] A couple of questions

Michal Kaut mail at michalkaut.net
Thu Feb 2 08:45:44 EST 2012


Hello Mike,

thanks for the answers.

Just a couple of comments:

1) Good to see that you think that tupel-sets 'are a "must have" of a
mathematical programming language'. (I have to work with Xpress and its
designers do not share this belief, so I have to write things like
  forall (i, j in NODES | exists(Cost(i, j))) do
So, big thumb up for this one :-)

2) Looks like the new data format will address my concerns, thanks.

3) I do understand you reasons for liking GPL, but .. we I work at a company
that delivers solutions to customers. As far as I understand the licenses, we
could not combine CMPL and Cbc in one package and give/sell it to a customer, as
the two licenses are not compatible.
We could use GLPK as a solver, but it is significantly slower than Cbc for our
problems. In addition, we can not always give away the source codes, which we
would have to under GPL.

Anyway, I am looking forward to the new developments.


Regards,
Michal


On 02.02.2012 13:07, Mike Steglich wrote:
> Hi Michal,
> 
> Thank you for your interest in CMPL.
> 
> 1) Tupel-sets
> We think also that tupel-sets (multi-dimensional sets)  are a "must have" of a
> mathematical programming language. 
> Therefore we are implementing tupel-sets and a new data file format at the moment.  
> Please download a CMPL presentation (INFORMS 2011) that gives you an impression
> about these new CMPL features (beginning at slide 12).
> http://www.coliop.org/download/cmplInforms2011.pdf
> 
> I think (hope) that we will release this  version in April/May.
> 
> Until the release of the new version you can use a workaround.  The idea is to
> have a matrix that contains the valid combinations of indices and to use this
> matrix for the definition of the variables, objective function and the constraints. 
> 
> For the transportation problem I have defined a matrix /r/ for the valid routes
> between the sources /i/ and the destinations /j/. 
> r[,] := ( (1,1), (1,2) , (1,4), (2,2), (2,3) , (2,4), (3,1) , (3,3) );
> The elements of/r/ are used for the definition of the variables/x[i,j]./
> x[ r[i,1],r[i,2] ] 
> The entire problem can be formulated as follows:
> parameters:
> plants  := 1(1)3;
> centers := 1(1)4;
> s[plants]  := (5000,6000,2500);
> d[centers] := (6000,4000,2000,1500);
> 
> c[plants,centers] := ( (3,2,7,6), (7,5,2,3),(2,5,4,5) );
> #relevant routes
> r[,] := ( (1,1), (1,2) , (1,4), (2,2), (2,3) , (2,4), (3,1) , (3,3) );
> 
> variables:
> #definition of the vector x is based on the relevant routes in r[,]
> { i in defset(r[,1]) : x[ r[i,1],r[i,2] ]: real[0..]; }
> 
> objectives:
> costs: sum{i in defset(r[,1]) : c[ r[i,1],r[i,2] ] * x[ r[i,1],r[i,2] ] } ->min;
> 
> constraints:
> #extended by a check whether a x[i,j] is a valid route
> supplies {i in plants  : sum{j in centers, count(x[i,j])>0 : x[i,j]  } <= s[i];}
> demands  {j in centers : sum{i in plants,  count(x[i,j])>0 : x[i,j]  } =  d[j];} 
>  
> This is actually not a smart approach but it works.
> 
> 2) You are right, in CMPL all entities are declared and initiated at the same
> moment. 
> I assume that you want to implement and test a model independently from the
> (real) data.  
> Our idea is to create and test a model with dummy data. The values of the sets
> and parameters can be read by using /include/ or /readcsv/() (and later with the
> CMPL new data file format). 
> For solving a real problem you only have to exchange the dummy date file by your
> real data file.  
> 
> 3) GPL / EPL
> This issue is (unfortunately) still under discussion. As you mentioned we have
> got some requests in this mailing list that I answered directly and not via the
> mailing list. I had also a discussion with Kipp Martin (COIN-OS).
> 
> We like the idea of "give and take" and we think that GPL is the best way to
> share software in this manner.  But we see also the problem that GPL isn't
> compatible to EPL and to commercial licenses if the source code is to be shared.
> Therefore we are looking for approaches to avoid these problems. One alternative
> is to have a dual license (GPL or EPL). The second possibility is to grant an
> individual license to a specific project. 
> 
> But this issue is only relevant if you want to share source code.  If you only
> want to use CMPL as an external process (e.g. via Java ProcessBuilder) then you
> don' have any license problems.  
> 
> 
> Cheers
> 
> Mike
> 
> 
> Am 02.02.2012 um 09:58 schrieb Michal Kaut:
> 
>> Hello,
>>
>> We are considering using CMPL (it looks very promising), but have a couple of
>> questions first:
>>
>> 1. Looking at the examples in the manual, I do not see any multi-dimensional
>> sets. For example, in the Transportation problem, if we did not have all-to-all
>> links, I would find it natural to define set 'links' being a subset of 'plants X
>> centers' and index 'c' on that set. The objective would then be
>>  costs: sum{(i, j) in links : c[i,j] * x[i,j] } ­->min;
>> Is this possible in CMPL?
>> And if not, can I at least define c only on a subset of 'plants X centers'
>> (without giving the subset a name)?
>>
>> 2. As far as I can see, all entities are declared and initiated at once - does
>> it mean that it is not possible to declare an entity (for ex. to say that S is a
>> set), and give it values some time later?
>>
>> 3. I guess you do not like this question, since you did not respond to it
>> previously, but I try nevertheless: why GPL? Would you at least consider dual
>> licensing with CPL or EPL, to make it compatible with the other Coin-OR projects?
>>
>>
>> Thanks a lot in advance.
>>
>> Regards,
>> Michal Kaut
>> _______________________________________________
>> Cmpl mailing list
>> Cmpl at list.coin-or.org <mailto:Cmpl at list.coin-or.org>
>> http://list.coin-or.org/mailman/listinfo/cmpl
> 
> 
> 
> ---------------------------------------------------------------------------
> Freehosting PIPNI - http://www.pipni.cz/
> 
> 


More information about the Cmpl mailing list