im trying to model this and its give me a Error 154 in Set for ‘ord’ is not controlled

one_in_europe(j)$(ord(i) < 3)… sum((k,i),w(i,k)) =e= L

im trying to model this and its give me a Error 154 in Set for ‘ord’ is not controlled

one_in_europe(j)$(ord(i) < 3)… sum((k,i),w(i,k)) =e= L

It should be

one_in_europe(i)$(ord(i) > 3)… sum(k,w(i,k)) =e= L

The equations are defined over i. There is no j. As a result, when you define one_in_europe(j), GAMS give you an error as i is not defined (controlled).

The other equation would be as follows:

equation(k)… sum(i $(ord(i) < 4), w(i,k)) =e= 1;

Hope this helps.

- Atharv