Re: Delay Fixed and Integration Error in Vensim

Use this forum to post Vensim related questions.
Post Reply
malli
Member
Posts: 44
Joined: Wed Nov 15, 2006 5:10 am

Re: Delay Fixed and Integration Error in Vensim

Post by malli »

Hi,

I was using the delay macro in vensim and realized how one needs to be careful with TIMESTEP when using the macro.

Instance - suppose its a 6th order delay and I have a total delay time of 1, then the delay in each of the stocks is 1/6. Which meant to me that my earlier DT of 0.25 was not right ( I had gone by the thumb rule of DT being 1/4th of the smallest time constant - without factoring for the break-up of the delay time in six stocks)

Was wondering how does Vensim handle this problem in a delay with infinite order - the delay fixed macro given that one is still integrating the stocks?

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

Post by bob@vensim.com »

Vensim has only 3rd order delay macros (DELAY3, SMOOTH3) and the time constant in those is 1/3 of that input. So if you are using any of these be careful.

DELAY FIXED is not implemented as a macro but a function - it stores the time at which a value should be emitted and is not dependent on time step except that during every computation it needs to store new values.

The function DELAY N will automatically detect conditions where nonsense would occur and reduce the order of the delay - it does issue a warning when this happens.
malli
Member
Posts: 44
Joined: Wed Nov 15, 2006 5:10 am

Post by malli »

Thanks Bob
Post Reply