The problem is the following.

I have a plain set S, for example, of quintets (i,j,k,l,m), and
want to build a set of sets as follows:

set T{k in K, i in I} := setof{(i,j,k,l,m) in S} (j,m,l);

i.e. some components of the quintet become indices of T while other
components are used to build a member of T.

This is implemented in Mathprog as follows:

for all k in K do
{   for all i in I do
    {   T[k,i] := empty;
        for all (i',j,k',l,m) in S do
        {   if i' = i and k' = k then
               T[k,i] := T[k,i] union {(j,m,l)}
        }
    }
}

and, thus, may take too much time if K, I, and S are large sets.

The idea is to introduce a special operator, which is equivalent to
the following:

T[*,*] := empty;
for all (i,j,k,l,m) in S do
    T[k,i] := T[k,i] union {(j,m,l)};

Any suggestions about the syntax? Thanks.

Andrew Makhorin



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

Reply via email to