Herd Immunity: Difference between revisions

From MRC Centre for Outbreak Analysis and Modelling
Jump to navigation Jump to search
No edit summary
Line 14: Line 14:
=== Running on a Standalone Machine ===
=== Running on a Standalone Machine ===


Download the ZIP file [https://mrcdata.dide.ic.ac.uk/resources/herd.zip here], which containing Java source and compiled classes. I compiled with Java 8u91; install Java from [http://java.sun.com Oracle] if you need to. Unzip it to any folder you like. (Don't just run it from inside the ZIP - it won't work!). If you need an unzipper, try [http://7-zip.org 7-Zip]. Then click on '''runthis.bat''' in the root folder. Being Java code, it should also be fine on Linux and Mac.
Download the ZIP file [https://mrcdata.dide.ic.ac.uk/resources/herd.zip here], which containing Java source and compiled classes. I compiled with Java 8u91; install Java from [http://java.sun.com Oracle] if you need to. Unzip it to any folder you like. (Don't just run it from inside the ZIP - it won't work!). If you need an unzipper, try [http://7-zip.org 7-Zip]. Then click on '''run_local.bat''' in the root folder. (Or simply '''javaw Herd'''. Being native Java code, it should also be fine on Linux and Mac, but I haven't specifically tested.
 
==== The User Interface ====
 
It's really easy. You click the up and down arrows vary the reproductive number, and the percentage vaccination, then you click the big button to run the simulation. Then you wait and watch in awe and wonder as the simulation runs and presents you its results. At the end, you'll see a graph of all the collected samples for that R<sub>0</sub>, and the key will highlight which sample was the one you just did. (Afraid in the current standalone version, you can't name your sample, which you can with the android version below. I might fix that one day - then again, it's nice to not really need a keyboard while you're demoing).
 
==== Demo mode ====
 
If you run '''run_local_demo.bat''' (or javaw Herd /DEMO), then it runs in a demo mode, which cycles round non-interactively, collecting data evenly across vaccination coverage and R<sub>0</sub> - so if you leave it running overnight, it will collect enough samples to give you good looking best-fit curves for all the graphs. There's no exit button, so you'll have to do ALT+F4 in windows to exit. (Need to test Mac/Linux!)
 
==== Managing Data ====
 
There's a batch file '''clear.bat''', which will make a directory of the form bkp_yyyymmdd_hhmmss, and copy the current data in it. Then it will replace the data files with the ones found in "bkp_OneSample", which contain just a single point for every graph. NB - at present, these batch files have the working directory hard coded into the file. I'll fix this soon - in the meantime, edit them!
 
=== Running with Androids ===


=== Usage History ===
=== Usage History ===

Revision as of 15:38, 12 September 2016

Herd Immunity

Work in progress! Details below could change!

Introduction

Also known as the Billiard Ball Game, and various alternatives! It's a fun and pretty Java application that shows a load of coloured balls bouncing around a space. At the beginning they will either be green (susceptible), or blue (vaccinated). Then a couple will turn red (infected), and they will each try to infect the next R0 different balls they bounce into. If those victims are susceptible, then they will turn red and start trying to do their own infecting. When R0 attempts to infect have been made, they becoming immune (grey). The vaccination percentage, and R0 are the things you can choose; R0 is a whole number between 3 and 8, and vaccination between 0 and 100% in 10% intervals.

After each run, the number of infections made is recorded and plotted on a graph; there is one graph for each value of R0 with vaccination coverage on the x-axis, and number of hosts on the y-axis. After a few samples have been connected, a best fit curve will be plotted, showing the basic herd immunity principle: vaccinating for example 30% of the population causes a reduction of much more than 30% in the final number of cases.

The game can be used as a standalone application, or with various additional dependencies, it can be controlled through a tablet, which has been our favourite and most engaging way of using the game in public events.

Running on a Standalone Machine

Download the ZIP file here, which containing Java source and compiled classes. I compiled with Java 8u91; install Java from Oracle if you need to. Unzip it to any folder you like. (Don't just run it from inside the ZIP - it won't work!). If you need an unzipper, try 7-Zip. Then click on run_local.bat in the root folder. (Or simply javaw Herd. Being native Java code, it should also be fine on Linux and Mac, but I haven't specifically tested.

The User Interface

It's really easy. You click the up and down arrows vary the reproductive number, and the percentage vaccination, then you click the big button to run the simulation. Then you wait and watch in awe and wonder as the simulation runs and presents you its results. At the end, you'll see a graph of all the collected samples for that R0, and the key will highlight which sample was the one you just did. (Afraid in the current standalone version, you can't name your sample, which you can with the android version below. I might fix that one day - then again, it's nice to not really need a keyboard while you're demoing).

Demo mode

If you run run_local_demo.bat (or javaw Herd /DEMO), then it runs in a demo mode, which cycles round non-interactively, collecting data evenly across vaccination coverage and R0 - so if you leave it running overnight, it will collect enough samples to give you good looking best-fit curves for all the graphs. There's no exit button, so you'll have to do ALT+F4 in windows to exit. (Need to test Mac/Linux!)

Managing Data

There's a batch file clear.bat, which will make a directory of the form bkp_yyyymmdd_hhmmss, and copy the current data in it. Then it will replace the data files with the ones found in "bkp_OneSample", which contain just a single point for every graph. NB - at present, these batch files have the working directory hard coded into the file. I'll fix this soon - in the meantime, edit them!

Running with Androids

Usage History

Here are the events where we've used this game.

Previous Events

Credits and Thanks

The Herd Immunity Java code, Android code and Web support was written by Wes Hinsley. The idea, and a lot of later ideas to make it much more exciting, was from Neil Ferguson. Many thanks also to all who demonstrated this in exciting ways at the Centenary event.