Code Monkey home page Code Monkey logo

covid_nunavut's Introduction

COVID-19 Agent Based Model

Model details:

A stochastic, age-stratified agent-based computational model for the transmission dynamics of COVID-19. The computational model simulates autonomous agents (representing individuals in a human population) and their interactions within a constrained virtual environment. Agents follow the natural history of disease, including epidemiological stages of susceptible, infected and incubating, asymptomatic, presymptomatic, and symptomatic with either mild, severe, or critical illness, recovered, and dead.

Model features include:

  • Age structured with realistic contact dynamics
  • Household structure of Nunavut.
  • Asymptomatic, Presymptomatic transmission
  • Isolation of mild/severe cases
  • Isolation of symptomatic individuals
  • The average number of daily contacts can be changed to fit to data
  • Four strains, corresponding to when they were identified in the United States

How to download and run

Prerequisites: Julia 1.0.4, access to a cluster or a high-compute workstation.

  1. Download or clone the entire repository and navigate to the folder.
  2. Launch Julia and cctivate the project by: julia --project=.. Double check if the project environment is set correct by entering Pkg mode by typing ].
  3. Instantiate the project by typing ] instantiate.
  4. Include the file simulations_cluster.jl using the command
include("simulations_cluster.jl")

Note, that in our version of this file we connect to our compute cluster using the Slurm cluster software. The user may want to simply use addprocs to run locally on their computer, run everything in a serial manner (takes long), or use a compute cluster with the help of ClusterManagers. The simulations/scenarios can be launched by executing

run_param_scen_cal(b,h,vi,vt,t,v2,v1,vactime,trans2,trans3,index,time2,time3,modeltime)

to run the scenarios. The arguments are

  • b: Float64 - probability of transmission for presymptomatic cases.
  • h: Int64 - previous herd immunity in the population (either 5, 10, 20, 30 or 50%).
  • vi: vector with number of initial infected (first strain).
  • vt: vector with days of first strain introduction.
  • t: time of implementation for local NPI.
  • v2: changes in contact pattern (state wide NPI).
  • v1: time of changes in contact pattern.
  • vactime: when the vaccination starts.
  • trans2: Float64 - second strain transmissibility.
  • trans3: Float64 - third strain transmissibility.
  • index: Int64 - index to differ different files (see Model output).
  • time2 and time3: introduction of second and third strains.
  • modeltime: simulated time (days).

All the scenarios presented in the paper can be seen in the file 'vectors.jl'

Model output

First, make sure that the address 'main_folder' inside function 'create_folder' in file simulations_cluster points to a valid directory in your system.

The function 'run_param_scen_cal' will generate a folder, inside the pointed directory, named results_b_herd_immu_h_trans2_index in which all the variables are the ones cited in the previous section. b is the probability, but the '.' is replaced by '_'. Copy and paste each vaccination scenario in vector.jl.

Inside this folder, one will find different data files. The most important ones are the ones named simlevel_*_inc_**.dat in which

  • * stands for lat, lat2, lat3, hos, hos2, hos3, icu, icu2, icu3, ded, ded2, ded3. Which are the number of infections, Non-ICU hospitalizations, ICU hospitalizations and deaths generated by each one of the strains. It may be necessary to scale the number of hospitalizations and deaths by the reported ones when analyzing the data.

  • ** stands for all, ag1, ag2, ag3, ag4, ag5, ag6. Which are the data for the entire population or each one of the six age groups in the model.

The files contain a modeltime x number of simulations (by default 318x500) matrix. However, the first row is the heading of the file and the first column of it is the timeline. The other columns are the incidence of a given outcome in the given day of simulation.

covid_nunavut's People

Contributors

thomasvilches avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.