How to store and retrieve past variable values

Use this forum to post Vensim related questions.
Post Reply
sibanez
Member
Posts: 34
Joined: Sun Jul 05, 2015 10:11 pm
Vensim version: PRO

How to store and retrieve past variable values

Post by sibanez »

Hi,

I am trying to calculate the expected profitability of a specific project by taking the averages of the last 3 years profits and extrapolating them 2 years in the future (when the project is expected to be online)

My question is: how can I store and retrieve the profitability data corresponding to the last 3 years in order to calculate the means? (As the time step is 0.0625 there will be 16 values per year).

Thank you very much.

Santiago
tomfid
Administrator
Posts: 3811
Joined: Wed May 24, 2006 4:54 am

Re: How to store and retrieve past variable values

Post by tomfid »

You can use the DELAY FIXED function to create a stock representing the 3-year moving accumulation. For example:

profit = ...
cumulative profit = INTEG( adding - removing, 0 )
adding = profit
removing = DELAY FIXED( profit, horizon, 0 )
horizon = 3
average profit = cumulative profit / horizon
sibanez
Member
Posts: 34
Joined: Sun Jul 05, 2015 10:11 pm
Vensim version: PRO

Re: How to store and retrieve past variable values

Post by sibanez »

Ok. Thanks!
Post Reply