(* 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 = { c1[t], c2[t], c3[t], i[t], o[t] }; initialValues = { c1[0] == 0.0, c2[0] == 0.0, c3[0] == 1.0, i[0] == 0.0, o[0] == 0.06 }; rates = { reaction0000001, reaction0000002, reaction0000003, reaction0000004, reaction0000005 }; rateEquations = { reaction0000001 -> cell*(-(b*c2[t]) + a*c3[t]), reaction0000002 -> cell*(-(bin*c1[t]) + ain*c2[t]), reaction0000003 -> cell*(aa*c1[t] - bb*o[t]), reaction0000004 -> cell*(-(ai*i[t]) + bi*o[t]), reaction0000005 -> cell*(aa*c1[t] - u*i[t]) }; parameters = { F -> 96.485, R -> 8.314, Temp -> 310.0, ain -> 2.172, bin -> 1.077, ki -> 140.0, ko -> 5.4, vhold -> -40.0, vtest -> 0.0, cell -> 1.0 }; assignments = { aa -> 0.0655*E^(0.05547153*(-36 + v)), ik -> Gk*(v - vk)*o[t], a -> 0.0555*E^(0.05547153*(-12 + v)), b -> 0.002357/E^(0.036588*v), Gk -> 0.0135*ko^0.59, bi -> 1.03007202707417*E^(0.000942*v)*(ko^(-1))^0.3, u -> (ai*bb)/bi, bb -> 0.0029357/E^(0.02158*v), vk -> (R*Temp*Log[ko/ki])/F, ai -> 1.9755/(E^(0.02352*(25 + v))*ko), v -> Piecewise[{{vtest, 50 < t && t <= 300}}, vhold] }; events = { }; speciesAnnotations = { }; reactionAnnotations = { }; units = { {"time" -> "", "metabolite" -> "", "extent" -> ""} }; (* Time evolution *) odes = { c1'[t] == 1.0*reaction0000002 -1.0*reaction0000003 -1.0*reaction0000005, c2'[t] == 1.0*reaction0000001 -1.0*reaction0000002, c3'[t] == -1.0*reaction0000001, i'[t] == 1.0*reaction0000005 +1.0*reaction0000004 , o'[t] == 1.0*reaction0000003 -1.0*reaction0000004 }; 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]}]