βWhy not rekindle the epidemic,β the thought came suddenly. Work from home with the right organization can be more effective than office work, as a result of which there is an honest extra time to βthinkβ about something else.
It all began, of course, from building a daily visualization of data on COVID-19 from the European Center for Disease Control. A simple algorithm draws graphs on updated data daily at noon. The charts draw attention to China's effective anti-epidemic actions when the epidemic began to decline in early March. But the countries of Europe pick up the baton - first Italy (can you remember how in late February the Milan authorities asked tourists to return to the city, because the economy is suffering?), Then Spain.

β , , -, . 30 β , , , ? ? .
ββ COVID-19 β - . , (!) . . . ? β !
- β . β . β . , β . . 3 :
, , β , . . ? , β β β caseIssuedDate ( β ). , β β β severity . ββ .
: - = 1 .
:
epidemy = [[0, None, 'infected', 'mild', None, False]]
*, \ βresultβ . βrecoveredβ βdeadβ.
β , β¦
β . , ( ββ, , ). , β .
β , ββ. , 0.1 (10%) 1 10 . 100 10 , 100 10 0.1 = 100 . , : , . () :
['infectDate', 'endOfCaseDate', 'result', 'severity', 'caseDocumentedDate', 'isolated' ]
, , ( β !) .
β , , . ? , . : , , , β deathRate.
- ::
dailyTransmissionContacts = 15
contagiousness = 0.01
severityRate = 0.3
deathRate = 0.5
caseDuration = 25
closedPopulation = 10000
periodToDocumented = caseDuration * 0.6
mildDocumentedRate = 0.3
severeDocumentedRate = 0.9
isolationQualityRate = 0.1
showDays = 150
(. ) :
periodToIssued β , ,
mildDocmentedRate β 30%
severeDocumentedRate = 90%
isolationQualityRate β () . 100%
? , β β¦ , , , , . β . . , COVID-19. β .
. :
β ββ ββ ββ
, ββ β
.2
susceptibleToday = (closedPopulation - infectedCountToday - recoveredCountToday)
newAffectedPeopleCount = int(((activeInfectedCountToday * dailyTransmissionContacts * contagiousness) // 1 * susceptibleToday/closedPopulation + 1))
* β ββ . . ( ) .
.
.
, pandas.
10 . : 0 (.. ) 100%, ββ .
6 . 120 ( ) ( ) β , .
totalAffected: 10000 deathsTotal: 1582 deathRate_real = 15%

( ). 10 , ,

. , . , COVID-19, β 5-7 . , , β

caseDuration :

: , , .
:
. caseIssuedDate β . ββ . : β , β. , , - .
: β, , . > ?β
: β , ...
: , , β . 2 : mildDocumentedRate severDocumentedRate β ( ) . : 7-9 10 , , . , . , , , , , . ? , . , .
mildIDocumentedRate = 0.3
severeDocumentedRate = 0.9

, . , : 150 50 β , , .. .
, .
, .. , . , . () .
( β β )
totalAffected: 10000 deathsTotal: 1582 deathRate_real = 15%
DocumentedTotal: 4789 deathsDocumented: 1406 deathRate_docum = 29%
. .
() : ββ . β , .
periodToDocumented β . , ββ , , . , β , β , , .

periodToDocumented. mildDocumentedRate = 0.3 (30% ). ββ , , .
: β , .

, [20:30] .
, , β .
:
.
. , , , .

(0 β , 1 β ).
, β , β β . , .
( ) .
, , . . , . ( 0.7) periodToDocumented.
, periodToDocumented ( ) 60% , .. 25 * 0.6 = 15 . 10, 7, 4

, , β ββ , , , , . , .
:
totalAffected: 10000 deathsTotal: 1486 deathRate_real = 14%
totalAffected: 10000 deathsTotal: 1556 deathRate_real = 15%
totalAffected: 10000 deathsTotal: 1439 deathRate_real = 14%
totalAffected: 8466 deathsTotal: 1248 deathRate_real = 14%
β β . 2 :
dailyTransmissionContacts = 15
contagiousness = 0.01
β β . .

totalAffected: 10000 deathsTotal: 1557 deathRate_real = 15%
totalAffected: 7727 deathsTotal: 1173 deathRate_real = 15%
totalAffected: 4597 deathsTotal: 709 deathRate_real = 15%
totalAffected: 2008 deathsTotal: 299 deathRate_real = 14%
. 5 . , β β. β .
, .
. : 60 80, .

, , ββ , , β β
totalAffected: 10000 deathsTotal: 1557 deathRate_real = 15%
totalAffected: 4597 deathsTotal: 709 deathRate_real = 15%
totalAffected: 10000 deathsTotal: 1434 deathRate_real = 14%
, ββ , . , , , , / (, , ). β β β . , . , , β , ( , , , , , β , β ).
. ! , , .
: epidemy (βrecoveredβ).


totalAffected: 7890 deathsTotal: 1162 deathRate_real = 11%
totalAffected: 10000 deathsTotal: 1557 deathRate_real = 15%
5 20 ( ) 30% β .
, . :
- , «». . .
- . (, , , ) , , .
- , ( β β).
β β , .
β β ββ . , , , β . ββ β β .
Different methods of suppression can significantly differ in effect: the tested methods of βself-isolationβ and even βearly detectionβ did not show the expected positive results with model parameters close to COVID19. At the same time, any measure of suppression to one degree or another βsmoothes outβ the peak of the epidemic, which can positively affect the work of the healthcare system in the context of the epidemic.
The most effective measure was quarantine. Timely and sufficient quarantine can not only βstretchβ the course of the epidemic, reducing the burden on the healthcare system, but also at times reduce both the number of cases and mortality.
Laptop on google colab link