Small Modelling Question

Hey guys I am struggling with one equation right now, that I need for my bachelor thesis.

Let’s say I want to need the following equations

X_1 = y_1
X_2 = y_1+y_2
X_3 = y_1+y_2+y_3

How do I model this? I tried:
Equation(i)… X(i) =E= sum( i, y(i))
but this is apparently wrong because the set (of the sum) is under control already.
I also tried
Alias(i,j)
Equation(i)… X(i) =E= sum( (i =G= j) , y(i))
but that doesn’t work either.
Any suggestions would be much appreciated!

Thank you in advance!

hi, try with this sets definition

sets i /i1*i10/
;
alias(i,j)


eq1(i)… x(i) =E= sum(j$(ord(j) le ord(i)),y(j));

best

Thanks a lot man! I totally forgot about the $ condition