For all t, H(t) = Z(t+1) + Z(t).
Z(t) is the variable. And H(t) is the parameter calculated with the adjacent elements in the variable. How can I do this?
BTW, in this instance, what’s the ‘index domain’ of the parameter H, as the index t=1,2,……,24, i.e. the maximum element in Z is Z(24), if I define the ‘index domain’ of H as t directly, which means that there exists H(24) = Z(25)+Z(24), which should not be existed. Would this cause error or how can I limit the index domain of H to t = 1,2,…..,23?
You can declare the parameter H has:
You are correct that for t=24, Z(t+1) does not exist. AIMMS defines indexing over a non-existing element as 0. AIMMS does not throw an exception for this.
So with the above declaration, H(24) will be Z(24).
Does this help?
Does this give you the results you want?
With kind regards,