Giter Club home page Giter Club logo

finitestateprojection.jl's Introduction

FiniteStateProjection.jl

Dev

Finite State Projection [1] algorithms for chemical reaction networks based on Catalyst.jl and ModelingToolkit.jl. Converts descriptions of reaction networks into ODEProblems and SteadyStateProblems for use with DifferentialEquations.jl.

Features:

  • Built on top of Catalyst.jl
  • FSP equations are generated as ODEFunction/ODEProblems and can be solved with DifferentialEquations.jl, with on-the-fly generation of targeted functions for improved performance
  • The Chemical Master Equation can be represented as a SparseMatrixCSC

More information is available in the documentation. Please feel free to open issues and submit pull requests!

Examples

Birth-Death System

using FiniteStateProjection
using OrdinaryDiffEq

rn = @reaction_network begin
    σ, 0 --> A
    d, A --> 0
end

sys = FSPSystem(rn)

# Parameters for our system
ps = [  => 10.0, :d => 1.0 ]

# Initial distribution (over 1 species)
# Here we start with 0 copies of A
u0 = zeros(50)
u0[1] = 1.0

prob = ODEProblem(sys, u0, (0, 10.0), ps)
sol = solve(prob, Vern7())

Visualisation

Telegraph Model

using FiniteStateProjection
using OrdinaryDiffEq

rn = @reaction_network begin
    σ_on * (1 - G_on), 0 --> G_on
    σ_off, G_on --> 0
    ρ, G_on --> G_on + M
    d, M --> 0
end

sys = FSPSystem(rn)

# Parameters for our system
ps = [ :σ_on => 0.25, :σ_off => 0.15,  => 15.0, :d => 1.0 ]

# Initial distribution (over two species)
# Here we start with 0 copies of G_on and M
u0 = zeros(2, 50)
u0[1,1] = 1.0

prob = ODEProblem(sys, u0, (0, 10.0), ps)
sol = solve(prob, Vern7())

Visualisation

References

[1] B. Munsky and M. Khammash, "The Finite State Projection algorithm for the solution of the Chemical Master Equation", Journal of Chemical Physics 124, 044104 (2006). https://doi.org/10.1063/1.2145882

finitestateprojection.jl's People

Contributors

augustinas1 avatar isaacsas avatar kaandocal avatar thazhemadam avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

finitestateprojection.jl's Issues

No method matching adjoint(::AbstractAlgebra.Generic.MatSpaceElem{BigInt})

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.

using FiniteStateProjection
using DifferentialEquations
using Sundials 
using SparseArrays

@parameters k01 k10 α γ
rn = @reaction_network begin 
    k01, G0 --> G1 
    k10, G1 --> G0 
    α, G1 --> G1 + RNA
    γ, RNA -->end k01 k10 α γ

ih = ReducingIndexHandler(rn)
fspsys = FSPSystem(rn, ih);
cons = conservedquantities([1, 0, 0], sys)

θ = (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));

The error message is

LoadError: MethodError: no method matching adjoint(::AbstractAlgebra.Generic.MatSpaceElem{BigInt})

And here's the Stacktrace:

Stacktrace:
 [1] conservationlaws(nsm::LinearAlgebra.Adjoint{Int64, Matrix{Int64}})
   @ FiniteStateProjection ~/.julia/packages/FiniteStateProjection/7Rdxc/src/fspsystem.jl:83
 [2] conservationlaws(rs::ReactionSystem{Nothing})
   @ FiniteStateProjection ~/.julia/packages/FiniteStateProjection/7Rdxc/src/fspsystem.jl:94
 [3] ReducingIndexHandler(rs::ReactionSystem{Nothing}, offset::Int64) (repeats 2 times)
   @ FiniteStateProjection ~/.julia/packages/FiniteStateProjection/7Rdxc/src/indexhandlers.jl:138

Thanks for looking into this!

Allow input types commonly used in Catlayst/MTK

