Good morning, in a System Dynamics model created on AnyLogic, I would like to compute the cumulative sum of a flow of the previous 7 days. My purpose is to calculate the reproduction ratio of a disease starting from the infectious population at time t over the cumulative sum of the infectious in a fixed time interval. The formula is the following:
where:
- I(t) = infectious population at time t --> I(t) is a flow in the model that changes a stock
- I(t-s) = infectious population at time t-s
- w(s) = gamma distribution
- s represents the time interval of the previous 7 days
I have all the data but I am not able to calculate the sum of I(t-s).
Thanks.