> I #39;m working on a scheduling problem in , and would like to add an
> index to each member of a set. That is, if I start with a set  A, B,
> C, D, E ..., I #39;d like to end up with a set of tuples (1,A), (2,B),
> (3,C), ....

> I #39;m still crawling up the GMPL learning curve, but not sure of
> exactly the best way to do this.  

Probably you can use something like this:

set S;
/* A, B, C, ... */

param p{i in S};
/* p[i] maps i to 1, 2, 3, ... */

set T := setof{i in S} (p[i], i);
/* resulting set of doublets (1,A), (2,B), ... */



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

Reply via email to