[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-glpk] Parsing large, sparse mathprog model takes a (very) long
From: |
Meketon, Marc |
Subject: |
Re: [Help-glpk] Parsing large, sparse mathprog model takes a (very) long time |
Date: |
Mon, 2 May 2011 08:17:41 -0500 |
Beautiful. I could use this often.
-----Original Message-----
From: Andrew Makhorin [mailto:address@hidden
Sent: Monday, May 02, 2011 9:15 AM
To: Meketon, Marc
Cc: address@hidden
Subject: RE: [Help-glpk] Parsing large, sparse mathprog model takes a (very)
long time
> 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].
This e-mail and any attachments may be confidential or legally privileged. If
you received this message in error or are not the intended recipient, you
should destroy the e-mail message and any attachments or copies, and you are
prohibited from retaining, distributing, disclosing or using any information
contained herein. Please inform us of the erroneous delivery by return e-mail.
Thank you for your cooperation.
Re: [Help-glpk] Parsing large, sparse mathprog model takes a (very) long time, Andrew Makhorin, 2011/05/02