Initial conditions

Load packages

using ModelingToolkit
using OrdinaryDiffEq, SteadyStateDiffEq
using Plots
using CaMKIIModel
Plots.default(lw=2)
@time "Build system" @mtkcompile sys = build_neonatal_ecc_sys()
@time "Build problem" prob = SteadyStateProblem(sys, [])
@time "Solve problem" sol = solve(prob, DynamicSS(KenCarp47()); abstol=1e-10, reltol=1e-10)
for (k, v) in zip(unknowns(sys), sol.u)
    println(k, " => ", v, ",")
end
Build system: 0.060889 seconds (512.17 k allocations: 42.515 MiB, 27.88% gc time)
Build problem: 2.045262 seconds (5.64 M allocations: 387.439 MiB, 0.90% gc time, 95.50% compilation time: <1% of which was recompilation)
Solve problem: 1.870372 seconds (7.87 M allocations: 553.570 MiB, 4.47% gc time, 98.18% compilation time)
CaNSR(t) => 757.9282719798523,
CaJSR(t) => 757.7647261778033,
PO1RyR(t) => 0.0009535262980435236,
i_y(t) => 0.14578712533948868,
i_IK(t) => 0.0005627030675563281,
i_OK(t) => 0.0017680893488160828,
i_CK2(t) => 0.001954596545179075,
i_CK1(t) => 0.003025385012998315,
i_nKs(t) => 0.002312264613627793,
i_sslow(t) => 0.9995209550171349,
i_s(t) => 0.9995209407091709,
i_r(t) => 0.007692810082349908,
i_Naj(t) => 0.4556444467635217,
i_Nah(t) => 0.31774917116856194,
i_Nam(t) => 0.02591394928521665,
i_g(t) => 0.5604638724060351,
i_b(t) => 0.003899538258536441,
i_fca(t) => 1.0034737027498821,
i_f(t) => 0.9997191637694156,
i_d(t) => 0.0003984471095625774,
CaMKOX(t) => 0.0,
CaMKAOX(t) => 0.0,
CaMKA2(t) => 0.00044210832197519247,
CaMKA(t) => 0.0017683191137378817,
CaMKPOX(t) => 0.0,
CaMKP(t) => 0.0008841325364513131,
CaMKBOX(t) => 0.0,
CaMKB(t) => 0.007981971959164565,
(Cai(t))[43] => 0.12243057529727366,
(Cai(t))[42] => 0.12243057614908173,
(Cai(t))[41] => 0.12243057700811297,
(Cai(t))[40] => 0.12243057787467927,
(Cai(t))[39] => 0.12243057874910515,
(Cai(t))[38] => 0.12243057963172829,
(Cai(t))[37] => 0.12243058052290037,
(Cai(t))[36] => 0.1224305814229877,
(Cai(t))[35] => 0.12243058233237201,
(Cai(t))[34] => 0.12243058325145134,
(Cai(t))[33] => 0.12243058418064073,
(Cai(t))[32] => 0.12243058512037339,
(Cai(t))[31] => 0.1224305860711015,
(Cai(t))[30] => 0.12243058703329737,
(Cai(t))[29] => 0.12243058800745456,
(Cai(t))[28] => 0.12243058899408904,
(Cai(t))[27] => 0.12243058999374053,
(Cai(t))[26] => 0.12243059100697382,
(Cai(t))[25] => 0.12243059203438028,
(Cai(t))[24] => 0.12243059307657951,
(Cai(t))[23] => 0.12243059413422089,
(Cai(t))[22] => 0.12243059520798556,
(Cai(t))[21] => 0.12243059629858825,
(Cai(t))[20] => 0.12243059740677943,
(Cai(t))[19] => 0.12243059853334758,
(Cai(t))[18] => 0.12243059967912162,
(Cai(t))[17] => 0.12243060084497356,
(Cai(t))[16] => 0.12243060203182131,
(Cai(t))[15] => 0.12243060324063165,
(Cai(t))[14] => 0.12243060447242371,
(Cai(t))[13] => 0.12243060572827245,
(Cai(t))[12] => 0.12243060700931252,
(Cai(t))[11] => 0.12243060831674256,
(Cai(t))[10] => 0.12243060965182961,
(Cai(t))[9] => 0.1224306110159143,
(Cai(t))[8] => 0.122430612410416,
(Cai(t))[7] => 0.12243061383683894,
(Cai(t))[6] => 0.12243061529677836,
(Cai(t))[5] => 0.12243061679192782,
(Cai(t))[4] => 0.12243061832408664,
(Cai(t))[3] => 0.12243061989516843,
(Cai(t))[2] => 0.12243062150721029,
(Cai(t))[44] => 0.12243057445238893,
(Cai(t))[1] => 0.12243062316238285,
k_i(t) => 152559.7117862072,
na_i(t) => 12237.350028672558,
vm(t) => -67.45826829392155,

