higher order delays and delyN

Use this forum to post Vensim related questions.
Post Reply
addor
Senior Member
Posts: 50
Joined: Mon Oct 27, 2003 9:45 am

higher order delays and delyN

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

aging chain

Post by LAUJJL »

Hi Addor

Can you join a simplistic model to illustrate your problem?
Regards.
JJ
bob@vensim.com
Senior Member
Posts: 1107
Joined: Wed Mar 12, 2003 2:46 pm

Post 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.
addor
Senior Member
Posts: 50
Joined: Mon Oct 27, 2003 9:45 am

nth order delay

Post 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
Attachments
delayN.mdl
(5.67 KiB) Downloaded 599 times
addor
Senior Member
Posts: 50
Joined: Mon Oct 27, 2003 9:45 am

third order delay

Post 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
Peter Addor
bob@vensim.com
Senior Member
Posts: 1107
Joined: Wed Mar 12, 2003 2:46 pm

Post 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.
addor
Senior Member
Posts: 50
Joined: Mon Oct 27, 2003 9:45 am

Post 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
Peter Addor
addor
Senior Member
Posts: 50
Joined: Mon Oct 27, 2003 9:45 am

Post by addor »

Here is the model
Attachments
delayN.mdl
(5.62 KiB) Downloaded 587 times
Peter Addor
bob@vensim.com
Senior Member
Posts: 1107
Joined: Wed Mar 12, 2003 2:46 pm

Post 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.
addor
Senior Member
Posts: 50
Joined: Mon Oct 27, 2003 9:45 am

Post 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?
Attachments
delayN.mdl
(5.76 KiB) Downloaded 635 times
Peter Addor
addor
Senior Member
Posts: 50
Joined: Mon Oct 27, 2003 9:45 am

Post 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...
Attachments
delay3level.mdl
(3.31 KiB) Downloaded 703 times
Peter Addor
bob@vensim.com
Senior Member
Posts: 1107
Joined: Wed Mar 12, 2003 2:46 pm

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