The Wolfram Emerging Leaders Program is a 4 month long project based program designed for gifted high school students to take a deep dive into a topic of their choice. Students work remotely in small groups to take their project from ideation to completion, with the guidance of Wolfram experts. Wolfram Emerging Leaders Program participants are selected from the Wolfram High School Summer Camp, which is open to talented, STEM oriented students age 17 and under.

Authors

Brian. J. LuValle
Drake Hayes
Mohammad Alhudaithi
Aniruddh Sriram

Abstract

In this paper, a model of several diseases will be composed based off of totalistic cellular automata. This model will be applied on a global scale to represent the spread of pandemics. The model is designed to account for individual disease traits such as methods of infection, mutation rates, and vaccines. The trials consist of evaluating the model based upon the real life initial conditions of the disease and comparing the dead, infected, susceptible, and recovered in the model to that of an SIR-model.

Introduction

According to the World Health Organization, over seventeen million people a year die from infectious diseases. The goal of epidemiology is to prevent the spread of diseases in populations and subsequent death of these people. The goal of epidemiology is not easily achievable. It requires not only dedicated, hardworking personnel working around the clock, but also data, lots of data. Epidemiologists, in dealing with diseases, must determine how they start, how quickly they’re spreading, how they’re being transmitted from one person to the next, and how best to counteract them. As the amount of data existing on a disease increases, the easier the epidemiologist’s job becomes. Epidemiologists have concocted a variety of methods for collecting data on diseases. One method commonly used to determine how diseases spread is the SIR-model. All SIR-models describe the spread of diseases through populations of susceptible (S), infected (I), and recovered (R) individuals. Traditionally, SIR-models are created according to the Kermack-McHendrick model, which is calculus-based. However, there exist a variety of SIR-models that epidemiologists can use to track the spread of diseases. We decided to create a non-deterministic substitution-based SIR-model. We decided to create a non-deterministic substitution-based SIR-model rather than a Kermack-McHendrick calculus-based model because we determined that this model offered a more intuitive representation of how diseases behave when they manifest in a population of people.

Model

In this paper, we utilize cellular automaton to create a local model of disease spread.

Parameters

