(* 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 = { T[t], Tstar[t], Tstarstar[t], Ttot[t], V[t] }; initialValues = { T[0] == 1000.0, Tstar[0] == 0.0, Tstarstar[0] == 0.0, Ttot[0] == 1000.0, V[0] == 0.001 }; rates = { CD4TproductionV, VinfectionCD4T, activationCD4T, clearanceV, deathCD4TactiveInfected, deathCD4Tplain, deathCD4TrestingInfected, growthCD4T, sourceCD4T }; rateEquations = { CD4TproductionV -> muB*N0*Tstarstar[t], VinfectionCD4T -> k1*T[t]*V[t], activationCD4T -> k2*Tstar[t], clearanceV -> muV*V[t], deathCD4TactiveInfected -> muB*Tstarstar[t], deathCD4Tplain -> muT*T[t], deathCD4TrestingInfected -> muT*Tstar[t], growthCD4T -> r*T[t]*(1 - Ttot[t]/Tmax), sourceCD4T -> s }; parameters = { N0 -> 1000.0, Tmax -> 1500.0, k1 -> 2.4*^-05, k2 -> 0.003, muB -> 0.24, muT -> 0.02, muV -> 2.4, r -> 0.03, s -> 10.0, theta -> 1.0, default -> 1.0 }; assignments = { }; events = { }; speciesAnnotations = { }; reactionAnnotations = { }; units = { {"time" -> "day", "metabolite" -> "concentration per microlitre/", "extent" -> "concentration per microlitre/"} }; (* Time evolution *) odes = { T'[t] == 1.0*sourceCD4T +1.0*growthCD4T -1.0*deathCD4Tplain -1.0*VinfectionCD4T, Tstar'[t] == 1.0*VinfectionCD4T -1.0*activationCD4T -1.0*deathCD4TrestingInfected, Tstarstar'[t] == 1.0*activationCD4T -1.0*deathCD4TactiveInfected, Ttot'[t] == 1.0*sourceCD4T +1.0*growthCD4T -1.0*deathCD4Tplain -1.0*deathCD4TrestingInfected -1.0*deathCD4TactiveInfected, V'[t] == 1.0*CD4TproductionV -1.0*VinfectionCD4T -1.0*clearanceV }; 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]}]