I was looking into writing a short tutorial on how to use FiniteStateProjection.jl in Catalyst, and then link to the package. While I was looking through the documentation I had some thoughts:

Current workflow for simulating a model using FSP:

using FiniteStateProjection
using OrdinaryDiffEq

rn = @reaction_network begin
    σ, 0 --> A
    d, A --> 0
end

sys = FSPSystem(rn)

# Parameters for our system
ps = [ 10.0, 1.0 ]

# Initial distribution (over 1 species)
# Here we start with 0 copies of A
u0 = zeros(50)
u0[1] = 1.0

prob = convert(ODEProblem, sys, u0, (0, 10.0), ps)
sol = solve(prob, Vern7())

Comment 1:
Right now, using Catalyst and MTK, parameter values are no longer given as vectors, but rather maps from parameters to values, e.g:

ps = [:σ => 10.0, :d => 1.0]

This has the advantage that one does not need to consider the order with which the parameters are stored within the model (which, after a recent MTK update, is no longer fully reliable).

Comment 2:
Technically the same holds for initial conditions. Now, since the initial condition for a FSP simulation is a multidimensional array, this does not directly work. However, it might be possible to enable FSPSystem to take an optional argument which specifies the order with which the species occur?
(it is possible to manually check using species(rn), but something like this might make sense)

Comment 3:
Mostly we have a dispatch on ODEProblem for special system types, rather than using convert. E.g. something like

ODEProblem(sys, u0, (0, 10.0), ps)

instead of the current

prob = convert(ODEProblem, sys, u0, (0, 10.0), ps)

Problem with toy SIR example

Hi, I'm having problems using a toy example from my repository of SIR models. Here's the code, where I'm trying to initialize the system with S=990, I=10:

using FiniteStateProjection
using OrdinaryDiffEq
using Plots

rn = @reaction_network SIR begin
    β, S + I --> 2I
    γ, I --> 0
end β γ

p = [0.0005, 0.25]
u0 = [990.0, 10.0]
tspan = (0.0, 40.0)
solver = Tsit5()

prob_ode = ODEProblem(rn, u0, tspan, p)
sol_ode = solve(prob_ode, solver)
plot(sol_ode)

sys_fsp = FSPSystem(rn)
u0f = zeros(2, 1001)
u0f[1,991] = 1.0
u0f[2,11] = 1.0
prob_fsp = convert(ODEProblem, sys_fsp, u0f, tspan, p)
sol_fsp = solve(prob_fsp, Tsit5())

The model runs quite happily, but gives incorrect answers (a mode of zero at the final timepoint):

julia> sol_fsp.u[end]
2×1001 Matrix{Float64}:
 0.975804  0.0429964    0.00096567  1.44262e-5   1.61612e-7     1.75808e-303  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0
 0.979782  0.000436904  8.76707e-8  1.04251e-11  8.13531e-16     0.0           0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0

I thought it may have something to do with the 'nothing', on the RHS of the second reaction. However, modifying this results in an error on solve:

using FiniteStateProjection
using OrdinaryDiffEq
using Plots

rn = @reaction_network SIR begin
    β, S + I --> 2I
    γ, I --> R
end β γ

p = [0.0005, 0.25]
u0 = [990.0, 10.0, 0.0]
tspan = (0.0, 40.0)
solver = Tsit5()

prob_ode = ODEProblem(rn, u0, tspan, p)
sol_ode = solve(prob_ode, solver)
plot(sol_ode)

sys_fsp = FSPSystem(rn)
u0f = zeros(3, 1001)
u0f[1,991] = 1.0
u0f[2,11] = 1.0
prob_fsp = convert(ODEProblem, sys_fsp, u0f, tspan, p)
sol_fsp = solve(prob_fsp, solver)

Output:

ERROR: MethodError: no method matching pairedindices(::DefaultIndexHandler, ::Matrix{Float64}, ::CartesianIndex{3})

drop support for versions before 1.10

