(* 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 = { B[t], II[t], T[t], V[t] }; initialValues = { B[0] == 50.0, II[0] == 0.0, T[0] == 560000.0, V[0] == 0.04 }; rates = { v1, v2, v3, v4, v5, v6, v7, v8, v9 }; rateEquations = { v1 -> lambda, v2 -> beta*T[t]*V[t], v3 -> delta*T[t], v4 -> gamma*II[t], v5 -> c*gamma*II[t], v6 -> phi*V[t], v7 -> k*B[t]*V[t], v8 -> a*B[t]*V[t], v9 -> mu*B[t] }; parameters = { a -> 2.22*^-07, beta -> 1*^-07, c -> 4000.0, delta -> 0.0025, gamma -> 0.25, k -> 0.025, lambda -> 1400.0, mu -> 0.0, phi -> 32.0, default -> 1.0 }; assignments = { }; events = { }; speciesAnnotations = { }; reactionAnnotations = { }; units = { {"time" -> "", "metabolite" -> "", "extent" -> ""} }; (* Time evolution *) odes = { B'[t] == 1.0*v8 -1.0*v9, II'[t] == 1.0*v2 -1.0*v4, T'[t] == 1.0*v1 -1.0*v3 -1.0*v2, V'[t] == 1.0*v5 -1.0*v7 -1.0*v6 }; 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]}]