[Cmpl] Array of sets in data file

Mike Steglich mike.steglich at th-wildau.de
Mon Nov 25 10:41:57 EST 2013


Hello Kamil,

CmplData is intended to read raw data into Cmpl models. That means it is not possible to use parameters or sets that are defined in the cmpData file for the data assignment to another set or parameter in the cmplData file.

I would like to propose to define the subsets in the cmplData file and to assign this sets to a parameter array within your Cmpl model:

---- cmplData 
%setA set < A B C >
%setB set < X Y >

%setX set < A B >
%setY set < C >

.... Cmpl 
setC["X"] := setX;
setC["Y"] := setY;

Cheers,

Mike

Am 25.11.2013 um 15:01 schrieb Kamil Figiela:

> Hello!
> 
> I have defined the following sets in my data file:
> 
> %setA set < A B C >
> %setB set < X Y >
> 
> Now I want to define a array of sets that defines relation between sets A and B, so in the parameters section I can write:
> 
> setC["X"] := set("A", "B");
> setC["Y"] := set("C");
> 
> and it works. How express the same in the data file? I have tried several options, but it didn't work. I created example program https://gist.github.com/kfigiela/7641560
> 
> Thanks,
> Kamil Figiela_______________________________________________
> Cmpl mailing list
> Cmpl at list.coin-or.org
> http://list.coin-or.org/mailman/listinfo/cmpl




More information about the Cmpl mailing list