Given a param t, you can index any AMPL object or operator over this indexing expression:
{x in 0..t, j in 0..x}
Also you can define A to be 0..t. But you cannot define B to be 0..x, because 0..x is a different set for each value of x. You could define an indexed collection of sets B[x] to equal 0..x, by defining
set A = 0..t;
set B {x in 0..t} = 0..x;
and then you could write the indexing expression as
{x in A, j in B[x]}
but arguably this just makes the model more complicated and harder to read.
Bob Fourer
am...@googlegroups.com
=======