(* 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 = { CD8[t], T[t], T1[t], T2[t], V[t] }; initialValues = { CD8[0] == 1.0, T[0] == 300.0, T1[0] == 0.0, T2[0] == 0.0, V[0] == 10.0 }; rates = { v1, v10, v11, v12, v13, v14, v15, v16, v2, v3, v4, v5, v6, v7, v8, v9 }; rateEquations = { v1 -> s, v10 -> a*(1 - RT)*T1[t], v11 -> delta*T2[t], v12 -> dx*CD8[t]*T2[t], v13 -> delta*Nv*(1 - PI)*T2[t], v14 -> muv*V[t], v15 -> p*T2[t], v16 -> dE*CD8[t], v2 -> mu*T[t], v3 -> r*T[t]*(1 - T[t]/Tmax), v4 -> k*T[t]*V[t], v5 -> b*T1[t], v6 -> a*RT*T1[t], v7 -> mu1*T1[t], v8 -> a*T1[t], v9 -> b*T1[t] }; parameters = { Nv -> 1000.0, PI -> 0.0, RT -> 0.0, Tmax -> 1500.0, a -> 0.4, b -> 0.05, dE -> 0.1, delta -> 0.24, dx -> 0.01, k -> 2.4*^-05, mu -> 0.01, mu1 -> 0.015, muv -> 2.4, p -> 1.02, r -> 0.03, s -> 10.0, default -> 1.0 }; assignments = { }; events = { }; speciesAnnotations = { }; reactionAnnotations = { }; units = { {"time" -> "days", "metabolite" -> "cells/uL", "extent" -> "cells/uL"} }; (* Time evolution *) odes = { CD8'[t] == 1.0*v15 -1.0*v16, T'[t] == 1.0*v1 +1.0*v6 +1.0*v3 +1.0*v5 -1.0*v2 -1.0*v4, T1'[t] == 1.0*v4 -1.0*v5 -1.0*v7 -1.0*v8 -1.0*v9, T2'[t] == 1.0*v10 -1.0*v11 -1.0*v12, V'[t] == 1.0*v13 -1.0*v14 }; 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]}]