Suppose I have two sets: n1 and n2, where card(n1) > card(n2). And we have two set of variables x(n1) and y(n2). Furthermore, I have a set nn(n1) (i.e., nn is a subset of n1), in which the number of yes's is equal to card(n2).

I want to define the set of constraints x(nn) = y(n2). In other words, a subset of vector x is to be equal to vector y. I couldn't manage to do that. I naively tried:

Code: Select all

```
Set
nn(n1);
nn(n1)$(n1.pos > 96 and n1.pos <= 2*96) = yes;
Equations
p_coup(n2,n1)
;
p_coup(nn,n1).. x(n1) =e= y(n2)
;
```

which gives my favorite error: uncontrolled set entered as a constant. Anybody can help me about this?

Thanks!