CORONA2_

CORONA2_ preview image

1 collaborator

Default-person Igel 2020 (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 83 times • Downloaded 5 times • Run 0 times
Download the 'CORONA2_' modelDownload this modelEmbed this model

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


Info tab cannot be displayed because of an encoding error

Comments and Questions

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

Click to Run Model

turtles-own [
  zustand
  bewegung
  genesungszeit
  ueberlebensrate
  Abschottung
  Abschottungszeit
]

to setup
  ca
  crt anzahl-turtles [
   set shape "person"
   set zustand "gesund"
   set color green
   set bewegung TRUE
   set xcor -25 + random 50
   set ycor -25 + random 50
  ]


  ask n-of round (infiziert% * anzahl-turtles / 100) turtles [
    set zustand "infiziert"
    set color red
    set genesungszeit Genesungszeit_
    set ueberlebensrate random Überlebensrate_
  ]
;;einige turtles werden infiziert und ihre Genesungszeit und Überlebensrate eingestellt

  ask n-of round (quarantaene% * anzahl-turtles / 100) turtles [
    set bewegung FALSE
  ]
;;einige turtles beachten social distancing

  reset-ticks
end 

to go
  ask turtles [
    if [bewegung] of self = TRUE [
     fd 1
     lt random 360
     rt random 360
    ]
  ;;die sich bewegenden turtles machen einen Schritt in eine zufällige Richtung

    if zustand = "gesund" [
    ;;if [zustand] of one-of turtles in-radius 10 = "infiziert" [
    if any? turtles with [zustand = "infiziert"] in-radius 1 [
      set zustand "infiziert"
      set color red
      set genesungszeit Genesungszeit_
      set ueberlebensrate random Überlebensrate_
      ]
    ]
;;turtles infizieren sich


    if Abschottung = TRUE [
      set Abschottungszeit  -1 + Abschottungszeit
    ]
    if Abschottungszeit = 1 [
      set Abschottung FALSE
      if bewegung = "QUARANTAENE" [
        set bewegung FALSE
      ]
      if bewegung = "TRUE+" [
       set bewegung TRUE
      ]
      if zustand = "gesund+" [
        set zustand "gesund"
      ]
      if zustand = "infiziert+" [
        set zustand "infiziert"
      ]
    ]
;;die Abschottung (Quarantäne) wird "berechnet"


   set genesungszeit -1 + genesungszeit
   if genesungszeit = 0 [
      set zustand "geheilt"
      set color pink
      set genesungszeit 2
    ]
   if zustand = "gesund" [
      set genesungszeit 9999999
  ]
   if zustand = "gesund+" [
      set genesungszeit 9999999
    ]
;;turtles genesen (oder auch nicht)


    if zustand = "gesund"[
     set ueberlebensrate 1
    ]
    if zustand = "gesund+"[
     set ueberlebensrate 1
    ]
    if [ueberlebensrate] of self = 0 [
     die
    ]
    if [zustand] of self = "infiziert+" [
     set ueberlebensrate random Überlebensrate_
      ]
    if [zustand] of self = "infiziert" [
     set ueberlebensrate random Überlebensrate_
      ]
  ]
  ;;das Sterben wird "berechnet"

  tick
end 

to Abschottung_
  ask n-of 10 turtles [
    set Abschottung TRUE
    if bewegung = FALSE [
      set bewegung "QUARANTAENE"
    ]
    if bewegung = TRUE [
      set bewegung "TRUE+"
    ]
    set Abschottungszeit Abschottungszeit_
    if zustand = "gesund" [
      set zustand "gesund+"
    ]
    if zustand = "infiziert" [
      set zustand "infiziert+"
      set genesungszeit genesungszeit
    ]
  ]
  ;;turtles werden abgeschottet => keine Bewegung und kein Infizieren
end 





There is only one version of this model, created almost 4 years ago by Igel 2020.

Attached files

File Type Description Last updated
CORONA2_.png preview Preview for 'CORONA2_' almost 4 years ago, by Igel 2020 Download

This model does not have any ancestors.

This model does not have any descendants.