(* Generated by JWS Online *) (* This is an experimental feature of JWS Online. Please report any mistakes.*) (* Note that the following notable SBML entities or features are not supported in notebook outputyet: *) (* Events *) (* Constraints *) (* Units and UnitDefinitions *) (* AlgebraicRules *) (* conversionFactors *) variables = { Coronadeadnontested[t], Coronadeadtested[t], infectednontested[t], infectedtested[t], noncoronadead[t], recoverednontested[t], recoveredtested[t], symptomsnontested[t], symptomstested[t], uninfectednontested[t], uninfectedtested[t] }; initialValues = { Coronadeadnontested[0] == 0.0, Coronadeadtested[0] == 0.0, infectednontested[0] == 2.0, infectedtested[0] == 1.0, noncoronadead[0] == 0.0, recoverednontested[0] == 0.0, recoveredtested[0] == 0.0, symptomsnontested[0] == 0.0, symptomstested[0] == 0.0, uninfectednontested[0] == 630000.0, uninfectedtested[0] == 0.0 }; rates = { re1, re10, re11, re12, re13, re14, re15, re16, re17, re18, re2, re3, re4, re5, re6, re7, re8, re9 }; rateEquations = { 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] }; parameters = { Birthrate -> 3.29*^-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.29*^-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 }; assignments = { populationgrowth[S_,T_,k_] -> k*S*T, 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] }; events = { }; speciesAnnotations = { }; reactionAnnotations = { }; units = { {"time" -> "", "metabolite" -> "", "extent" -> ""} }; (* Time evolution *) odes = { Coronadeadnontested'[t] == 1.0*re16 +1.0*re18 , Coronadeadtested'[t] == 1.0*re15 +1.0*re8 , infectednontested'[t] == 1.0*re1 +1.0*re3 -1.0*re16 -1.0*re4 -1.0*re5, infectedtested'[t] == 1.0*re4 -1.0*re15 -1.0*re6, noncoronadead'[t] == 1.0*re12 +1.0*re13 +1.0*re14 +1.0*re17 , recoverednontested'[t] == 1.0*re10 -1.0*re14, recoveredtested'[t] == 1.0*re9 -1.0*re13, symptomsnontested'[t] == 1.0*re5 -1.0*re10 -1.0*re18 -1.0*re7, symptomstested'[t] == 1.0*re6 +1.0*re7 -1.0*re8 -1.0*re9, uninfectednontested'[t] == 1.0*re11 -1.0*re1 -1.0*re12 -1.0*re2, uninfectedtested'[t] == 1.0*re2 -1.0*re17 -1.0*re3 }; timeCourse = NDSolve[Join[odes, initialValues]//.rateEquations//.assignments//.parameters, variables, {t, 0, 100}]; (* Steady-state solution initialized with result of time evolution *) findRootEquations = odes /.D[_[t],t]->0; findRootVariables = Partition[Flatten[{#, #/.timeCourse/.t->100} &/@variables],2]; steadyStateVariables = FindRoot[findRootEquations//.rateEquations//.assignments//.parameters, findRootVariables, MaxIterations->100] fluxes = #//.assignments//.parameters/.steadyStateVariables&/@rateEquations (* Plot the time evolution of the variables *) plotTable=Table[Plot[variables[[i]]/.parameters/.timeCourse,{t,0,100},PlotLegends->variables[[i]],PlotRange->Full],{i,Length[variables]}]