(* 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 = { I1[t], I2[t], S[t] }; initialValues = { I1[0] == 50.0, I2[0] == 0.0, S[0] == 4950.0 }; rates = { v\[LetterSpace]1, v\[LetterSpace]2, v\[LetterSpace]3, v\[LetterSpace]4, v\[LetterSpace]5, v\[LetterSpace]6, v\[LetterSpace]7, v\[LetterSpace]8 }; rateEquations = { v\[LetterSpace]1 -> b*(I1[t] + I2[t] + S[t]), v\[LetterSpace]2 -> (Beta*c*(I1[t] + a*I2[t])*S[t])/(I1[t] + I2[t] + S[t]), v\[LetterSpace]3 -> d*S[t], v\[LetterSpace]4 -> d*I1[t], v\[LetterSpace]5 -> k1*I1[t], v\[LetterSpace]6 -> Alpha*I2[t], v\[LetterSpace]7 -> d*I2[t], v\[LetterSpace]8 -> k2*I2[t] }; parameters = { Alpha -> 0.2, Beta -> 0.5, a -> 0.6, b -> 0.001, c -> 0.3, d -> 0.0006, k1 -> 0.019, k2 -> 0.0159, EXT -> 1.0, default -> 1.0 }; assignments = { N -> I1[t] + I2[t] + S[t] }; events = { }; speciesAnnotations = { }; reactionAnnotations = { }; units = { {"time" -> "", "metabolite" -> "", "extent" -> ""} }; (* Time evolution *) odes = { I1'[t] == 1.0*v\[LetterSpace]6 +1.0*v\[LetterSpace]2 -1.0*v\[LetterSpace]5 -1.0*v\[LetterSpace]4, I2'[t] == 1.0*v\[LetterSpace]5 -1.0*v\[LetterSpace]6 -1.0*v\[LetterSpace]7 -1.0*v\[LetterSpace]8, S'[t] == 1.0*v\[LetterSpace]1 -1.0*v\[LetterSpace]3 -1.0*v\[LetterSpace]2 }; 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]}]