Page 1 of 1

vensim PLE question

Posted: Mon Sep 13, 2010 2:42 am
by zhouchchun
how to calculate p(i)-p(i-1) in vensim PLE, please help me, thank you !

Posted: Mon Sep 13, 2010 7:10 am
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.

Thanks

Posted: Mon Sep 13, 2010 9:32 am
by zhouchchun
Thank you, Tony, you help me very much

Posted: Mon Sep 20, 2010 10:48 pm
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