Delay

Use this forum to post Vensim related questions.
Post Reply
Steven
Junior Member
Posts: 6
Joined: Tue Apr 20, 2010 8:54 pm

Delay

Post by Steven »

I have a problem with the delay:

DELAY FIXED((0.4*input), 20, (0.1*input))

The Type is Level and the input rises every year.
After the run of a simulation the output is rising after 20 years, but not before the 20 years. But I want that it rises all the time.
Do you have a solution for my problem!?
Thanks a lot for your help!
tomfid
Administrator
Posts: 3811
Joined: Wed May 24, 2006 4:54 am

Post by tomfid »

The problem is that the DELAY functions initialize the internal state of the delay (which is basically a chain of a bunch of levels) to a constant rather than some presumed historical profile of the inflow. One solution would be to create an explicit chain of levels, which you could then initialize as needed. Another option - probably easier - would be to override the output of the delay for the first 20 years of your simulation. For example:

output = IF THEN ELSE( time-INITIAL TIME < delayDuration, historic input, dynamic delay)
historic input = (whatever you think the profile should be)
dynamic delay = DELAY FIXED( input, delayDuration, initVal )

initVal could be whatever you want, since the IF in the output equation will override it anyway.

Tom
bob@vensim.com
Senior Member
Posts: 1107
Joined: Wed Mar 12, 2003 2:46 pm

Post by bob@vensim.com »

You can also use DELAY CONVEYOR which allows you to specify the time profile of the initial contents of the delay using a Lookup function.

Of course the simplest solution is

output = INTEG((input - output)/smooth time,input)

but this is a first order not a fixed delay.
Steven
Junior Member
Posts: 6
Joined: Tue Apr 20, 2010 8:54 pm

Post by Steven »

Thanks a lot for your solution!

Steven
Post Reply