I'm trying to run a standard SIR agent-based model where agents transition from 'Susceptible' to 'Infected', and from 'Infected' to 'Recovered'. I'm now interested in calculating the instantaneous incidence, i.e. the number of agents who transition from 'Susceptible' to 'Infected' state at a given time t.
For example: On day 1 (model time), 2 agents transition from 'Susceptible' to 'Infected' On day 2 (model time), 5 agents transition from 'Susceptible' to 'Infected' On day 3 (model time), 7 agents transition from 'Susceptible' to 'Infected' . . .
I am able to get the total count of 'Infected' agents, but I'm interested in knowing this value of each time step. I'm looking to write a function that cumulatively adds up the number of new infections for each time step.
Any ideas on how one might do this in AnyLogic would be very helpful. Thanks.
Here is a screenshot, you need to select "Other" for the key to manually type the dimension "Date()":