DELAY N(input,delay time, initial value, order) N'th order exponential delay
Returns an N'th order exponential delay. If order is 1 this function is almost the same as DELAY1I and if order is 3 it is almost the same as DELAY3I. The most significant difference is that the output of the DELAY N function depends on delay time from the previous Time Step while output from the DELAY3I function depends also on the value of delay time for the current time step.
The DELAY N function is treated as a discrete delay function, so that its output is constant for each Time Step. If you are using Euler or Diff integration this is true of all variables. However, if you are using Runge-Kutta integration this is different from functions such as DELAY3.
The DELAY N function will conserve quantities so the integral of the input will be the same as the integral of the input except that with 0 input the total output will be initial value times delay time as evaluated by the first active computation at initial time. In addition, if TIME STEP is a variable minor discrepancies may arise between the total input and total output.
Note that for the DELAY N function to make sense delay time must be bigger than order* TIME STEP. If this is not the case Vensim will issue a warning and automatically reduce the order so that this is true. When this happens the behavior of the DELAY N function is essentially the same as the behavior of the DELAY MATERIAL function.
Restrictions: DELAY N must directly follow the equal sign. It signals Vensim that the variable on the left-hand side of the equation is a Level or State variable. In the Equation Editor select Variable type Level, subtype Delay/Queue and enter DELAY N as the function.
Units: DELAY N( unit, time unit, unit, dmnl ) --> unit
Examples
delayed production = DELAY N(production, delay time, production, 12)