Disable CaMKA2

Setting the rate towards (k_P1P2) to zero

@time "Build problem" prob2 = remake(prob, p=[sys.k_P1_P2 => 0])
@time "Solve problem" sol2 = solve(prob2, DynamicSS(KenCarp47()); abstol=1e-10, reltol=1e-10)
for (k, v) in zip(unknowns(sys), sol2.u)
    println(k, " => ", v, ",")
end
Build problem: 0.669744 seconds (1.74 M allocations: 108.085 MiB, 3.14% gc time, 92.42% compilation time)
Solve problem: 1.318747 seconds (3.95 M allocations: 275.768 MiB, 1.75% gc time, 97.41% compilation time)
CaNSR(t) => 757.9262733328936,
CaJSR(t) => 757.7627353544477,
PO1RyR(t) => 0.0009534821425372885,
i_y(t) => 0.14578229077766722,
i_IK(t) => 0.0005627319854237013,
i_OK(t) => 0.0017681560641121753,
i_CK2(t) => 0.001954631825976911,
i_CK1(t) => 0.0030254395973431463,
i_nKs(t) => 0.0023123447977700874,
i_sslow(t) => 0.9995209294809742,
i_s(t) => 0.999520915556806,
i_r(t) => 0.0076929372871044135,
i_Naj(t) => 0.4556317501373551,
i_Nah(t) => 0.3177366801969067,
i_Nam(t) => 0.02591491301301442,
i_g(t) => 0.5604538737214194,
i_b(t) => 0.0038997132163658774,
i_fca(t) => 1.0034737397532167,
i_f(t) => 0.9997191511020308,
i_d(t) => 0.00039846057995106385,
CaMKOX(t) => 0.0,
CaMKAOX(t) => 0.0,
CaMKA2(t) => 0.0,
CaMKA(t) => 0.0016801061442758176,
CaMKPOX(t) => 0.0,
CaMKP(t) => 0.000840034204472759,
CaMKBOX(t) => 0.0,
CaMKB(t) => 0.007991447816837536,
(Cai(t))[43] => 0.12242987122094719,
(Cai(t))[42] => 0.12242987204980343,
(Cai(t))[41] => 0.12242987288568849,
(Cai(t))[40] => 0.12242987372890579,
(Cai(t))[39] => 0.12242987457977113,
(Cai(t))[38] => 0.12242987543861313,
(Cai(t))[37] => 0.12242987630577394,
(Cai(t))[36] => 0.12242987718161007,
(Cai(t))[35] => 0.12242987806649291,
(Cai(t))[34] => 0.12242987896080981,
(Cai(t))[33] => 0.12242987986496465,
(Cai(t))[32] => 0.12242988077937894,
(Cai(t))[31] => 0.12242988170449273,
(Cai(t))[30] => 0.12242988264076558,
(Cai(t))[29] => 0.12242988358867776,
(Cai(t))[28] => 0.12242988454873137,
(Cai(t))[27] => 0.12242988552145154,
(Cai(t))[26] => 0.1224298865073879,
(Cai(t))[25] => 0.12242988750711589,
(Cai(t))[24] => 0.1224298885212384,
(Cai(t))[23] => 0.12242988955038736,
(Cai(t))[22] => 0.12242989059522552,
(Cai(t))[21] => 0.12242989165644837,
(Cai(t))[20] => 0.12242989273478619,
(Cai(t))[19] => 0.12242989383100623,
(Cai(t))[18] => 0.1224298949459151,
(Cai(t))[17] => 0.1224298960803613,
(Cai(t))[16] => 0.12242989723523798,
(Cai(t))[15] => 0.12242989841148597,
(Cai(t))[14] => 0.12242989961009691,
(Cai(t))[13] => 0.12242990083211681,
(Cai(t))[12] => 0.12242990207864982,
(Cai(t))[11] => 0.12242990335086222,
(Cai(t))[10] => 0.12242990464998703,
(Cai(t))[9] => 0.12242990597732868,
(Cai(t))[8] => 0.12242990733426835,
(Cai(t))[7] => 0.12242990872226972,
(Cai(t))[6] => 0.12242991014288516,
(Cai(t))[5] => 0.12242991159776254,
(Cai(t))[4] => 0.12242991308865274,
(Cai(t))[3] => 0.1224299146174179,
(Cai(t))[2] => 0.12242991618604017,
(Cai(t))[44] => 0.12242987039882793,
(Cai(t))[1] => 0.12242991779663179,
k_i(t) => 152559.80395636964,
na_i(t) => 12237.258117724175,
vm(t) => -67.45802478957823,

This notebook was generated using Literate.jl.

Back to top