Adding delays to stock accumulation
I'm having trouble trying to interpret what the correct function to use is for this. Say if I want the numbers from a flow entering a stock to stay there for a certain number of time steps (say 10), rather than it flowing out instantaneously to outward flows, how would I do this?
-
Hi Victor,
To achieve this, the most common method is using a delay function on the outflow.
Assume you have a model containing an inflow, a stock, and an outflow. Give the outflow the equation delay(inflow, delaytime), where inflow is the name of the inflow and delaytime is the number of timesteps you want to delay the inflow by. Numbers will now stay in the stock for the specified delaytime, such as 10 in your example. There are some more details on the delay function in the documentation here.
I hope this helps,
Martin0
Please sign in to leave a comment.
Comments
1 comment