161. INDEX VARIABLES MAY NOT SHARE NAMES WITH OTHER VARIABLES.

The index variables used in set looping functions may not use the same names as those used by the structural variables in the model. For example, in the following model:

MODEL:

SETS:

S1/1..5/: X;

ENDSETS

MAX=I;

@SUM( S1( I): X( I)) <= 100;

END

the variable name i is used in the objective row for a structural variable. In the next to the last statement in the model, the name i is also being used as an index variable, which will trigger the error. In the case, you would need to change the name of either the variable in the objective or the name of the index variable in the @SUM loop.