Defination of an equation
Defination of an equation
Is there any way to define a variable as the difference of the value of another variable/level in the present cycle and the previous cycle?
Re: Defination of an equation
Yes - you just need to use a stock to store the previous value. If you're using Euler integration, you can use
previous input = SMOOTH( input, TIME STEP )
Otherwise it may be better to use DELAY FIXED.
In a continuous time model "previous cycle" may not have a useful meaning, because model behavior should be invariant to the TIME STEP. Therefore it may be better to use an explicit parameter, e.g.,
previous input = SMOOTH( input, perception horizon )
If you're using this to compute a slope, the TREND function does this.
previous input = SMOOTH( input, TIME STEP )
Otherwise it may be better to use DELAY FIXED.
In a continuous time model "previous cycle" may not have a useful meaning, because model behavior should be invariant to the TIME STEP. Therefore it may be better to use an explicit parameter, e.g.,
previous input = SMOOTH( input, perception horizon )
If you're using this to compute a slope, the TREND function does this.
/*
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/