(* 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 = { v[t], w[t], x[t], y[t], z[t] }; initialValues = { v[0] == 149.0, w[0] == 1.0, x[0] == 3.0, y[0] == 6.0, z[0] == 0.0 }; rates = { v1, v10, v2, v3, v4, v5, v6, v7, v8, v9 }; rateEquations = { v1 -> lambda, v10 -> q*w[t], v2 -> d*x[t], v3 -> beta*v[t]*x[t], v4 -> a*y[t], v5 -> alpha*w[t]*y[t], v6 -> b*z[t], v7 -> k*y[t], v8 -> u*v[t], v9 -> c*z[t] }; parameters = { a -> 0.33, alpha -> 0.004, b -> 2.0, beta -> 0.004, c -> 2000.0, d -> 0.01, k -> 50.0, lambda -> 2.0, q -> 2.0, u -> 2.0, default -> 1.0 }; assignments = { }; events = { }; speciesAnnotations = { }; reactionAnnotations = { }; units = { {"time" -> "", "metabolite" -> "", "extent" -> ""} }; (* Time evolution *) odes = { v'[t] == 1.0*v7 -1.0*v8, w'[t] == 1.0*v9 -1.0*v10, x'[t] == 1.0*v1 -1.0*v2 -1.0*v3, y'[t] == 1.0*v3 -1.0*v5 -1.0*v4, z'[t] == 1.0*v5 -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]}]