We use several specialized parameters in our model. There is the initial probability, which reflects the initial probability of getting the virus, and there is the immunity coefficient, which represents the people who are immune to the disease in question. The spread coefficient is representative of the rate of spread of the virus, with there being different spread coefficients for factors such as airborne pathogens and water-born pathogens. The sickness period represents the amount of days a person is likely to remain sick for, and the vaccine constant accounts for the spread of vaccines due to the wealth of a nation. The parameters we describe here are not only representative of the standard disease model parameters, but also other parameters specific to our model.
Set the country and the population in thousands
In[]:=
n={"Tunisia",2000};
Set the initial probability of someone having the disease
In[]:=
initialprobability=0.25;
Generate the initial cells
In[]:=
matrix=Table[RandomChoice[{1-initialprobability,initialprobability}{0,1}],n[[2]]];
Set the sickness period to zero
In[]:=
countdata=Table[0,n[[2]]];
Set the proportion of people immune to the disease
In[]:=
immunitycoefficient=0.25;
Set the spread of vaccines due to the wealth of a nation
In[]:=
vaccinecoeficcient=0.0;
Define how fast a disease spreads
In[]:=
spreadcoefficient=2;
Define how long a person stays sick
In[]:=
sicknessperiod=13;
Define how likely someone is to die from this disease
In[]:=
deathprobability=1/1001;
Define the effectiveness of the vaccine
In[]:=
vaccineconstant=1/(2*4.759416917022368`);
Compute who is immune based on immunity coefficient, vaccine constant, and the GDP per capita of the nation, using regression of the log of the GDP
In[]:=
immunity=Table[RandomChoice[{immunitycoefficient+Log[10,CountryData[ToString[n[[1]]],"GDPPerCapita"][[1]]]*vaccineconstant,1-(immunitycoefficient+Log[10,CountryData[ToString[n[[1]]],"GDPPerCapita"][[1]]]*vaccineconstant)}{True,False}],Length[matrix]];
Define the average time period in days for a mutation to occur
In[]:=
mutationrate=7;
Set the initial mutation day counter
In[]:=
mutationperiod=0;
Set the number of steps the system evaluates
In[]:=
time=100;

Disease Model

In this model, we determine the spread of disease using a non-deterministic cellular automata, rather than a set of differential equations.

Process Description for 1 iteration

Firstly, for the non-deterministic cellular automata, we created a counter to express the period of sickness.
In[]:=
countdata=countdata+matrix;
Secondly, we take the neighborhoods of the cells. The reason for the triple matrices is the boundary conditions are cyclical.
In[]:=
neighbors=Table[Table[Flatten[{matrix,matrix,matrix},1][[Length[matrix]+r+n]],{n,Flatten[{Table[-1*g,{g,spreadcoefficient}],Table[1*g,{g,spreadcoefficient}]}]}],{r,Length[matrix]}];
The matrix describes the current list of ON and OFF values, with ON being sick and OFF not sick. We determine the value of a cell using the total value of the neighbors.
In[]:=
matrix=Table[If[immunity[[cell]]False,RandomChoice[{Total[neighbors[[cell]]/."dead"0]/Length[neighbors[[cell]]],1-(Total[neighbors[[cell]]/."dead"0]/Length[neighbors[[cell]]])}{1,0}],0],{cell,Length[matrix]}];
Compute the cells currently infected
ArrayPlot[{matrix},ImageSizeFull]
Out[]=
In this section, we cover the probability of death from the disease and a system for managing immunity to the disease in the future.
In[]:=
Table[If[matrix[[r]]+countdata[[r]]≥sicknessperiod,If[RandomChoice[{deathprobability,1-deathprobability}{True,False}],{matrix=ReplacePart[matrix,r->"dead"],immunity=ReplacePart[immunity,rTrue]},{matrix=ReplacePart[matrix,r0],immunity=ReplacePart[immunity,rTrue]}]],{r,Length[matrix+countdata]}];
If the disease has had enough time for a mutation, the immunity list will be re-updated.
In[]:=
If[mutationperiod<mutationrate,{},{immunity=Table[False,Length[matrix]],mutationperiod=0}];
The mutation period increases after each step.
In[]:=
mutationperiod=mutationperiod+1;

Visualization methods

We present visualization methods of the local model in this section. A neighbor-based array plot representing the disease spreading through the members of the community can be seen below. The x-axis represents people in space, and the y-axis represents time flowing from the initial conditions (top) to the final conditions (bottom.)
In[]:=
data=Block[{clist={},mutationperiod=0},​​{Table[{​​countdata=countdata+matrix;​​neighbors=Table[Table[Flatten[{matrix,matrix,matrix},1][[Length[matrix]+r+n]],{n,Flatten[{Table[-1*g,{g,spreadcoefficient}],Table[1*g,{g,spreadcoefficient}]}]}],{r,Length[matrix]}];​​matrix=Table[If[immunity[[cell]]False,RandomChoice[{Total[neighbors[[cell]]/."dead"0]/Length[neighbors[[cell]]],1-(Total[neighbors[[cell]]/."dead"0]/Length[neighbors[[cell]]])}{1,0}],0],{cell,Length[matrix]}];Table[If[matrix[[r]]+countdata[[r]]≥sicknessperiod,If[RandomChoice[{deathprobability,1-deathprobability}{True,False}],{matrix=ReplacePart[matrix,r->"dead"],immunity=ReplacePart[immunity,rTrue]},{matrix=ReplacePart[matrix,r0],immunity=ReplacePart[immunity,rTrue]}]],{r,Length[matrix+countdata]}];​​If[mutationperiod<mutationrate,{},{immunity=Table[False,Length[matrix]],mutationperiod=0}],​​mutationperiod=mutationperiod+1;(*whenyougetbackaddmutationperiodtoallpartsinvolvingimmunityandinfectionprobability*)​​AppendTo[clist,matrix]},time],clist}[[-1]]];
ArrayPlot[data,ImageSizeFull]
Out[]=
For a global deterministic model, this visualization method would be useful for visualizing regions that have the highest probability of being infected and locations of spread.
Below a view of the aggregated sick population over time can be seen.
And, the actual percentages of the data values are featured below.
We can compare this data to the Infected curve(red) from the SIR-model taken from [9]. The contact number is different from the spread coefficient as the spread coefficient is the number of cells on each side to which the neighborhood extends, meaning that the neighborhood is double the spread coefficient in size.
When the parameters are matched against each other, the data does, indeed, bear similarity to the SIR-model with the disease becoming near extinct by 30 steps.

Applications

Conclusions

Future Work

References

◼
  • [1] “WHO | Press Release.” WHO, https://www.who.int/whr/1996/media_centre/press_release/en/. Accessed 8 Dec. 2019.
  • ◼
  • [2] Pfeifer, Bernhard, et al. “A Cellular Automaton Framework for Infectious Disease Spread Simulation.” The Open Medical Informatics Journal, vol. 2, Apr. 2008, pp. 70–81. PubMed Central, doi:10.2174/1874431100802010070.
  • ◼
  • [3] Plague Inc. | | Blogs | CDC. https://blogs.cdc.gov/publichealthmatters/2013/04/plague-inc/. Accessed 8 Dec. 2019.
  • ◼
  • [4] Modeling a Pandemic like Ebola with the Wolfram Language—Wolfram Blog. https://blog.wolfram.com/2014/11/04/modeling-a-pandemic-like-ebola-with-the-wolfram-language/. Accessed 8 Dec. 2019.
  • ◼
  • [5] Weisstein, Eric W. Kermack-McKendrick Model. http://mathworld.wolfram.com/Kermack-McKendrickModel.html. Accessed 8 Dec. 2019.
  • ◼
  • [6] Smailhodzic, Armin. “Adapting the Standard SIR Disease Model in Order to Track and Predict the Spreading of the EBOLA Virus Using Twitter Data.” Western Kentucky University, https://pdfs.semanticscholar.org/873f/fc6999742baf8461d834134e39d53a35cd39.pdf. Accessed 8 Dec. 2019.
  • ◼
  • [7] Knipl, Diána and Gergely Röst. “Influenza models with Wolfram Mathematica.” Bolyai Institute
  • ◼
  • [8] University of Szeged, http://www.math.u-szeged.hu/~rost/papers/Rost2011ebookKnipl.pdf. Accessed 8 Dec. 2019.
  • ◼
  • [9] Strain, Steve. “SIR Epidemic Dynamics.” Wolfram Demonstrations Project, https://demonstrations.wolfram.com/SIREpidemicDynamics/. Accessed 8 Dec. 2019.
  • ◼
  • [10] Mansilla, Ricardo and Jose Gutierrez. “Deterministic Site Exchange Cellular Automata Models for the Spread of Diseases in Human Settlements.” Wolfram, https://wpmedia.wolfram.com/uploads/sites/13/2018/02/13-2-3.pdf. Accessed 8 Dec. 2019.