Page 1 of 1
higher order delays and delyN
Posted: Sun Apr 23, 2006 5:57 am
by addor
I construct an aging chain with 3 serial stocks. Every outflow is stock*delaytime, the first inflow is a pulse. Thus the third stock should represent a daly of third order.
Then I compare this last stock with a delayN(inflow,delaytime,0,3).
Both aren't the same. Even if I take another delaytime for the delayN function I cannot define it such that the graph of the third order delay and that one of the delay3 become congruent.
Where is my error in reasoning?
aging chain
Posted: Sun Apr 23, 2006 10:46 am
by LAUJJL
Hi Addor
Can you join a simplistic model to illustrate your problem?
Regards.
JJ
Posted: Sun Apr 23, 2006 11:23 am
by bob@vensim.com
Make sure your model passes units checking. The outflow of a stock should be stock/intermediate delay time where
intermediate delay time = delay time/number of stocks
See the DELAY3 documentation in the reference manual for the actual equations for a 3rd order delay.
nth order delay
Posted: Sun Apr 23, 2006 7:20 pm
by addor
So, you confirm, that a third order delay should be the same as a delay3(...).
I used a delay time of 0.5 for each of 7 stocks but 7*0.5 for the delay3. This should also be valid, shouldn't it?
Strange is, that the delay3 gives "pieces/hour" instead of "pieces" as dimension....
Here is my model
third order delay
Posted: Sun Apr 23, 2006 8:42 pm
by addor
I think I should multiply the dealytime in delay3(...) not with 7 but with 3. But then the difference between stock3 and delay3(..) is even greater....
Peter
Posted: Mon Apr 24, 2006 1:16 am
by bob@vensim.com
Please read my first response and the reference manual. All exponential delays use level/delay time - multiplying here makes no sense.
Posted: Mon Apr 24, 2006 4:24 am
by addor
Of course, Bob, I did it. I attache here the model that uses the intermediate delaytime for the stocks. Still delay3 and stock3 are different, and although the input has the dimension "pieces/hour" and the delaytime has dimension "hour" delay3 get the dimension "pieces/hour".
Also after reading the manual I don't see my error in reasoning. I'm sorry.
Peter
Posted: Mon Apr 24, 2006 4:25 am
by addor
Here is the model
Posted: Mon Apr 24, 2006 10:16 am
by bob@vensim.com
You are getting closer. The equation should be
flow = level/(delaytime/7) - you forgot the parentheses. It is better to use two variables for delay time (eg "Total Delay Time" and "Per Level Delay Time") to prvent this type of confusion.
Posted: Mon Apr 24, 2006 1:46 pm
by addor
Of course, Bob, I should know how to handle compound fractions.... it's a shame
Now I have the "total delaytime" and the "delaytime = total delaytime / 7"
But nevertheless delay3 isn't same as stock3
And why gives delay3 as units "pieces/hour" if the input has "pieces/hour" and the "delaytime" has hour?
Posted: Mon Apr 24, 2006 2:47 pm
by addor
Ok, I built a model once again (only with 3 levels in the aging chain), and now delay3, delayN(...3) and stock3 are indeed same. I don't know what happend in the model before. Somethings went wrong.
But still I get the units/hour as the dimensions of delay...
Posted: Mon Apr 24, 2006 9:02 pm
by bob@vensim.com
DELAY3 (and DELAYN) have the same units for input and output - the output corresponds to the flow from the last level. So if the input is units/time the output is units/time - while the levels in the ageing chain are have units.