Code Monkey home page Code Monkey logo

flu-propagation-models's Introduction

This project contains all of the scripts for the MAT 306 Project on Disease Propagation. Contributors:

  • Evan Christianson
  • David Kraemer
  • Caleb Leedy
  • Will Royle

Using the Matlab Simulation

We use four files to conduct the deterministic model results in Matlab:

This file contains the simulations of the deterministic model. It creates plots for the population-type proportions over the course of a provided lengthof time.

This file contains the variations of our deterministic model. The script simulates the models with parameters that are initialized at the beginning of the file. While the Baseline_Model.m plots the population levels of each model over time the cost_consideration.m file allows for an easier comparison between net costs to the college.

After completing the simulation one is able to plot how making more people immune to the disease alters the total cost to the college.

This function conducts a sensitivity analysis for each parameter on each population type.

This script calls the Sensitivity.m function for different initial values of parameters.

Using the Python Simulation

The simulation files can be found in the simulation directory. The files are:

This is the file that defines the Person class. The Person class has two class attributes:

  • loc, which is a Numpy ndarray with size (2,) that represents the class instance's location at any given time. Each coordinate is some number in [-1,1].
  • status, which is one of four options: SUSCEPTIBLE, INFECTIVE, REMOVE, DEAD.

Each person is represented by a point on a 2D grid. The model parameters, like the infection rate, recovery rate, immunization probability, relapse rate, and the fatality rate are specified as static class attributes (these are shared across all Person objects, although you can alter the parameters for individual objects).

This file generates an animated plot of a Monte Carlo simulation with an array of People objects interacting on a grid.

Basic usage for the animation is given by:

$ python3 simulation/animation.py 

Notice that this project is running on the Python 3 interpreter. The default interpreter is Python 2. If you want to use an interactive interpreter, use:

$ ipython3 console

to launch the IPython console, and then

In [1]: run 'simulation/animation.py'

This allows you to access the environment variables used in the simulation. Not that you have to manually close the simulation with CTRL-C a few times.

flu-propagation-models's People

Contributors

davidnkraemer avatar

Stargazers

 avatar

Watchers

James Cloos avatar  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.