You can define
set U {0..S} ordered;
so that you can reference the last position of any U[i] set. I suggest defining a set of current paths initialized to 0..S:
set S_curr;
let S_curr := 0..S;
Then to add a new set,
let S := S + 1;
let S_curr := S_curr union {S};
and to remove set i from use,
let S_curr := S_curr diff {i};
Bob Fourer
--
You received this message because you are subscribed to the Google Groups "AMPL Modeling Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ampl+uns...@googlegroups.com.
To post to this group, send email to am...@googlegroups.com.
Visit this group at http://groups.google.com/group/ampl.
For more options, visit https://groups.google.com/d/optout.