Obtain current state of intermediate steps in Dynamic functions

Use this forum to post Vensim related questions.
Post Reply
pbreach
Member
Posts: 29
Joined: Mon Oct 26, 2015 5:23 pm
Vensim version: DSS

Obtain current state of intermediate steps in Dynamic functions

Post by pbreach »

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.
LAUJJL
Senior Member
Posts: 1427
Joined: Fri May 23, 2003 10:09 am
Vensim version: DSS

Re: Obtain current state of intermediate steps in Dynamic functions

Post by LAUJJL »

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
stock delayed.mdl
(2.49 KiB) Downloaded 245 times
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
stock delayed.mdl
(2.49 KiB) Downloaded 245 times
Attachments
stock delayed_2.mdl
(3.75 KiB) Downloaded 230 times
tomfid
Administrator
Posts: 3811
Joined: Wed May 24, 2006 4:54 am

Re: Obtain current state of intermediate steps in Dynamic functions

Post by tomfid »

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.
Post Reply