Skip to content

A Java-based simulator to simulate the spread of Covid-19 in a closed space

Notifications You must be signed in to change notification settings

liudj2008/CovidSimulator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

CovidSimulator

A Java-based simulator to simulate the spread of Covid-19 in an indoor environment

Scenario

People are shopping in an indoor market. The market has only one entrance/exit. The number of people in the market (number of people in the market) is constant: Once people reach the enter/exit, they will exit and will not be back. Meanwhile, the same amount of new people will enter the market. Suppose there is one random person infected by Covid-19, and he/she coughs/sneezes only once during the shopping time. We would like to know how many new people (R0) are infected by this initial Covid-19 carrier and how fast it is to have the first new infection, in order to evaluate the mask effectiveness.

How to run the model

  1. Go to run folder

  2. Run Java program in terminal

    java Simulator [numOfPeople] [initialSick] [path] [maskPercent] [maskSickPercent] [unMaskSickPercent]

    Simulator has five required parameters:

    numOfPeople: Number of people in the matrix (Market Capacity)
    initialSick: Number of initial infected people in the market
    path: save path for output files. Make sure the path already exists, otherwise java.io.FileNotFoundException will occur
    maskPercent: Percentage of people wearing masks (scale at 0 - 100)
    maskSickPercent: Probability of being infected if wearing masks (scale at 0 - 100)
    unMaskPercent: Probability of being infected if not wearing masks (scale at 0 -100)

  3. The model will generate output files in the selcted path folder with 1000 output files, each file holds snapshots of people health conditions for 100 steps

Analysis of model output

Orignal python code could be found in analysis folder

About

A Java-based simulator to simulate the spread of Covid-19 in a closed space

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages