Coder Social home page Coder Social logo

simba's Introduction

Simba: Simulation-based Vaccine Allocation

Build Status License: GPL v3

Version: 0.1 (Please note that this is proof-of-concept code in a very early development stage). For qestions and remarks pleaes contact Gerrit Großmann.

Overview


Official code for our paper Learning Vaccine Allocation from Simulations.

Installation


Install rust:

sudo curl https://sh.rustup.rs -sSf | sh -s -- -y && source $HOME/.cargo/env

Compile rust code:

cd rust_code/rust_reject && cargo build --release

Install Python3 dependencies (or use pipenv):

pip install -r requirements.txt

Example Usage


Run the experiments from the study with:

python evaluation.py

Alternativly, you can import and call def analysis from evaluation.py.

Calling Rust

You can also call the rust code diretly. See the def call_rust for more information. Note that the network file contains containing a labeled graph specifying the initial state, each line having the form <Nodeid>;<Label>;<Neighbor1>,<Neighbor2>,...

0;I;31,29,94,13,83
1;S;66,15,73
2;S;29,61,26,80,16,83,30,62,3,93,27,87,68,18,79,6
3;I;83,2,29,4,28,61,46,21,9,49,41,68,16,74
4;S;82,28,12,83,3,62,66,68
...

Nodes start with id 0 and are sorted (rendering the first number somewhat redundant). Isolates (nodes withouth neighbors) are not supported (yet). There should be at least one node for each possible label.

Output:

Each rust-call produces extensive outputs in output/<expname> containing the input graphs, the transmission graphs, and its solution. In particular, in each iteration, Simba outputs the corresponding input graph where initially infected nodes are red and vaccinated nodes are orange.

ExampleGraph

Runtime


Constructing and solving a single transmission graph is slightly supra-linear.

ExamplePerformance

TODOs


  • Clean output (and direct to log) and code
  • Use variance reduction technique in rust

simba's People

Contributors

gerritgr avatar

Watchers

 avatar  avatar

Forkers

jonas-klesen

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.