- Use an alias (https://www.gams.com/latest/docs/UG_SetDefinition.html#UG_SetDefinition_TheAliasStatementMultipleNamesForASet): alias (i,i1,i2). Declare everything with i and use it in the algebra as needed.
- Use not sameas(i1,i2) (https://www.gams.com/latest/docs/UG_CondExpr.html#UG_CondExpr_keywdSameas) in a condition (https://www.gams.com/latest/docs/UG_CondExpr.html#UG_CondExpr_TheDollarCondition): sum((j,i1,i2)(not sameas(i1,i2)), …)
-Michael
Thank a lot