As the title of this thread describes, I’d like to index variables

over a subset of the product of two sets.

Here’s an example which yields: “Error 122. One dimensional set

expected”.

Sets

M /i1*i10/
N /j1*j5/

P(M,N) /i2.(j3*j5),i3.j2/

;

Variable x(P);

I could achieve my goal by simply declaring x(M,N) instead of x(P) and

controlling values of M and N in equations with, for example, $

(P(M,N)). However, in the case I’m considering, M and N are sets which

both have cardinality around 1000 and P contains about 100 points.

Therefore, I’d rather declare 100 variables (indexing over P) rather

than 10^6 variables (indexing over (M,N)).

I apologize if this is too basic a question for this group.

Thanks in advance for your answers.

\