(* 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 = { A[t], I1[t], I2[t], N[t] }; initialValues = { A[0] == 500.0, I1[0] == 2000.0, I2[0] == 3000.0, N[0] == 20000.0 }; rates = { v\[LetterSpace]1, v\[LetterSpace]10, v\[LetterSpace]11, v\[LetterSpace]12, v\[LetterSpace]2, v\[LetterSpace]3, v\[LetterSpace]4, v\[LetterSpace]5, v\[LetterSpace]6, v\[LetterSpace]7, v\[LetterSpace]8, v\[LetterSpace]9 }; rateEquations = { v\[LetterSpace]1 -> Q0, v\[LetterSpace]10 -> d*I2[t], v\[LetterSpace]11 -> alpha*A[t], v\[LetterSpace]12 -> d*A[t], v\[LetterSpace]2 -> d*N[t], v\[LetterSpace]3 -> alpha*A[t], v\[LetterSpace]4 -> (beta1*I1[t]*(-A[t] - I1[t] - I2[t] + N[t]))/N[t], v\[LetterSpace]5 -> (beta3*I1[t]*I2[t])/N[t], v\[LetterSpace]6 -> lambda*I1[t], v\[LetterSpace]7 -> d*I1[t], v\[LetterSpace]8 -> (beta2*I2[t]*(-A[t] - I1[t] - I2[t] + N[t]))/N[t], v\[LetterSpace]9 -> delta*I2[t] }; parameters = { Q0 -> 2000.0, alpha -> 1.0, beta1 -> 0.925, beta2 -> 0.365, beta3 -> 1.15, d -> 0.02, delta -> 0.2, lambda -> 0.3, EXT -> 1.0, default -> 1.0 }; assignments = { }; events = { }; speciesAnnotations = { }; reactionAnnotations = { }; units = { {"time" -> "", "metabolite" -> "", "extent" -> ""} }; (* Time evolution *) odes = { A'[t] == 1.0*v\[LetterSpace]9 -1.0*v\[LetterSpace]12 -1.0*v\[LetterSpace]11, I1'[t] == 1.0*v\[LetterSpace]4 -1.0*v\[LetterSpace]5 -1.0*v\[LetterSpace]6 -1.0*v\[LetterSpace]7, I2'[t] == 1.0*v\[LetterSpace]5 +1.0*v\[LetterSpace]8 -1.0*v\[LetterSpace]10 -1.0*v\[LetterSpace]9, N'[t] == 1.0*v\[LetterSpace]1 -1.0*v\[LetterSpace]2 -1.0*v\[LetterSpace]3 }; 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]}]