Flatten the curve (SIR model & social distancing)
With this App, you can get a better idea of how pandemics will spread and how we can "[b]flatten the curve[/b]". [br]This simulation is based on the [b][url=https://en.wikipedia.org/wiki/Compartmental_models_in_epidemiology]SIR model[/url][/b]. Its application isn't limited to any specific disease, but it is actually developed with one disease in mind: [b][url=https://www.who.int/emergencies/diseases/novel-coronavirus-2019]Covid-19[/url][/b].[br][br][b]Caveat: [/b]This app is intended for [b]educational purposes only[/b], not for serious prediction. (If you think why, please read [url=https://medium.com/data-for-science/epidemic-modeling-101-or-why-your-covid19-exponential-fits-are-wrong-97aa50c55f8]this[/url]).
The manipulation of this app is pretty simple and intuitive.[br]You can play with any item on the screen right now.[br][br](But please be aware of one thing: As it is a bit [b]computation-heavy[/b], it might take several seconds to respond to your input depending on the performance of your PC.)[br][br]The following list shows you how to do the typical tasks with this app:[br][br][list][*]Choose a country[/*][*]Zoom in[/*][*]Modify disease parameters[/*][*]Simulate social distancing[/*][*]Modify initial parameters[/*][/list][br][b]The order of the list is not important[/b]. You can jump to any of the tasks you want.
[size=100][b][size=150]Choose a country[/size][/b]:[/size][br][br]You can choose a country from the "Country" dropdown menu on top of the screen.
Then all the initial parameter on the right are set and [url=https://en.wikipedia.org/wiki/Epidemic_curve][b]epi curves[/b][/url] are drawn based on the parameters automatically.[br][br]The X-axis indicates how many days it goes and the Y-axis indicates the number of each type of case (the red curve for the infected cases and the purple curve for the critical cases).[br][br][b]Note:[/b] The initial parameters were taken from each country experiencing the Covid-19 pandemic as of 3/29[br]/2020. The main data source is [url=https://www.worldometers.info/coronavirus/]this site[/url].
[b][size=100][size=150]Zoom In:[/size][/size][/b][br][br]By clicking the "Zoom to Total" button, you can zoom to the red curve indicating the total cases.
You can also zoom in more to see the purple curve indicating the critical cases only.
You can also zoom to the horizontal blue line indicating the number of ICU beds by clicking the blue line itself.
[b][size=150]Modify disease parameters:[/size][/b][br][br]The two sliders on the bottom right of the screen denote disease-specific parameters, which indicate how the disease will spread and subside.[br]Based on the SIR model, the behavior of the pandemic is determined by only two parameters: [math]\beta[/math] and [math]\gamma[/math].[br][math]\beta[/math] determines how quickly the disease will spread. More precisely, how many people an infected person will transmit the disease per day on average. [br][math]\gamma[/math] determines how quickly the disease will subside. More precisely, how many people will recover from the disease per day on average.[br][math]\beta\div\gamma[/math] is equal to the so-called [b][url=https://en.wikipedia.org/wiki/Basic_reproduction_number]basic reproduction number[/url][/b] ([math]R_0[/math]) of the disease, theoretically.[br][br]For example, if you increase [math]\beta_0[/math] from 0.4 to 0.6, the disease will spread more quickly and the epi curve will become like this:
[b][size=150]Simulate Social Distancing:[/size][/b][br][br]In the SIR model, [url=https://en.wikipedia.org/wiki/Social_distancing][b]social distancing[/b][/url] means reducing the [math]\beta[/math] mentioned above.[br]You can simulate social distancing by directly dragging down the four blue triangles SD0...SD3 on the bottom of the screen.[br]For example:
Thanks to the social distancing, the epi curve is a little flattened.[br]You can also see the green curve on the bottom of the screen is also bent downward.[br]This green curve shows the actual [math]\beta[/math] value on the course of the simulation. [br]The blue curve (SD) shows how effective the social distancing is, and each Y value of the green curve is multiplied by each Y value of the blue curve.[br]For example, the value of SD after 30 days is about 0.7, and [math]\beta[/math] turns from 0.4 to [math]0.4\times0.7\cong0.28[/math].[br][br]One of the goals of social distancing is [b]to prevent health care systems from being overwhelmed[/b].[br]So, for example, you can try to reduce the number of critical cases and to prevent it from exceeding the number of ICU beds, like this:
[size=150][b]Modify initial parameters:[br][/b][/size][br]You can also modify the initial parameters individually instead of selecting a country and loading all the parameters at once.[br]For example, if you think there must be more critical cases, you can modify the "Critical Case Rate" from 0.04 to 0.4, like this:
The SIR model used in this simulation is expressed by the following set of ordinary differential equations:[br][br][math]\frac{dS}{dt}=-\frac{\beta IS}{N}[/math][br][math]\frac{dI}{dt}=\frac{\beta IS}{N}-\gamma I[/math][br][math]\frac{dR}{dt}=\gamma I[/math][br][br]where:[br][br]S: susceptible population[br]I: infected population[br]R: recovered population[br][br][math]N=S+I+R[/math][br][math]\beta\left(t\right)=\beta_0\cdot SD\left(t\right)[/math][br][math]\gamma\left(t\right)=\gamma_0[/math][br][br]These equations are solved numerically by using [url=https://wiki.geogebra.org/en/NSolveODE_Command]NSolveODE()[/url] command of GeoGebra.[br][br]SD(t) represents "social distancing" measures and can be any function of t, but in this app, it is determined by interpolating SD0...SD3 using [url=https://wiki.geogebra.org/en/Polynomial_Command?lang=ja]Polynomial()[/url] command of GeoGebra:[br][br][math]SD\left(t\right)=Polynomial\left(SD_0,SD_1,SD_2,SD_3\right)[/math]
As mentioned above, [math]\beta_0\div\gamma_0[/math] is equal to the basic reproduction number ([math]R_0[/math]) of the disease, theoretically. [br]And researchers have been trying to estimate [math]R_0[/math] of Covid-19 in the literature and many studies estimated it to be between 2 and 3. So this app adopts [math]R_0=2[/math] as an initial value.