SciMLBase is 1.10 and up now, so there isn't much point to trying to keep support for earlier versions. The Project.toml should get updated to reflect this (perhaps as of the next release once Catalyst 14 compatibility is working)?

package maintenance

@kaandocal would you consider putting this under SciML so we could get more people access to maintain it? You could still have full repo permissons, but having it in an org might help with keeping dependencies updated. Just a thought!

FiniteStateProjection.jl pinning ArrayInterface at v3.2.2 rendering incompatibility with DifferentialEquations.jl

Hi Kaan

I've just updated to Julia v1.8.0 and when ]add FiniteStateProjection it pins ArrayInterface.jl at v3.2.2 (instead of the current v6.0.22). This renders the following packages unable to precompile due to a dependency on ArrayInterface.jl v6.0.22: DifferentialEquations/Sundials/OrdinaryDiffEq/DelayDiffEq/StochasticDiffEq/FindSteadyStates. See output below.
Removing all the aforementioned packages (including FiniteStateProjection) and then adding them again (excluding FiniteStateProjection) resolves the issue as it doesn't pin ArrayInterface.jl at v3.2.2. Thanks!

Screen Shot 2022-08-24 at 6 36 12 pm

TagBot trigger issue

This issue is used to trigger TagBot; feel free to unsubscribe.

If you haven't already, you should update your TagBot.yml to include issue comment triggers.
Please see this post on Discourse for instructions and more details.

If you'd like for me to do this for you, comment TagBot fix on this issue.
I'll open a PR within a few hours, please be patient!

Seems to be a bug, but not sure...

Describe the bug 🐞

Examples given, Birth-Death System and Telegraph Model, doesn't work well.

When I run Birth-Death System one line after another, it goes right until the last line "sol = solve(prob, Vern7())", and it comes" LoadError: BoundsError: attempt to access Tuple{Int64} at index [2]"

Same thing happens when I tried Telegraph Model, but this time, "ERROR: LoadError: BoundsError: attempt to access Tuple{Int64, Int64} at index [3]"

Error & Stacktrace ⚠️

