I have a disease model that follows SEI dynamics (Susceptible-Exposed-Infected). I would like to count the number of turtles each turtle infects in my model (16 turtles in total with a counter for each). I would also like it to reset for each turtle once the turtle becomes susceptible again (there is no death or immunity in this model so once turtles recover they become susceptible again). I have a turtle-owned variable called infection-counter in my code, but this seems to produce the number of successful transmission events rather than the number of turtles each turtle infects. How would I go about this?
Here is my disease procedure:
to spread
let prob random-float 1.0
ask turtles [
ifelse infected? [] [
if any? other turtles in-radius 1 with [ infected? ] and prob <= transmission-probability
[ become-latent
set latent-period-length random-exponential average-latent-period * ticks-per-day
set latent-period-time 0
set infection-counter infection-counter + 1
]
]
]
ask turtles [
if latent-period-time > latent-period-length ;if latent period counter is greater than exponentially derived latent period with avg of 30 days, become infected
[
become-infected
set infectious-period-length random-exponential average-infectious-period * ticks-per-day
set infectious-period-time 0
set latent-period-time 0
]
]
ask turtles [
if infectious-period-time > infectious-period-length ;infectious-period is a slider variable set to 100
[
become-susceptible
set infectious-period-time 0
set infection-counter 0
]
]
ask turtles [
if latent?
[
set latent-period-time latent-period-time + 1 ]
if infected?
[
set infectious-period-time infectious-period-time + 1]
]
end
Thanks!