Can I use TREND function to express a steady decrease of a variable over time

Use this forum to post Vensim related questions.
Post Reply
ngtrang
Junior Member
Posts: 18
Joined: Thu Dec 08, 2022 9:22 am
Vensim version: DSS

Can I use TREND function to express a steady decrease of a variable over time

Post by ngtrang »

I have a question:
Can I use TREND function to express a steady decrease of a varibale over time.
For example, I have a fraction variable of 0.8 per year. I want to decrease the value of this fraction variable over time at a rate of 0.5% each year within 10 years, for example.
Can I use TREND function instead of creating a stock and level?
Thank you.
tomfid
Administrator
Posts: 3986
Joined: Wed May 24, 2006 4:54 am

Re: Can I use TREND function to express a steady decrease of a variable over time

Post by tomfid »

No. The TREND calculates the fractional rate of change of a variable; it doesn't generate it.

In advanced versions (not PLE) you could write a macro to handle this behavior.

If the rate will not change during the simulation, you can use:

decayVar = initialValue*EXP(-decayRate*(Time-INITIAL TIME))
initialValue = 0.8
decayRate = 0.005

If the decayRate might change midway through the simulation, a stock-flow structure, or an equivalent macro, is really the only choice.
ngtrang
Junior Member
Posts: 18
Joined: Thu Dec 08, 2022 9:22 am
Vensim version: DSS

Re: Can I use TREND function to express a steady decrease of a variable over time

Post by ngtrang »

Thank you so much
Post Reply