You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+3-27
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3

4
4
5
-
After seeing [this article](https://www.washingtonpost.com/graphics/2020/world/corona-simulator/) in the Washington Post I started wondering how such simulations might be done in Python, and indeed if I could expand upon the idea to make them more realistic and fun to play with.
5
+
After seeing [this article](https://www.washingtonpost.com/graphics/2020/world/corona-simulator/) in the Washington Post I started wondering how such simulations might be done in Python, and indeed if I could expand upon the idea and make it more realistic.
6
6
7
7
For a moment I thought about writing the simualation itself in pure Python, with matplotlib as visualisation tool. However for large interacting populations, required computations scale quickly. Speeding up means reducing the operations to vector and matrix computations, something that can be done extremely efficiently through [NumPy](https://numpy.org/), which uses both a fast backend written in C, as well as makes use of hardware acceleration features like SIMD (single instruction, multiple data), which enables many operations on data arrays in relatively few clock cycles.
8
8
@@ -23,9 +23,6 @@ Aside from that, I've worked with NumPy a lot but felt there was still much to l
23
23
24
24
**For reproducibility of all simulations, numpy's seed has been set to '100' unless otherwise specified**
25
25
26
-
And keep in mind that in no way is there a guarantee that the simulation will be accurate:
27
-

28
-
29
26
## Summary video
30
27
A video highlighting some of the scenarios [can be viewed here](http://www.paulvangent.com/covid/Covid_Compilation_reinfection.mp4)
31
28
@@ -92,7 +89,7 @@ However, if the lock down is lifted and a new case is introduced, a potential de
92
89
<imgalign="center"src="https://github.com/paulvangentcom/python_corona_simulation/blob/master/images/horizontal/lockdown_reinfection.png"alt="image of the simuation">
93
90
</a>
94
91
95
-
In such a situation repeated lock-downs seem inevitable if the infection keeps returning.
92
+
**In such a situation repeated lock-downs seem inevitable if the infection keeps returning.**
96
93
97
94
### Case 'Self-Isolation'
98
95
@@ -127,25 +124,4 @@ This illustrates the interaction between the density of the population (and thus
127
124
128
125
129
126
130
-
## Simulating Health Care Workers
131
-
But this is not the whole story, as healthcare is staffed by healthcare workers. Once the number of cases explodes, healthcare workers suffer from long working hours. This compromises their immune system and leads to more exposure. Once healthcare workers start getting sick, the already overwhelmed healthcare system reduces in capacity, exacerbating the problems.
132
-
133
-
*WORK ONGOING AT THIS POINT*
134
-
135
-
136
-
137
-
# TO-DO
138
-
-[ ] refactor methods away into classes to make codebase less unwieldy
139
-
-[ ] Add CuPy compatibility mode to utilize CUDA (NVidia GPU) for computations
140
-
-[ ] Add NumBa support to speed up simulations without GPU
0 commit comments