Obtain current state of intermediate steps in Dynamic functions
Obtain current state of intermediate steps in Dynamic functions
How can I look at the intermediate states of Dynamic functions? For example if I have a DELAY_FIXED variable with a delay time of 10, how can the state of the 10 additional stocks used to represent the delay behaviour be obtained? I would like to view this with the "Table" tool if possible. I know that I found this before but for some reason cannot find it again and have tried certain sections of the documentation with no luck yet.
Re: Obtain current state of intermediate steps in Dynamic functions
Hi
Here is an example with a fixed delay.
By varying the final time you will notice that the averaged input delayed comes closer to the expected on as the final time increases.
One must too put the starting time to at least 3, in the control panel time axis. put to 3 the delay in the model joined The model shows the sum of the 3 additionnal stocks. If you want to have the detail of the sum, you will have to use subscripts with the size of the subscript equal to the delay and put each input in the subscript array and slide the array downward at each time step or use a number of stocks equal to the delay and make each stock slide downward to its next one at each time step.
I joined a second model with the detail of each stock delayed but without subscripts that can be used with Vensim PLE.
You can verify that the fixed delayed input and the input delayed one month are equal.
Regards.
JJ
Here is an example with a fixed delay.
By varying the final time you will notice that the averaged input delayed comes closer to the expected on as the final time increases.
One must too put the starting time to at least 3, in the control panel time axis. put to 3 the delay in the model joined The model shows the sum of the 3 additionnal stocks. If you want to have the detail of the sum, you will have to use subscripts with the size of the subscript equal to the delay and put each input in the subscript array and slide the array downward at each time step or use a number of stocks equal to the delay and make each stock slide downward to its next one at each time step.
I joined a second model with the detail of each stock delayed but without subscripts that can be used with Vensim PLE.
You can verify that the fixed delayed input and the input delayed one month are equal.
Regards.
JJ
- Attachments
-
- stock delayed_2.mdl
- (3.75 KiB) Downloaded 230 times
Re: Obtain current state of intermediate steps in Dynamic functions
Some dynamic variables are implemented as macros, and you can turn on visibility of their internals (Tools>Options>Settings). Check "Show" for "Macro Variables" (near the middle of the dialog pane).
However, the discrete or infinite order delays are not among them. If you need the internal states, you'll have to use arrays to create an explicit aging chain.
You might be able to use the QUEUE AGE functions for some purposes.
However, the discrete or infinite order delays are not among them. If you need the internal states, you'll have to use arrays to create an explicit aging chain.
You might be able to use the QUEUE AGE functions for some purposes.
/*
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
*/