help-glpk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-glpk] Set of sets


From: Andrew Makhorin
Subject: Re: [Help-glpk] Set of sets
Date: Wed, 10 Dec 2008 04:22:46 +0300

> I would like to be able to create a set of sets from data read with the
> table statement.

> Can this be achieved with the current syntax?

Yes, though currently this cannot be performed efficiently for large
sets.

First you read data, say, in the following plain set:

set RAW, dimen 3;

and then build the set you need with the setof operator:

set S{i in ...} := setof{(i,j,k) in RAW} (j,k);

I suppose that in mathprog there should be a special operator to
convert a plain set to a set of sets in an efficient way. (I encountered
such problem on modeling very large sparse flow networks.) I will
continue this discussion in a new thread.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]