hi, i’m new to the forum and i just started using gams and i don’t know how to be able to write an index dependent on another. that is, I have my index j of values {1,2,3,4,5}, and I would like to write an index k (i) whose values change as i changes. so for example I have k (1) of values {1,2}, k (2) of values {2,3,5,7} up to k (5). thanks in advance for your reply.
Gunners,
If you need to essentially have a subset of j defined for each value of i, the GAMS way to do this is with what I call a mapping set. The attached code illustrates what I mean.
mapping.gms (223 Bytes)
-Steve