begin name westerhoff1 end name begin reactions re1 {1.0}uninfectednontested = {1.0}infectednontested re10 {1.0}symptomsnontested = {1.0}recoverednontested re11 {1.0}$s = {1.0}uninfectednontested re12 {1.0}uninfectednontested = {1.0}noncoronadead re13 {1.0}recoveredtested = {1.0}noncoronadead re14 {1.0}recoverednontested = {1.0}noncoronadead re15 {1.0}infectedtested = {1.0}Coronadeadtested re16 {1.0}infectednontested = {1.0}Coronadeadnontested re17 {1.0}uninfectedtested = {1.0}noncoronadead re18 {1.0}symptomsnontested = {1.0}Coronadeadnontested re2 {1.0}uninfectednontested = {1.0}uninfectedtested re3 {1.0}uninfectedtested = {1.0}infectednontested re4 {1.0}infectednontested = {1.0}infectedtested re5 {1.0}infectednontested = {1.0}symptomsnontested re6 {1.0}infectedtested = {1.0}symptomstested re7 {1.0}symptomsnontested = {1.0}symptomstested re8 {1.0}symptomstested = {1.0}Coronadeadtested re9 {1.0}symptomstested = {1.0}recoveredtested end reactions begin rate equations re1 = TotalInfectioncoefficient*uninfectednontested[t] re10 = Coronarecover*symptomsnontested[t] re11 = populationgrowth[s, totalpopulation, Birthrate] re12 = Normaldeath*uninfectednontested[t] re13 = Normaldeath*recoveredtested[t] re14 = Normaldeath*recoverednontested[t] re15 = Coronadeathrateconstant*infectedtested[t] re16 = Coronadeathrateconstant*infectednontested[t] re17 = Normaldeath*uninfectedtested[t] re18 = Coronadeathrateconstant*symptomsnontested[t] re2 = TestingRandome*uninfectednontested[t] re3 = TotalInfectioncoefficient*uninfectedtested[t] re4 = TestingRandome*infectednontested[t] re5 = Symptomsappear*infectednontested[t] re6 = Symptomsappear*infectedtested[t] re7 = TestingforSymptoms*symptomsnontested[t] re8 = Coronadeathrateconstant*symptomstested[t] re9 = Coronarecover*symptomstested[t] end rate equations begin parameters Birthrate = "3.29e-05" Coronadeathrateconstant = 0.002 Coronarecover = 0.067 Infectionfromnontesednosymptoms = 0.508 Infectionfromnontestedsymptoms = 0.25 Infectionfromtestednosymtoms = 0.025 Infectionfromtestedsymptoms = 0.025 ModelValue40 = 534700.0 ModelValue51 = 0.0 Normaldeath = "3.29e-05" SocialDistance = 534700.0 Symptomsappear = 0.30165 TestingRandome = 0.0008 TestingforSymptoms = 500.0 Timegovermentaction = 15.0 adjF = 1.0 epidemicextinguished = 0.0 governmentresponsefactortodiagnosedinfected = 0.0 lockdownduration = 730.0 lockdownpauseduration = 7.0 nlockdowns = 0.0 npauses = 0.0 numbercutoff = 0.0 symptomaticnumbertolerance = 141.0 timefractionlockdown = 0.5 s = 1.0 default = 1.0 end parameters begin initial conditions Coronadeadnontested[0] = Coronadeadnontestedi Coronadeadtested[0] = Coronadeadtestedi infectednontested[0] = infectednontestedi infectedtested[0] = infectedtestedi noncoronadead[0] = noncoronadeadi recoverednontested[0] = recoverednontestedi recoveredtested[0] = recoveredtestedi symptomsnontested[0] = symptomsnontestedi symptomstested[0] = symptomstestedi uninfectednontested[0] = uninfectednontestedi uninfectedtested[0] = uninfectedtestedi end initial conditions begin initial values Coronadeadnontestedi = 0.0 Coronadeadtestedi = 0.0 infectednontestedi = 2.0 infectedtestedi = 1.0 noncoronadeadi = 0.0 recoverednontestedi = 0.0 recoveredtestedi = 0.0 symptomsnontestedi = 0.0 symptomstestedi = 0.0 uninfectednontestedi = 630000.0 uninfectedtestedi = 0.0 end initial values begin assignment rules intermittenttime := -(lockdownduration*nlockdowns) - lockdownpauseduration*nlockdowns + t TotalInfectioncoefficient := ((1 - epidemicextinguished)*(Infectionfromnontesednosymptoms*infectednontested[t] + Infectionfromtestednosymtoms*infectedtested[t] + Infectionfromnontestedsymptoms*symptomsnontested[t] + Infectionfromtestedsymptoms*symptomstested[t]))/SocialDistance Governmentinducedisolation := adjF*(1 + (2.5*governmentresponsefactortodiagnosedinfected*symptomstested[t])/symptomaticnumbertolerance) totalpopulation := infectednontested[t] + infectedtested[t] + recoverednontested[t] + recoveredtested[t] + symptomsnontested[t] + symptomstested[t] + uninfectednontested[t] + uninfectedtested[t] coronadead := (100*(Coronadeadnontested[t] + Coronadeadtested[t]))/totalpopulation coronadeadalldead := (100*coronadead)/(coronadead + noncoronadead[t]) noncoronadeadperc := (100*noncoronadead[t])/totalpopulation coronarecovered := (100*(recoverednontested[t] + recoveredtested[t]))/totalpopulation Coronaregistered := Coronadeadtested[t] + infectedtested[t] + recoveredtested[t] + symptomstested[t] end assignment rules begin function definitions populationgrowth[S_,T_,k_] := k*S*T end function definitions begin events roundoffinfectednott = (infectednontested[t] < 0, {infectednontested[t] -> 0}, 0) roundoffsymptomsnont = (symptomsnontested[t] < 0, {symptomsnontested[t] -> 0}, 0) triggergovernmentact = (intermittenttime > Timegovermentaction, {SocialDistance -> Governmentinducedisolation*ModelValue40}, 0) triggerrepetitiveinc = (intermittenttime > Timegovermentaction, {nlockdowns -> 1 + nlockdowns}, 0) endofepidemic = (infectednontested[t] + infectedtested[t] + symptomsnontested[t] + symptomstested[t] < numbercutoff, {epidemicextinguished -> 1}, 0) triggerrelaxationsoc = (intermittenttime > -(lockdownduration*(1 - timefractionlockdown)) + Timegovermentaction, {SocialDistance -> ModelValue40}, 0) end events begin process annotations end process annotations begin species annotations end species annotations begin units end units