(* 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 = { N1[t], N2[t], S[t] }; initialValues = { N1[0] == 100.0, N2[0] == 0.0, S[0] == 0.111111111111111 }; rates = { r1, r2, r3, r4, r5 }; rateEquations = { r1 -> v, r2 -> (N1[t]*S[t])/(1 + S[t]), r3 -> (20*N2[t]*S[t])/(1 + S[t]), r4 -> d*N1[t], r5 -> d*N2[t] }; parameters = { d -> 1.0, v -> 10.0, compartment -> 1.0 }; assignments = { }; events = { }; speciesAnnotations = { }; reactionAnnotations = { }; units = { {"time" -> "", "metabolite" -> "", "extent" -> ""} }; (* Time evolution *) odes = { N1'[t] == 10.0*r2 -1.0*r4, N2'[t] == 1.0*r3 -1.0*r5, S'[t] == 1.0*r1 -1.0*r2 -1.0*r3 }; 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]}]