ERROR: LoadError: BoundsError: attempt to access Tuple{Int64, Int64} at index [3]
Stacktrace:
  [1] getindex
    @ .\tuple.jl:31 [inlined]
  [2] getindex
    @ .\multidimensional.jl:98 [inlined]
  [3] macro expansion
    @ C:\Users\xlx\.julia\packages\RuntimeGeneratedFunctions\Yo8zx\src\RuntimeGeneratedFunctions.jl:163 [inlined]
  [4] macro expansion
    @ .\none:0 [inlined]
  [5] generated_callfunc
    @ .\none:0 [inlined]
  [6] (::RuntimeGeneratedFunctions.RuntimeGeneratedFunction{(:du, :u, :p, :t), FiniteStateProjection.var"#_RGF_ModTag", FiniteStateProjection.var"#_RGF_ModTag", (0xbf4759ff, 0xd5f410d0, 0xba16b9ab, 0x61ffe46e, 0xd93d7742), Expr})(::Matrix{Float64}, ::Matrix{Float64}, ::Vector{Float64}, ::Float64)
    @ RuntimeGeneratedFunctions C:\Users\xlx\.julia\packages\RuntimeGeneratedFunctions\Yo8zx\src\RuntimeGeneratedFunctions.jl:150
  [7] (::ODEFunction{true, SciMLBase.FullSpecialize, RuntimeGeneratedFunctions.RuntimeGeneratedFunction{(:du, :u, :p, :t), FiniteStateProjection.var"#_RGF_ModTag", FiniteStateProjection.var"#_RGF_ModTag", (0xbf4759ff, 0xd5f410d0, 0xba16b9ab, 0x61ffe46e, 0xd93d7742), Expr}, LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing})(::Matrix{Float64}, ::Vararg{Any})
    @ SciMLBase C:\Users\xlx\.julia\packages\SciMLBase\szsYq\src\scimlfunctions.jl:2266
  [8] ode_determine_initdt(u0::Matrix{Float64}, t::Float64, tdir::Float64, dtmax::Float64, abstol::Float64, reltol::Float64, internalnorm::typeof(DiffEqBase.ODE_DEFAULT_NORM), prob::ODEProblem{Matrix{Float64}, Tuple{Float64, Float64}, true, Vector{Float64}, ODEFunction{true, SciMLBase.FullSpecialize, RuntimeGeneratedFunctions.RuntimeGeneratedFunction{(:du, :u, :p, :t), FiniteStateProjection.var"#_RGF_ModTag", FiniteStateProjection.var"#_RGF_ModTag", (0xbf4759ff, 0xd5f410d0, 0xba16b9ab, 0x61ffe46e, 0xd93d7742), Expr}, LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, @Kwargs{}, SciMLBase.StandardODEProblem}, integrator::OrdinaryDiffEq.ODEIntegrator{Vern7{typeof(OrdinaryDiffEq.trivial_limiter!), typeof(OrdinaryDiffEq.trivial_limiter!), Static.False}, true, Matrix{Float64}, Nothing, Float64, Vector{Float64}, Float64, Float64, Float64, Float64, Vector{Matrix{Float64}}, ODESolution{Float64, 3, Vector{Matrix{Float64}}, Nothing, Nothing, Vector{Float64}, Vector{Vector{Matrix{Float64}}}, ODEProblem{Matrix{Float64}, Tuple{Float64, Float64}, true, Vector{Float64}, ODEFunction{true, SciMLBase.FullSpecialize, RuntimeGeneratedFunctions.RuntimeGeneratedFunction{(:du, :u, :p, :t), FiniteStateProjection.var"#_RGF_ModTag", FiniteStateProjection.var"#_RGF_ModTag", (0xbf4759ff, 0xd5f410d0, 0xba16b9ab, 0x61ffe46e, 0xd93d7742), Expr}, LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, @Kwargs{}, SciMLBase.StandardODEProblem}, Vern7{typeof(OrdinaryDiffEq.trivial_limiter!), typeof(OrdinaryDiffEq.trivial_limiter!), Static.False}, OrdinaryDiffEq.InterpolationData{ODEFunction{true, SciMLBase.FullSpecialize, RuntimeGeneratedFunctions.RuntimeGeneratedFunction{(:du, :u, :p, :t), FiniteStateProjection.var"#_RGF_ModTag", FiniteStateProjection.var"#_RGF_ModTag", (0xbf4759ff, 0xd5f410d0, 0xba16b9ab, 0x61ffe46e, 0xd93d7742), Expr}, LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, Vector{Matrix{Float64}}, Vector{Float64}, Vector{Vector{Matrix{Float64}}}, OrdinaryDiffEq.Vern7Cache{Matrix{Float64}, Matrix{Float64}, Matrix{Float64}, typeof(OrdinaryDiffEq.trivial_limiter!), typeof(OrdinaryDiffEq.trivial_limiter!), Static.False}}, DiffEqBase.Stats, Nothing}, ODEFunction{true, SciMLBase.FullSpecialize, RuntimeGeneratedFunctions.RuntimeGeneratedFunction{(:du, :u, :p, :t), FiniteStateProjection.var"#_RGF_ModTag", FiniteStateProjection.var"#_RGF_ModTag", (0xbf4759ff, 0xd5f410d0, 0xba16b9ab, 0x61ffe46e, 0xd93d7742), Expr}, LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, OrdinaryDiffEq.Vern7Cache{Matrix{Float64}, Matrix{Float64}, Matrix{Float64}, typeof(OrdinaryDiffEq.trivial_limiter!), typeof(OrdinaryDiffEq.trivial_limiter!), Static.False}, OrdinaryDiffEq.DEOptions{Float64, Float64, Float64, Float64, PIController{Rational{Int64}}, typeof(DiffEqBase.ODE_DEFAULT_NORM), typeof(LinearAlgebra.opnorm), Nothing, CallbackSet{Tuple{}, Tuple{}}, typeof(DiffEqBase.ODE_DEFAULT_ISOUTOFDOMAIN), typeof(DiffEqBase.ODE_DEFAULT_PROG_MESSAGE), typeof(DiffEqBase.ODE_DEFAULT_UNSTABLE_CHECK), DataStructures.BinaryHeap{Float64, DataStructures.FasterForward}, DataStructures.BinaryHeap{Float64, DataStructures.FasterForward}, Nothing, Nothing, Int64, Tuple{}, Tuple{}, Tuple{}}, Matrix{Float64}, Float64, Nothing, OrdinaryDiffEq.DefaultInit})
    @ OrdinaryDiffEq C:\Users\xlx\.julia\packages\OrdinaryDiffEq\FFFcA\src\initdt.jl:53
  [9] auto_dt_reset!
    @ C:\Users\xlx\.julia\packages\OrdinaryDiffEq\FFFcA\src\integrators\integrator_interface.jl:449 [inlined]
 [10] handle_dt!(integrator::OrdinaryDiffEq.ODEIntegrator{Vern7{typeof(OrdinaryDiffEq.trivial_limiter!), typeof(OrdinaryDiffEq.trivial_limiter!), Static.False}, true, Matrix{Float64}, Nothing, Float64, Vector{Float64}, Float64, Float64, Float64, Float64, Vector{Matrix{Float64}}, ODESolution{Float64, 3, Vector{Matrix{Float64}}, Nothing, Nothing, Vector{Float64}, Vector{Vector{Matrix{Float64}}}, ODEProblem{Matrix{Float64}, Tuple{Float64, Float64}, true, Vector{Float64}, ODEFunction{true, SciMLBase.FullSpecialize, RuntimeGeneratedFunctions.RuntimeGeneratedFunction{(:du, :u, :p, :t), FiniteStateProjection.var"#_RGF_ModTag", FiniteStateProjection.var"#_RGF_ModTag", (0xbf4759ff, 0xd5f410d0, 0xba16b9ab, 0x61ffe46e, 0xd93d7742), Expr}, LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, @Kwargs{}, SciMLBase.StandardODEProblem}, Vern7{typeof(OrdinaryDiffEq.trivial_limiter!), typeof(OrdinaryDiffEq.trivial_limiter!), Static.False}, OrdinaryDiffEq.InterpolationData{ODEFunction{true, SciMLBase.FullSpecialize, RuntimeGeneratedFunctions.RuntimeGeneratedFunction{(:du, :u, :p, :t), FiniteStateProjection.var"#_RGF_ModTag", FiniteStateProjection.var"#_RGF_ModTag", (0xbf4759ff, 0xd5f410d0, 0xba16b9ab, 0x61ffe46e, 0xd93d7742), Expr}, LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, Vector{Matrix{Float64}}, Vector{Float64}, Vector{Vector{Matrix{Float64}}}, OrdinaryDiffEq.Vern7Cache{Matrix{Float64}, Matrix{Float64}, Matrix{Float64}, typeof(OrdinaryDiffEq.trivial_limiter!), typeof(OrdinaryDiffEq.trivial_limiter!), Static.False}}, DiffEqBase.Stats, Nothing}, ODEFunction{true, SciMLBase.FullSpecialize, RuntimeGeneratedFunctions.RuntimeGeneratedFunction{(:du, :u, :p, :t), FiniteStateProjection.var"#_RGF_ModTag", FiniteStateProjection.var"#_RGF_ModTag", (0xbf4759ff, 0xd5f410d0, 0xba16b9ab, 0x61ffe46e, 0xd93d7742), Expr}, LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, OrdinaryDiffEq.Vern7Cache{Matrix{Float64}, Matrix{Float64}, Matrix{Float64}, typeof(OrdinaryDiffEq.trivial_limiter!), typeof(OrdinaryDiffEq.trivial_limiter!), Static.False}, OrdinaryDiffEq.DEOptions{Float64, Float64, Float64, Float64, PIController{Rational{Int64}}, typeof(DiffEqBase.ODE_DEFAULT_NORM), typeof(LinearAlgebra.opnorm), Nothing, CallbackSet{Tuple{}, Tuple{}}, typeof(DiffEqBase.ODE_DEFAULT_ISOUTOFDOMAIN), typeof(DiffEqBase.ODE_DEFAULT_PROG_MESSAGE), typeof(DiffEqBase.ODE_DEFAULT_UNSTABLE_CHECK), DataStructures.BinaryHeap{Float64, DataStructures.FasterForward}, DataStructures.BinaryHeap{Float64, DataStructures.FasterForward}, Nothing, Nothing, Int64, Tuple{}, Tuple{}, Tuple{}}, Matrix{Float64}, Float64, Nothing, OrdinaryDiffEq.DefaultInit})
    @ OrdinaryDiffEq C:\Users\xlx\.julia\packages\OrdinaryDiffEq\FFFcA\src\solve.jl:555
 [11] __init(prob::ODEProblem{Matrix{Float64}, Tuple{Float64, Float64}, true, Vector{Float64}, ODEFunction{true, SciMLBase.FullSpecialize, RuntimeGeneratedFunctions.RuntimeGeneratedFunction{(:du, :u, :p, :t), FiniteStateProjection.var"#_RGF_ModTag", FiniteStateProjection.var"#_RGF_ModTag", (0xbf4759ff, 0xd5f410d0, 0xba16b9ab, 0x61ffe46e, 0xd93d7742), Expr}, LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, @Kwargs{}, SciMLBase.StandardODEProblem}, alg::Vern7{typeof(OrdinaryDiffEq.trivial_limiter!), typeof(OrdinaryDiffEq.trivial_limiter!), Static.False}, timeseries_init::Tuple{}, ts_init::Tuple{}, ks_init::Tuple{}, recompile::Type{Val{true}}; saveat::Tuple{}, tstops::Tuple{}, d_discontinuities::Tuple{}, save_idxs::Nothing, save_everystep::Bool, save_on::Bool, save_start::Bool, save_end::Nothing, callback::Nothing, dense::Bool, calck::Bool, dt::Float64, dtmin::Nothing, dtmax::Float64, force_dtmin::Bool, adaptive::Bool, gamma::Rational{Int64}, abstol::Nothing, reltol::Nothing, qmin::Rational{Int64}, qmax::Int64, qsteady_min::Int64, qsteady_max::Int64, beta1::Nothing, beta2::Nothing, qoldinit::Rational{Int64}, controller::Nothing, fullnormalize::Bool, failfactor::Int64, maxiters::Int64, internalnorm::typeof(DiffEqBase.ODE_DEFAULT_NORM), internalopnorm::typeof(LinearAlgebra.opnorm), isoutofdomain::typeof(DiffEqBase.ODE_DEFAULT_ISOUTOFDOMAIN), unstable_check::typeof(DiffEqBase.ODE_DEFAULT_UNSTABLE_CHECK), verbose::Bool, timeseries_errors::Bool, dense_errors::Bool, advance_to_tstop::Bool, stop_at_next_tstop::Bool, initialize_save::Bool, progress::Bool, progress_steps::Int64, progress_name::String, progress_message::typeof(DiffEqBase.ODE_DEFAULT_PROG_MESSAGE), progress_id::Symbol, userdata::Nothing, allow_extrapolation::Bool, initialize_integrator::Bool, alias_u0::Bool, alias_du0::Bool, initializealg::OrdinaryDiffEq.DefaultInit, kwargs::@Kwargs{})
    @ OrdinaryDiffEq C:\Users\xlx\.julia\packages\OrdinaryDiffEq\FFFcA\src\solve.jl:517
 [12] __init (repeats 5 times)
    @ C:\Users\xlx\.julia\packages\OrdinaryDiffEq\FFFcA\src\solve.jl:10 [inlined]
 [13] #__solve#740
    @ C:\Users\xlx\.julia\packages\OrdinaryDiffEq\FFFcA\src\solve.jl:5 [inlined]
 [14] __solve
    @ C:\Users\xlx\.julia\packages\OrdinaryDiffEq\FFFcA\src\solve.jl:1 [inlined]
 [15] solve_call(_prob::Any, args::Vararg{Any}; merge_callbacks::Any, kwargshandle::Any, kwargs...)
    @ DiffEqBase C:\Users\xlx\.julia\packages\DiffEqBase\s433k\src\solve.jl:559 [inlined]
 [16] solve_call
    @ C:\Users\xlx\.julia\packages\DiffEqBase\s433k\src\solve.jl:529 [inlined]
 [17] solve_up(prob::ODEProblem{Matrix{Float64}, Tuple{Float64, Float64}, true, Vector{Float64}, ODEFunction{true, SciMLBase.FullSpecialize, RuntimeGeneratedFunctions.RuntimeGeneratedFunction{(:du, :u, :p, :t), FiniteStateProjection.var"#_RGF_ModTag", FiniteStateProjection.var"#_RGF_ModTag", (0xbf4759ff, 0xd5f410d0, 0xba16b9ab, 0x61ffe46e, 0xd93d7742), Expr}, LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, @Kwargs{}, SciMLBase.StandardODEProblem}, sensealg::Nothing, u0::Matrix{Float64}, p::Vector{Float64}, args::Vern7{typeof(OrdinaryDiffEq.trivial_limiter!), typeof(OrdinaryDiffEq.trivial_limiter!), Static.False}; kwargs::@Kwargs{})
    @ DiffEqBase C:\Users\xlx\.julia\packages\DiffEqBase\s433k\src\solve.jl:1020
 [18] solve_up
    @ DiffEqBase C:\Users\xlx\.julia\packages\DiffEqBase\s433k\src\solve.jl:993 [inlined]
 [19] #solve#40
    @ DiffEqBase C:\Users\xlx\.julia\packages\DiffEqBase\s433k\src\solve.jl:930 [inlined]
 [20] solve(prob::ODEProblem{Matrix{Float64}, Tuple{Float64, Float64}, true, Vector{Float64}, ODEFunction{true, SciMLBase.FullSpecialize, RuntimeGeneratedFunctions.RuntimeGeneratedFunction{(:du, :u, :p, :t), FiniteStateProjection.var"#_RGF_ModTag", FiniteStateProjection.var"#_RGF_ModTag", (0xbf4759ff, 0xd5f410d0, 0xba16b9ab, 0x61ffe46e, 0xd93d7742), Expr}, LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, @Kwargs{}, SciMLBase.StandardODEProblem}, args::Vern7{typeof(OrdinaryDiffEq.trivial_limiter!), typeof(OrdinaryDiffEq.trivial_limiter!), Static.False})
    @ DiffEqBase C:\Users\xlx\.julia\packages\DiffEqBase\s433k\src\solve.jl:920
 [21] top-level scope
    @ D:\HuaweiMoveData\Users\xlx\Desktop\创\julia\test2.jl:22

Environment (please complete the following information):

  • Output of using Pkg; Pkg.status()
Status `C:\Users\xlx\.julia\environments\v1.10\Project.toml`
⌅ [479239e8] Catalyst v12.3.2
⌃ [0c46a032] DifferentialEquations v7.10.0
⌅ [5b8099bc] DomainSets v0.5.15
  [069e79ea] FiniteStateProjection v0.2.1
  [7073ff75] IJulia v1.24.2
⌃ [961ee093] ModelingToolkit v8.46.1
⌃ [1dea7af3] OrdinaryDiffEq v6.58.2
⌅ [0c5d862f] Symbolics v4.14.0
Info Packages marked with ⌃ and ⌅ have new versions available. Those with ⌃ may be upgradable, but those with ⌅ are restricted by compatibility constraints from upgrading. To see why use `status --outdated`

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.