Page 1 of 1

Derivatives

Posted: Fri Dec 11, 2009 4:53 pm
by karankhosla
Is there a vensim function to take derivatives automatically; or do I have to create a new variable which calculates the difference between the variable of interest at the current time step and the previous and then divides it by dt:

dV/dt = (V(n)-V(n-1))/dt

then repeat similarly to calculate the second derivative.

FYI: in "A behavioral approach to feedback loop dominance analysis"
by David N. Ford (http://www3.interscience.wiley.com/cgi- ... 2/PDFSTART), the author defines an "atomic variable" which maps the behaviour of the second derivative of a variable of interest - this aids in finding dominant feedback loops.

Posted: Sat Dec 12, 2009 11:48 am
by bob@vensim.com
There is no built in function for derivatives. You might use something like

derivative x = (x -SMOOTH(x,dt))/dt

where dt >= TIME STEP and a multiple of time step. You could also define a macro to do this