vensim PLE question

Use this forum to post Vensim related questions.
Post Reply
zhouchchun
Junior Member
Posts: 8
Joined: Tue Apr 20, 2010 1:45 pm

vensim PLE question

Post by zhouchchun »

how to calculate p(i)-p(i-1) in vensim PLE, please help me, thank you !
Administrator
Super Administrator
Posts: 4573
Joined: Wed Mar 05, 2003 3:10 am

Post by Administrator »

I don't know if PLE has DELAY FIXED, but you can use that to store the value of P at time-1.

P at last time step = DELAY FIXED ( P, time step, 0 )
value = p - P at last time step

Tony.
zhouchchun
Junior Member
Posts: 8
Joined: Tue Apr 20, 2010 1:45 pm

Thanks

Post by zhouchchun »

Thank you, Tony, you help me very much
tomfid
Administrator
Posts: 3804
Joined: Wed May 24, 2006 4:54 am

Post by tomfid »

As long as you're using Euler or Diff integration, you can also use SMOOTH(p,TIME STEP).

It's worth pondering why you want a discrete delayed value - generally people are using this to either calculate derivatives or run discrete time models, both of which have pitfalls.

Tom
Post Reply