Dear All,
I want to write an equation for calculating growth in a parameter or variable. As an example:
Pop(t) = Pop(t-1) + GrowthFactor(t)*Pop(t-1)
How to do this inside AIMMS?
Thank you.
Best answer by mateusarakawa
Hi,
Parameter
I tried using this approach and it worked

Code (remark: PRD → t):
popini $ (Ord(PRD) = 1)
+ pop(PRD-1) $ (Ord(PRD) > 1)
+ growthFactor(PRD) * pop(PRD-1) $ (Ord(PRD) > 1)
where popini is your initial value.
Variable
Similar to parameter. You can create a constraint as shown below:

Code (remark: PRD → t):
vPop(PRD)
=
popini $ (Ord(PRD) = 1)
+ vPop(PRD-1) $ (Ord(PRD) > 1)
+ growthFactor(PRD) * vPop(PRD-1) $ (Ord(PRD) > 1)
where popini is your initial value.
Hope this helps!