>  This "data " statement seems very useful.  Could you please provide a couple 
> of paragraphs on how the "data" statement works?

The idea is quite simple. Imagine that you declare a plain set:

set S{i,j,k,l,m};

which is provided with data in the data section. However, actually you
need to have, say, array of sets T{j,m}, where T[j,m] is a set of
triplets (l,i,k) from S. Using the data attribute (not documented!) you
can declare T as follows:

set T{j,m}, data S[2,5,4,1,3];

This declaration has the same effect as there were corresponding data
provided for T in the data section. [2,5,4,1,3] is a permutation of
component indices: 2nd and 5th components of every 5-tuple in S give
pair [j,m] used to index elements of T, and 4th, 1st, and 3rd components
of the 5-tuple are used to build triplets (l,i,k), which are included in
set T[j,m].



_______________________________________________
Help-glpk mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/help-glpk

Reply via email to