Hi I am trying to optimize a function involving the components of a variable s(L) indexing by the set L /1*10/;
I created a subset Leven of the set L involving the even numbers (Leven /2,4,6,8,10/)
I want to write down an equation which sets the even components of s(L) as double the value of the odd components..
How should I write such an equation pls?
I was going to write it as
equation(Leven).. s(Leven) =E= s(Leven-1)*2;
However the above is wrong as for example for Leven = 4, s(Leven-1) is interpreted as s(2) and not as s(3) ..
Many thanks