0

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!

  • 1
    You do not show us the place where infected count is changed. This would be the most important thing to know. You can edit your question or put it in a comment. – TurtleZero Jun 07 '22 at 05:15
  • The infection-counter object is incremented by one each time a successful transmission occurs (i.e., in the first code chunk where a susceptible turtle enters the latent phase). I've written it as infection-counter infection-counter + 1. – natalie stein Jun 07 '22 at 13:04
  • Could you explain me the difference between the number of successful transmission events and the number of turtles each turtle infects in more detail? Because isn't it correct that when a transmission is successful, the number of turtles a turtle infects increases by one? – Nelis Jun 08 '22 at 11:14
  • @Nelis That is what I initially thought as well, but when I ran the model and separated the infection counter for each turtle in BehaviorSpace, the result I got was how many times each turtle became infected (or in this case entered the latency phase), rather than the number of turtles each turtle infected at each given tick. – natalie stein Jun 08 '22 at 13:01
  • Could it be caused by the fact that a turtle can become latent again during the period a turtle is already latent? At the moment you are only checking if the turtle is not infected already, but not if the turtle is not already latent? – Nelis Jun 08 '22 at 13:20

0 Answers0