Skip to content

pl992/VirusPropagator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 

Repository files navigation

Virus Propagator

Real world interpretation

This simulator shows how the 'Herd immunity' develops and what is exactly. At the end of the simulation there are no more infected people and the disease disappears. The remaining people in the lattice never got infected and they will never do because no more disease is present (some news are reporting this is the current technique the UK government wants to apply for the new spreading virus COVID19)

The dots deleted from the lattice can be interpreted in 3 different ways:

  • They got killed by the virus

  • They had been quarantined

  • They healed

Just run the script

Running the script will make a simple animation (in the running folder) called Movie.mp4. If the settings are similar yellow dots will represent infected people and the others healthy people. Play with the parameters. The information of the simulation will be saved in the worlds directory such that analysis can be done afterwards.

Simulation details

2D lattice with spacexspace cells representing the space

Each cell of the grid can be contaminated or not contaminated. After dt iterations a cell is contaminated it comes back to be not contaminated

It starts from a population of npeople people with ninfected infected dots.

People are moving through random walks (dispacement defines the size of the square inside which the dot can move)

If an infected person passes through a not contaminated cell the cell becomes contaminated, if it's already contaminated the timer of the contamination start over

If a person not infected passes through a contaminated cell he has a probability of p_get_infected to get infected

After lifetime timesteps an infected person is deleted from from the grid

Main parameters

  • space: number of cells the 2D lattice contains

  • p_get_infected: probability that a dot passing through an infected cell becomes infected

  • lifetime: number of iterations an infected dot passes before being removed from the lattice

  • npeople: number of dots contained in the lattice

  • dt: number of iterations a cell can infect the dots

  • T: maximum time that will be spent

  • ninfected: starting number of infected dots

  • displacement: number of cells in each dimension a dot can move

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages