Two component pathway
using OrdinaryDiffEq
using Catalyst
using Plots
@time "Build system" rn603 = @reaction_network begin
@discrete_events begin
(t == 1.0) => [L => 3.0]
(t == 3.0) => [L => 0.0]
end
(k1 * L, km1), R <--> RL
k2, RL + P --> RL + Ps
k3, Ps --> P
endBuild system: 15.732841 seconds (29.98 M allocations: 1.653 GiB, 4.11% gc time, 99.89% compilation time: 3% of which was recompilation)
Loading...
alg = FBDF()
up603 = Dict(:k1 => 5.0, :km1 => 1.0, :k2 => 6.0, :k3 => 2.0, :L => 0.0, :R => 3.0, :RL => 0.0, :P => 8.0, :Ps => 0.0)
tend = 10.0
@time "Build problem" prob603 = ODEProblem(rn603, up603, (0.0, tend); remove_conserved=true)
@time "Solve problem" sol603 = solve(prob603, alg; tstops=[1.0, 3.0])
plot(sol603, idxs=[:RL, :Ps, :L], labels=["RL" "P*" "L"], title="Fig. 6.3 (A)", xlabel="Time", ylabel="Concentration")Build problem: 62.516930 seconds (65.86 M allocations: 3.650 GiB, 2.20% gc time, 99.81% compilation time: 31% of which was recompilation)
Solve problem: 15.835433 seconds (23.79 M allocations: 1.288 GiB, 1.75% gc time, 99.83% compilation time)

This notebook was generated using Literate.jl.