(* 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 = { E[t], P[t], Q[t], X[t] }; initialValues = { E[0] == 1.0, P[0] == 0.0, Q[0] == 0.0, X[0] == 8.0 }; rates = { r1, r2 }; rateEquations = { r1 -> cell*(-(K2*P[t]) + E[t]*X[t]), r2 -> cell*K3*P[t] }; parameters = { K2 -> 0.0, K3 -> 0.5, cell -> 1.0 }; assignments = { }; events = { }; speciesAnnotations = { Q[t]->"http://identifiers.org/chebi/CHEBI:15377", X[t]->"http://identifiers.org/chebi/CHEBI:16240", X[t]->"http://identifiers.org/kegg.compound/C00027" }; reactionAnnotations = { }; units = { {"time" -> "", "metabolite" -> "", "extent" -> ""} }; (* Time evolution *) odes = { E'[t] == 1.0*r2 -1.0*r1, P'[t] == 1.0*r1 -1.0*r2, Q'[t] == 1.0*r2 , X'[t] == -1.0*r1 }; 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]}]