Closed voduchuy closed 9 months ago
I recently noticed that ReducingIndexHandler
does not work anymore, likely due to API changes in some of the packages. I was planning to move the functionality into Catalyst here but got distracted - I should write some tests and finish that soon. How about this code in the meantime?
using FiniteStateProjection
using DifferentialEquations
using Sundials
using SparseArrays
@parameters k01 k10 α γ
rn = @reaction_network begin
k01 * (1 - G1), 0 --> G1
k10, G1 --> 0
α, G1 --> G1 + RNA
γ, RNA --> ∅
end k01 k10 α γ
fspsys = FSPSystem(rn);
θ = (0.05, 0.1, 5.0, 1.0);
p0 = zeros(2, 200);
p0[1,1] = 1.0;
tspan = (0.0, 120.0);
prob = ODEProblem(fspsys, p0, tspan, θ);
@time sol = solve(prob, CVODE_BDF(linear_solver=:GMRES), atol=1e-14, rtol=1.0e-4, saveat=range(start=0.0, stop=120.0, step=20.0));
Thank you! It works now.
I’m unable to set up the FSPSystem due to some error related to the
adjoint
method. I'm using Julia 1.7 on Apple M1. Here's the Julia code that ran into trouble. It's based on the telegraph example in the tutorial.The error message is
And here's the Stacktrace:
Thanks for looking into this!