(* 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 = { x[t], y[t], y0[t] }; initialValues = { x[0] == 0.0, y[0] == 0.0, y0[0] == 0.0 }; rates = { R1, R2, R3, R4, R5, R6 }; rateEquations = { R1 -> beta\[LetterSpace]x*compartment*psi, R2 -> alpha\[LetterSpace]x*compartment*x[t], R3 -> alpha\[LetterSpace]xy*compartment*x[t]*y[t], R4 -> beta\[LetterSpace]y*compartment*psi*x[t], R5 -> alpha\[LetterSpace]0*compartment*y0[t], R6 -> alpha\[LetterSpace]y*compartment*y[t] }; parameters = { alpha\[LetterSpace]0 -> 0.1, alpha\[LetterSpace]x -> 0.0, alpha\[LetterSpace]xy -> 3.2, alpha\[LetterSpace]y -> 0.1, beta\[LetterSpace]x -> 0.3, beta\[LetterSpace]y -> 0.4, psi -> 1.0, compartment -> 1.0 }; assignments = { }; events = { }; speciesAnnotations = { }; reactionAnnotations = { }; units = { {"time" -> "", "metabolite" -> "", "extent" -> ""} }; (* Time evolution *) odes = { x'[t] == 1.0*R1 -1.0*R2 -1.0*R3, y'[t] == 1.0*R5 -1.0*R6, y0'[t] == 1.0*R4 -1.0*R5 }; 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]}]