Covid-19 How quarantine flatten the curve?

Covid-19 How quarantine flatten the curve? preview image

1 collaborator

Tags

Visible to everyone | Changeable by everyone
Model was written in NetLogo 6.1.1 • Viewed 723 times • Downloaded 36 times • Run 0 times
Download the 'Covid-19 How quarantine flatten the curve?' 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

Expectation

This model has two modes: the virus spread from infected (red) to neighneighbors8. When somebody was infected, after 20 ticks it could be cured with a cure-rate% 1. communities, where agents with the probability of travel rate/10 could move 2. same communities, but when close-when of a population infected, some communities prohibit travelling

Posted almost 5 years ago

The zip file is corrupt! (Question)

Hi, I tried several times to download and run the model, but it didn't work! The zip file is corrupt. Would you please take a look and see what is wrong? Best, Rassoul

Posted almost 5 years ago

Rassoul Mahiny,

For some reason, I could not download the file too. However, If you will press Ren in NetLogo Web tab, and at the upper-right corner click on export: NetLogo, it supposes to work. Sorry for a bad zip file, but I don't know how to fix that problem on my own.

Posted almost 5 years ago

The zip file is corrupt!

Thanks so much. The way you suggested, namely copying from the web version worked! Cheers Rassoul

Posted almost 5 years ago

Description of the model

It will be very helpful if you provide a detailed description of the model under the 'Info' tab. Thanks.

Posted over 4 years ago

Click to Run Model

globals[
  borders?
]

breed [actors actor]

actors-own[
days
]

breed [borders border]

to setup
  clear-all
  reset-ticks
  clear-plot

  set borders? FALSE

  (ifelse senario = "base" [
    ask n-of (count patches with [pcolor = black] * population / 100) patches [
      sprout-actors 1 [
        set shape "person"
        set color white
      ]
    ]
    ask one-of actors [set color red]
    ]


    senario = "communities" or   senario = "communities and borders" [
    create-borders 10 [
      setxy 0 0
        set heading one-of [90 270]
      ]
      ask borders [
        repeat 4 [
          repeat sqrt (count patches) [
            set pcolor grey
            fd 1
          ]
          rt 90
          repeat sqrt (count patches) + sqrt (count patches) / 4 [
            set pcolor grey
            fd 1
          ]
        ]
      ]
      if sqrt (count patches) > 20 [
        ask borders [
          setxy sqrt(sqrt(count patches)) sqrt(sqrt(count patches))
          repeat 4 [
            repeat sqrt (count patches) [
              set pcolor grey
              fd 1
            ]
            rt 90
            repeat sqrt (count patches) + sqrt (count patches) / 4 [
              set pcolor grey
              fd 1
            ]
          ]
        ]
      ]

      create-borders 1 [
        setxy sqrt(count patches) / 2 sqrt(count patches) / 2
        set heading 90
      ]
      ask border 10 [
        repeat 2 [
          repeat sqrt (count patches) [
            fd 1
            set pcolor grey
          ]
          rt 90
        ]
      ]
      ask borders [die]
      ask n-of (count patches with [pcolor = black] * population / 100)
      patches with [pcolor = black] [
        sprout-actors 1 [
          set shape "person"
          set color white
        ]
      ]
      ask one-of actors [set color red]

    ]


    [stop]
  )
end 

to go
  ;if not any? actors with [color = white] [stop]
  if not any? actors with [color = red] [stop]
  travel
  infect
  if count actors with [color = red] / count actors > close-when [
    close-borders
  ]

  ;not-live
  cure

  tick
end 

to travel
  ask n-of (count actors-on patches with [pcolor = black] * travel-rate / 1000)
  actors-on patches with [pcolor = black]
  [
    setxy 0 0
  ]
  ask patch 0 0  [
    ask actors-here [
      if not any? patches with [not any? turtles-here and pcolor = black] [stop]
      move-to one-of patches with [not any? turtles-here and pcolor = black]
    ]
  ]
end 

to infect
  ask actors with [color = red] [
    ask neighbors [
      ask actors-here with [color = white] [
        if random 100 <= infection-rate [set color red]
      ]
  ]
  ]
end 

to close-borders
  if not borders? [
    if senario = "communities and borders" [
      ask n-of number-of-borders patches with [pcolor = black] [
        set pcolor yellow
      ]
      repeat close-borders-law [
        ask patches with [pcolor = yellow] [
          ask neighbors with [pcolor = black] [set pcolor yellow]
        ]
      ]
      set borders? TRUE
    ]
  ]
end 

to not-live
  ask actors with [color = red] [
    set days days + 1
    if random 100 <= days - 30 [
      if random 100 < 20 [die]
    ]
  ]
end 

to cure
  if ticks > 10 [
    ask actors with [color = red] [
      if random 100 < cure-rate [
        if random 100 < 50 [
          set color green
        ]
      ]
    ]
  ]
end 

There are 2 versions of this model.

Uploaded by When Description Download
Vsevolod Suschevskiy almost 5 years ago re-upload the same file Download this version
Vsevolod Suschevskiy almost 5 years ago Initial upload Download this version

Attached files

File Type Description Last updated
corona experiment-table.csv data 100 runs of 2 scenarios almost 5 years ago, by Vsevolod Suschevskiy Download
corona.nlogo background .nlogo but without zip almost 5 years ago, by Vsevolod Suschevskiy Download
Covid-19 How quarantine flatten the curve?.png preview Preview for 'Covid-19 How quarantine flatten the curve?' almost 5 years ago, by Vsevolod Suschevskiy Download

This model does not have any ancestors.

This model does not have any descendants.