Epidemia - SIR

No preview image

1 collaborator

Default-person Reges Sabino (Author)

Tags

(This model has yet to be categorized with any tags)
Visible to everyone | Changeable by everyone
Model was written in NetLogo 6.1.1 • Viewed 90 times • Downloaded 10 times • Run 0 times
Download the 'Epidemia - SIR' modelDownload this modelEmbed this model

Do you have questions or comments about this model? Ask them here! (You'll first need to log in.)


Comments and Questions

Please start the discussion about this model! (You'll first need to log in.)

Click to Run Model

turtles-own
[
  doente? ;; se isto for verdade, então o agente é infeccioso
  imune? ;; se isto for verdade, então o agente é imune ou não pode ser infectado
  tempo-doente ;; há quanto tempo o agente é infeccioso
]

globals
[
  %infectados ;; a porcentagem da população que está infectada
]

to setup
  clear-all     ;; limpa a execução anterior
  ask patches [ set pcolor white ]      ;; mundo branco, facilita a impressão
  crt pessoas
    [
      set shape "person" ;; muda a forma para pessoas
      setxy random-xcor  random-ycor ;; define as coordenadas x e y aleatoriamente
      set tempo-doente 0
      set imune? false
      set size 1.5 ;;aumenta o tamanho
      ifelse (who < 10)
        [ ficar-doente ]
        [ ficar-saudável ]
  ]

  reset-ticks
end 

to ficar-doente
  set doente? true
  set color orange
  set tempo-doente 0
end 

to ficar-saudável
  set doente? false
  set imune? false
  set tempo-doente 0
  set color blue
end 

to tornar-imune
  set doente? false
  set tempo-doente 0
  set imune? true
  set color green
end 

to go
  mover
  infectar
  imunizar

  wait 0.1

  tick
end 

to mover
  ask turtles
    [
      rt random 100
      lt random 100
      fd 1
  ]
end 

to infectar
  ask turtles with [doente?]
    [ask other turtles-here with [not imune?]
      [if (random 100) < infecciosidade
        [ficar-doente]]]
end 

to imunizar
  ask turtles with [doente?]
    [ifelse (tempo-doente > 15)
      [tornar-imune]
        [set tempo-doente (tempo-doente + 1)]]
end 

There is only one version of this model, created over 3 years ago by Reges Sabino.

Attached files

No files

This model does not have any ancestors.

This model does not have any descendants.