Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dynamical ODE and SDE solvers fail when they are combined with VariableRateJump. #374

Open
Lightup1 opened this issue Nov 29, 2023 · 1 comment
Labels

Comments

@Lightup1
Copy link

Minimal Reproducible Example of ODE👇

using DifferentialEquations, Random
Random.seed!(1)

f1_harmonic(v,u,p,t) = -u
f2_harmonic(v,u,p,t) = v

u0 = zeros(2)
v0 = ones(2)

f1_harmonic_iip(dv,v,u,p,t) = dv .= f1_harmonic(v,u,p,t)
f2_harmonic_iip(du,v,u,p,t) = du .= f2_harmonic(v,u,p,t)

prob1 =  DynamicalODEProblem(f1_harmonic_iip,f2_harmonic_iip,v0,u0,(0.0,5.0))

rate(u, p, t) = u[1]
function affect!(integrator)
    integrator.u[1] = integrator.u[1] / 2
    nothing
end
jump = VariableRateJump(rate, affect!)
jump_prob = JumpProblem(prob1, Direct(), jump)
##
sol1 = solve(jump_prob,KahanLi8();dt=1/10,save_noise=true)

Error & Stacktrace ⚠️

ERROR: You can not use a solver designed for partitioned ODE with this problem. Please choose a solver suitable for your problem
Stacktrace:
  [1] error(s::String)
    @ Base .\error.jl:35
  [2] __init(prob::ODEProblem{ExtendedJumpArray{Float64, 1, ArrayPartition{Float64, Tuple{Vector{Float64}, Vector{Float64}}}, Vector{Float64}}, Tuple{Float64, Float64}, true, SciMLBase.NullParameters, ODEFunction{true, SciMLBase.FullSpecialize, JumpProcesses.var"#138#141"{Tuple{VariableRateJump{typeof(rate), typeof(affect!), Nothing, Nothing, Nothing, Nothing, Float64, Int64}}, DynamicalODEFunction{true, SciMLBase.FullSpecialize, ODEFunction{true, SciMLBase.FullSpecialize, typeof(f1_harmonic_iip), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, ODEFunction{true, SciMLBase.FullSpecialize, typeof(f2_harmonic_iip), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}}, 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::KahanLi8, timeseries_init::Vector{Any}, ts_init::Vector{Any}, ks_init::Vector{Any}, 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::CallbackSet{Tuple{ContinuousCallback{JumpProcesses.var"#175#177"{Int64}, JumpProcesses.var"#176#178"{TaskLocalRNG, Int64, VariableRateJump{typeof(rate), typeof(affect!), Nothing, Nothing, Nothing, Nothing, Float64, Int64}}, JumpProcesses.var"#176#178"{TaskLocalRNG, Int64, VariableRateJump{typeof(rate), typeof(affect!), Nothing, Nothing, Nothing, Nothing, Float64, Int64}}, typeof(SciMLBase.INITIALIZE_DEFAULT), typeof(SciMLBase.FINALIZE_DEFAULT), Float64, Int64, Rational{Int64}, Nothing, Int64}}, Tuple{}}, dense::Bool, calck::Bool, dt::Float64, dtmin::Nothing, dtmax::Float64, force_dtmin::Bool, adaptive::Bool, gamma::Int64, abstol::Nothing, reltol::Nothing, qmin::Int64, qmax::Int64, qsteady_min::Int64, qsteady_max::Int64, beta1::Nothing, beta2::Nothing, qoldinit::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{save_noise::Bool})
    @ OrdinaryDiffEq C:\Users\42158\.julia\packages\OrdinaryDiffEq\Y6bIX\src\solve.jl:84
  [3] init_call(::ODEProblem{ExtendedJumpArray{Float64, 1, ArrayPartition{Float64, Tuple{Vector{Float64}, Vector{Float64}}}, Vector{Float64}}, Tuple{Float64, Float64}, true, SciMLBase.NullParameters, ODEFunction{true, SciMLBase.FullSpecialize, JumpProcesses.var"#138#141"{Tuple{VariableRateJump{typeof(rate), typeof(affect!), Nothing, Nothing, Nothing, Nothing, Float64, Int64}}, DynamicalODEFunction{true, SciMLBase.FullSpecialize, ODEFunction{true, SciMLBase.FullSpecialize, typeof(f1_harmonic_iip), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, ODEFunction{true, SciMLBase.FullSpecialize, typeof(f2_harmonic_iip), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}}, 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}, ::KahanLi8, ::Vararg{Any}; merge_callbacks::Bool, kwargshandle::Nothing, kwargs::@Kwargs{callback::CallbackSet{Tuple{ContinuousCallback{JumpProcesses.var"#175#177"{Int64}, JumpProcesses.var"#176#178"{TaskLocalRNG, Int64, VariableRateJump{typeof(rate), typeof(affect!), Nothing, Nothing, Nothing, Nothing, Float64, Int64}}, JumpProcesses.var"#176#178"{TaskLocalRNG, Int64, VariableRateJump{typeof(rate), typeof(affect!), Nothing, Nothing, Nothing, Nothing, Float64, Int64}}, typeof(SciMLBase.INITIALIZE_DEFAULT), typeof(SciMLBase.FINALIZE_DEFAULT), Float64, Int64, Rational{Int64}, Nothing, Int64}}, Tuple{}}, dt::Float64, save_noise::Bool})
    @ DiffEqBase C:\Users\42158\.julia\packages\DiffEqBase\SlYdg\src\solve.jl:489
  [4] init_up(::ODEProblem{ExtendedJumpArray{Float64, 1, ArrayPartition{Float64, Tuple{Vector{Float64}, Vector{Float64}}}, Vector{Float64}}, Tuple{Float64, Float64}, true, SciMLBase.NullParameters, ODEFunction{true, SciMLBase.FullSpecialize, JumpProcesses.var"#138#141"{Tuple{VariableRateJump{typeof(rate), typeof(affect!), Nothing, Nothing, Nothing, Nothing, Float64, Int64}}, DynamicalODEFunction{true, SciMLBase.FullSpecialize, ODEFunction{true, SciMLBase.FullSpecialize, typeof(f1_harmonic_iip), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, ODEFunction{true, SciMLBase.FullSpecialize, typeof(f2_harmonic_iip), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}}, 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}, ::Nothing, ::ExtendedJumpArray{Float64, 1, ArrayPartition{Float64, Tuple{Vector{Float64}, Vector{Float64}}}, Vector{Float64}}, ::SciMLBase.NullParameters, ::KahanLi8, ::Vararg{Any}; kwargs::@Kwargs{callback::CallbackSet{Tuple{ContinuousCallback{JumpProcesses.var"#175#177"{Int64}, JumpProcesses.var"#176#178"{TaskLocalRNG, Int64, VariableRateJump{typeof(rate), typeof(affect!), Nothing, Nothing, Nothing, Nothing, Float64, Int64}}, JumpProcesses.var"#176#178"{TaskLocalRNG, Int64, VariableRateJump{typeof(rate), typeof(affect!), Nothing, Nothing, Nothing, Nothing, Float64, Int64}}, typeof(SciMLBase.INITIALIZE_DEFAULT), typeof(SciMLBase.FINALIZE_DEFAULT), Float64, Int64, Rational{Int64}, Nothing, Int64}}, Tuple{}}, dt::Float64, save_noise::Bool})
    @ DiffEqBase C:\Users\42158\.julia\packages\DiffEqBase\SlYdg\src\solve.jl:520
  [5] init(::ODEProblem{ExtendedJumpArray{Float64, 1, ArrayPartition{Float64, Tuple{Vector{Float64}, Vector{Float64}}}, Vector{Float64}}, Tuple{Float64, Float64}, true, SciMLBase.NullParameters, ODEFunction{true, SciMLBase.FullSpecialize, JumpProcesses.var"#138#141"{Tuple{VariableRateJump{typeof(rate), typeof(affect!), Nothing, Nothing, Nothing, Nothing, Float64, Int64}}, DynamicalODEFunction{true, SciMLBase.FullSpecialize, ODEFunction{true, SciMLBase.FullSpecialize, typeof(f1_harmonic_iip), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, ODEFunction{true, SciMLBase.FullSpecialize, typeof(f2_harmonic_iip), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}}, 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}, ::KahanLi8, ::Vararg{Any}; sensealg::Nothing, u0::Nothing, p::Nothing, kwargs::@Kwargs{callback::CallbackSet{Tuple{ContinuousCallback{JumpProcesses.var"#175#177"{Int64}, JumpProcesses.var"#176#178"{TaskLocalRNG, Int64, VariableRateJump{typeof(rate), typeof(affect!), Nothing, Nothing, Nothing, Nothing, Float64, Int64}}, JumpProcesses.var"#176#178"{TaskLocalRNG, Int64, VariableRateJump{typeof(rate), typeof(affect!), Nothing, Nothing, Nothing, Nothing, Float64, Int64}}, typeof(SciMLBase.INITIALIZE_DEFAULT), typeof(SciMLBase.FINALIZE_DEFAULT), Float64, Int64, Rational{Int64}, Nothing, Int64}}, Tuple{}}, dt::Float64, save_noise::Bool})
    @ DiffEqBase C:\Users\42158\.julia\packages\DiffEqBase\SlYdg\src\solve.jl:502
  [6] __init(_jump_prob::JumpProblem{true, ODEProblem{ExtendedJumpArray{Float64, 1, ArrayPartition{Float64, Tuple{Vector{Float64}, Vector{Float64}}}, Vector{Float64}}, Tuple{Float64, Float64}, true, SciMLBase.NullParameters, ODEFunction{true, SciMLBase.FullSpecialize, JumpProcesses.var"#138#141"{Tuple{VariableRateJump{typeof(rate), typeof(affect!), Nothing, Nothing, Nothing, Nothing, Float64, Int64}}, DynamicalODEFunction{true, SciMLBase.FullSpecialize, ODEFunction{true, SciMLBase.FullSpecialize, typeof(f1_harmonic_iip), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, ODEFunction{true, SciMLBase.FullSpecialize, typeof(f2_harmonic_iip), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}}, 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}, Direct, CallbackSet{Tuple{ContinuousCallback{JumpProcesses.var"#175#177"{Int64}, JumpProcesses.var"#176#178"{TaskLocalRNG, Int64, VariableRateJump{typeof(rate), typeof(affect!), Nothing, Nothing, Nothing, Nothing, Float64, Int64}}, JumpProcesses.var"#176#178"{TaskLocalRNG, Int64, VariableRateJump{typeof(rate), typeof(affect!), Nothing, Nothing, Nothing, Nothing, Float64, Int64}}, typeof(SciMLBase.INITIALIZE_DEFAULT), typeof(SciMLBase.FINALIZE_DEFAULT), Float64, Int64, Rational{Int64}, Nothing, Int64}}, Tuple{}}, Nothing, Tuple{VariableRateJump{typeof(rate), typeof(affect!), Nothing, Nothing, Nothing, Nothing, Float64, Int64}}, Nothing, Nothing, TaskLocalRNG, @Kwargs{callback::Nothing}}, alg::KahanLi8, timeseries::Vector{Any}, ts::Vector{Any}, ks::Vector{Any}, recompile::Type{Val{true}}; callback::Nothing, seed::Nothing, alias_jump::Bool, kwargs::@Kwargs{dt::Float64, save_noise::Bool})
    @ JumpProcesses C:\Users\42158\.julia\packages\JumpProcesses\kKbII\src\solve.jl:31
  [7] init_call(::JumpProblem{true, ODEProblem{ExtendedJumpArray{Float64, 1, ArrayPartition{Float64, Tuple{Vector{Float64}, Vector{Float64}}}, Vector{Float64}}, Tuple{Float64, Float64}, true, SciMLBase.NullParameters, ODEFunction{true, SciMLBase.FullSpecialize, JumpProcesses.var"#138#141"{Tuple{VariableRateJump{typeof(rate), typeof(affect!), Nothing, Nothing, Nothing, Nothing, Float64, Int64}}, DynamicalODEFunction{true, SciMLBase.FullSpecialize, ODEFunction{true, SciMLBase.FullSpecialize, typeof(f1_harmonic_iip), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, ODEFunction{true, SciMLBase.FullSpecialize, typeof(f2_harmonic_iip), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}}, 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}, Direct, CallbackSet{Tuple{ContinuousCallback{JumpProcesses.var"#175#177"{Int64}, JumpProcesses.var"#176#178"{TaskLocalRNG, Int64, VariableRateJump{typeof(rate), typeof(affect!), Nothing, Nothing, Nothing, Nothing, Float64, Int64}}, JumpProcesses.var"#176#178"{TaskLocalRNG, Int64, VariableRateJump{typeof(rate), typeof(affect!), Nothing, Nothing, Nothing, Nothing, Float64, Int64}}, typeof(SciMLBase.INITIALIZE_DEFAULT), typeof(SciMLBase.FINALIZE_DEFAULT), Float64, Int64, Rational{Int64}, Nothing, Int64}}, Tuple{}}, Nothing, Tuple{VariableRateJump{typeof(rate), typeof(affect!), Nothing, Nothing, Nothing, Nothing, Float64, Int64}}, Nothing, Nothing, TaskLocalRNG, @Kwargs{callback::Nothing}}, ::KahanLi8, ::Vararg{Any}; merge_callbacks::Bool, kwargshandle::Nothing, kwargs::@Kwargs{dt::Float64, save_noise::Bool})
    @ DiffEqBase C:\Users\42158\.julia\packages\DiffEqBase\SlYdg\src\solve.jl:489
  [8] init_call
    @ C:\Users\42158\.julia\packages\DiffEqBase\SlYdg\src\solve.jl:463 [inlined]
  [9] #init#32
    @ C:\Users\42158\.julia\packages\DiffEqBase\SlYdg\src\solve.jl:506 [inlined]
 [10] init
    @ C:\Users\42158\.julia\packages\DiffEqBase\SlYdg\src\solve.jl:505 [inlined]
 [11] __solve(jump_prob::JumpProblem{true, ODEProblem{ExtendedJumpArray{Float64, 1, ArrayPartition{Float64, Tuple{Vector{Float64}, Vector{Float64}}}, Vector{Float64}}, Tuple{Float64, Float64}, true, SciMLBase.NullParameters, ODEFunction{true, SciMLBase.FullSpecialize, JumpProcesses.var"#138#141"{Tuple{VariableRateJump{typeof(rate), typeof(affect!), Nothing, Nothing, Nothing, Nothing, Float64, Int64}}, DynamicalODEFunction{true, SciMLBase.FullSpecialize, ODEFunction{true, SciMLBase.FullSpecialize, typeof(f1_harmonic_iip), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, ODEFunction{true, SciMLBase.FullSpecialize, typeof(f2_harmonic_iip), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}}, 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}, Direct, CallbackSet{Tuple{ContinuousCallback{JumpProcesses.var"#175#177"{Int64}, JumpProcesses.var"#176#178"{TaskLocalRNG, Int64, VariableRateJump{typeof(rate), typeof(affect!), Nothing, Nothing, Nothing, Nothing, Float64, Int64}}, JumpProcesses.var"#176#178"{TaskLocalRNG, Int64, VariableRateJump{typeof(rate), typeof(affect!), Nothing, Nothing, Nothing, Nothing, Float64, Int64}}, typeof(SciMLBase.INITIALIZE_DEFAULT), typeof(SciMLBase.FINALIZE_DEFAULT), Float64, Int64, Rational{Int64}, Nothing, Int64}}, Tuple{}}, Nothing, Tuple{VariableRateJump{typeof(rate), typeof(affect!), Nothing, Nothing, Nothing, Nothing, Float64, Int64}}, Nothing, Nothing, TaskLocalRNG, @Kwargs{callback::Nothing}}, alg::KahanLi8, timeseries::Vector{Any}, ts::Vector{Any}, ks::Vector{Any}, recompile::Type{Val{true}}; kwargs::@Kwargs{dt::Float64, save_noise::Bool})
    @ JumpProcesses C:\Users\42158\.julia\packages\JumpProcesses\kKbII\src\solve.jl:5
 [12] __solve (repeats 5 times)
    @ JumpProcesses C:\Users\42158\.julia\packages\JumpProcesses\kKbII\src\solve.jl:1 [inlined]
 [13] #solve#47
    @ DiffEqBase C:\Users\42158\.julia\packages\DiffEqBase\SlYdg\src\solve.jl:1039 [inlined]
 [14] top-level scope
    @ c:\Users\42158\Documents\PhD-projects\wire-mediated coupling\Scripts\jump_debug.jl:50

Minimal Reproducible Example of SDE👇

using DifferentialEquations, Random
Random.seed!(1)

f1_harmonic(v,u,p,t) = -u
f2_harmonic(v,u,p,t) = v
g(u,p,t) = 1
γ = 1

u0 = zeros(2)
v0 = ones(2)

f1_harmonic_iip(dv,v,u,p,t) = dv .= f1_harmonic(v,u,p,t)
f2_harmonic_iip(du,v,u,p,t) = du .= f2_harmonic(v,u,p,t)
g_iip(du,u,p,t) = du .= g(u,p,t)

prob1 =  DynamicalSDEProblem(f1_harmonic_iip,f2_harmonic_iip,g_iip,v0,u0,(0.0,5.0))

rate(u, p, t) = u[1]
function affect!(integrator)
    integrator.u[1] = integrator.u[1] / 2
    nothing
end
jump = VariableRateJump(rate, affect!)
jump_prob = JumpProblem(prob1, Direct(), jump)
##
sol1 = solve(jump_prob,BAOAB(gamma=γ);dt=1/10,save_noise=true)

Error & Stacktrace ⚠️

ERROR: type ExtendedJumpArray has no field x
Stacktrace:
 [1] getproperty
   @ .\Base.jl:37 [inlined]
 [2] alg_cache(alg::BAOAB{Int64}, prob::SDEProblem{ExtendedJumpArray{Float64, 1, ArrayPartition{Float64, Tuple{Vector{Float64}, Vector{Float64}}}, Vector{Float64}}, Tuple{Float64, Float64}, true, SciMLBase.NullParameters, Nothing, SDEFunction{true, SciMLBase.FullSpecialize, JumpProcesses.var"#145#150"{Tuple{VariableRateJump{typeof(rate), typeof(affect!), Nothing, Nothing, Nothing, Nothing, Float64, Int64}}, DynamicalSDEFunction{true, SciMLBase.FullSpecialize, SDEFunction{true, SciMLBase.FullSpecialize, typeof(f1_harmonic_iip), typeof(g_iip), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, SDEFunction{true, SciMLBase.FullSpecialize, typeof(f2_harmonic_iip), typeof(g_iip), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, typeof(g_iip), LinearAlgebra.UniformScaling{Bool}, Vector{Float64}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}}, JumpProcesses.var"#147#152"{SDEProblem{ArrayPartition{Float64, Tuple{Vector{Float64}, Vector{Float64}}}, Tuple{Float64, Float64}, true, SciMLBase.NullParameters, Nothing, DynamicalSDEFunction{true, SciMLBase.FullSpecialize, SDEFunction{true, SciMLBase.FullSpecialize, typeof(f1_harmonic_iip), typeof(g_iip), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, SDEFunction{true, SciMLBase.FullSpecialize, typeof(f2_harmonic_iip), typeof(g_iip), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, typeof(g_iip), LinearAlgebra.UniformScaling{Bool}, Vector{Float64}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, typeof(g_iip), @Kwargs{}, Nothing}}, LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, JumpProcesses.var"#147#152"{SDEProblem{ArrayPartition{Float64, Tuple{Vector{Float64}, Vector{Float64}}}, Tuple{Float64, Float64}, true, SciMLBase.NullParameters, Nothing, DynamicalSDEFunction{true, SciMLBase.FullSpecialize, SDEFunction{true, SciMLBase.FullSpecialize, typeof(f1_harmonic_iip), typeof(g_iip), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, SDEFunction{true, SciMLBase.FullSpecialize, typeof(f2_harmonic_iip), typeof(g_iip), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, typeof(g_iip), LinearAlgebra.UniformScaling{Bool}, Vector{Float64}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, typeof(g_iip), @Kwargs{}, Nothing}}, @Kwargs{g::JumpProcesses.var"#147#152"{SDEProblem{ArrayPartition{Float64, Tuple{Vector{Float64}, Vector{Float64}}}, Tuple{Float64, Float64}, true, SciMLBase.NullParameters, Nothing, DynamicalSDEFunction{true, SciMLBase.FullSpecialize, SDEFunction{true, SciMLBase.FullSpecialize, typeof(f1_harmonic_iip), typeof(g_iip), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, SDEFunction{true, SciMLBase.FullSpecialize, typeof(f2_harmonic_iip), typeof(g_iip), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, typeof(g_iip), LinearAlgebra.UniformScaling{Bool}, Vector{Float64}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, typeof(g_iip), @Kwargs{}, Nothing}}}, Nothing}, u::ExtendedJumpArray{Float64, 1, ArrayPartition{Float64, Tuple{Vector{Float64}, Vector{Float64}}}, Vector{Float64}}, ΔW::ExtendedJumpArray{Float64, 1, ArrayPartition{Float64, Tuple{Vector{Float64}, Vector{Float64}}}, Vector{Float64}}, ΔZ::Nothing, p::SciMLBase.NullParameters, rate_prototype::ExtendedJumpArray{Float64, 1, ArrayPartition{Float64, Tuple{Vector{Float64}, Vector{Float64}}}, Vector{Float64}}, noise_rate_prototype::ExtendedJumpArray{Float64, 1, ArrayPartition{Float64, Tuple{Vector{Float64}, Vector{Float64}}}, Vector{Float64}}, jump_rate_prototype::Nothing, ::Type{Float64}, ::Type{Float64}, ::Type{Float64}, uprev::ExtendedJumpArray{Float64, 1, ArrayPartition{Float64, Tuple{Vector{Float64}, Vector{Float64}}}, Vector{Float64}}, f::SDEFunction{true, SciMLBase.FullSpecialize, JumpProcesses.var"#145#150"{Tuple{VariableRateJump{typeof(rate), typeof(affect!), Nothing, Nothing, Nothing, Nothing, Float64, Int64}}, DynamicalSDEFunction{true, SciMLBase.FullSpecialize, SDEFunction{true, SciMLBase.FullSpecialize, typeof(f1_harmonic_iip), typeof(g_iip), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, SDEFunction{true, SciMLBase.FullSpecialize, typeof(f2_harmonic_iip), typeof(g_iip), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, typeof(g_iip), LinearAlgebra.UniformScaling{Bool}, Vector{Float64}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}}, JumpProcesses.var"#147#152"{SDEProblem{ArrayPartition{Float64, Tuple{Vector{Float64}, Vector{Float64}}}, Tuple{Float64, Float64}, true, SciMLBase.NullParameters, Nothing, DynamicalSDEFunction{true, SciMLBase.FullSpecialize, SDEFunction{true, SciMLBase.FullSpecialize, typeof(f1_harmonic_iip), typeof(g_iip), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, SDEFunction{true, SciMLBase.FullSpecialize, typeof(f2_harmonic_iip), typeof(g_iip), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, typeof(g_iip), LinearAlgebra.UniformScaling{Bool}, Vector{Float64}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, typeof(g_iip), @Kwargs{}, Nothing}}, LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, t::Float64, dt::Float64, ::Type{Val{true}})
   @ StochasticDiffEq C:\Users\42158\.julia\packages\StochasticDiffEq\WPfDF\src\caches\dynamical_caches.jl:28
 [3] __init(_prob::JumpProblem{true, SDEProblem{ExtendedJumpArray{Float64, 1, ArrayPartition{Float64, Tuple{Vector{Float64}, Vector{Float64}}}, Vector{Float64}}, Tuple{Float64, Float64}, true, SciMLBase.NullParameters, Nothing, SDEFunction{true, SciMLBase.FullSpecialize, JumpProcesses.var"#145#150"{Tuple{VariableRateJump{typeof(rate), typeof(affect!), Nothing, Nothing, Nothing, Nothing, Float64, Int64}}, DynamicalSDEFunction{true, SciMLBase.FullSpecialize, SDEFunction{true, SciMLBase.FullSpecialize, typeof(f1_harmonic_iip), typeof(g_iip), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, SDEFunction{true, SciMLBase.FullSpecialize, typeof(f2_harmonic_iip), typeof(g_iip), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, typeof(g_iip), LinearAlgebra.UniformScaling{Bool}, Vector{Float64}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}}, JumpProcesses.var"#147#152"{SDEProblem{ArrayPartition{Float64, Tuple{Vector{Float64}, Vector{Float64}}}, Tuple{Float64, Float64}, true, SciMLBase.NullParameters, Nothing, DynamicalSDEFunction{true, SciMLBase.FullSpecialize, SDEFunction{true, SciMLBase.FullSpecialize, typeof(f1_harmonic_iip), typeof(g_iip), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, SDEFunction{true, SciMLBase.FullSpecialize, typeof(f2_harmonic_iip), typeof(g_iip), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, typeof(g_iip), LinearAlgebra.UniformScaling{Bool}, Vector{Float64}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, typeof(g_iip), @Kwargs{}, Nothing}}, LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, JumpProcesses.var"#147#152"{SDEProblem{ArrayPartition{Float64, Tuple{Vector{Float64}, Vector{Float64}}}, Tuple{Float64, Float64}, true, SciMLBase.NullParameters, Nothing, DynamicalSDEFunction{true, SciMLBase.FullSpecialize, SDEFunction{true, SciMLBase.FullSpecialize, typeof(f1_harmonic_iip), typeof(g_iip), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, SDEFunction{true, SciMLBase.FullSpecialize, typeof(f2_harmonic_iip), typeof(g_iip), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, typeof(g_iip), LinearAlgebra.UniformScaling{Bool}, Vector{Float64}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, typeof(g_iip), @Kwargs{}, Nothing}}, @Kwargs{g::JumpProcesses.var"#147#152"{SDEProblem{ArrayPartition{Float64, Tuple{Vector{Float64}, Vector{Float64}}}, Tuple{Float64, Float64}, true, SciMLBase.NullParameters, Nothing, DynamicalSDEFunction{true, SciMLBase.FullSpecialize, SDEFunction{true, SciMLBase.FullSpecialize, typeof(f1_harmonic_iip), typeof(g_iip), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, SDEFunction{true, SciMLBase.FullSpecialize, typeof(f2_harmonic_iip), typeof(g_iip), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, typeof(g_iip), LinearAlgebra.UniformScaling{Bool}, Vector{Float64}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, typeof(g_iip), @Kwargs{}, Nothing}}}, Nothing}, Direct, CallbackSet{Tuple{ContinuousCallback{JumpProcesses.var"#175#177"{Int64}, JumpProcesses.var"#176#178"{TaskLocalRNG, Int64, VariableRateJump{typeof(rate), typeof(affect!), Nothing, Nothing, Nothing, Nothing, Float64, Int64}}, JumpProcesses.var"#176#178"{TaskLocalRNG, Int64, VariableRateJump{typeof(rate), typeof(affect!), Nothing, Nothing, Nothing, Nothing, Float64, Int64}}, typeof(SciMLBase.INITIALIZE_DEFAULT), typeof(SciMLBase.FINALIZE_DEFAULT), Float64, Int64, Rational{Int64}, Nothing, Int64}}, Tuple{}}, Nothing, Tuple{VariableRateJump{typeof(rate), typeof(affect!), Nothing, Nothing, Nothing, Nothing, Float64, Int64}}, Nothing, Nothing, TaskLocalRNG, @Kwargs{callback::Nothing}}, alg::BAOAB{Int64}, timeseries_init::Vector{Any}, ts_init::Vector{Any}, ks_init::Vector{Any}, recompile::Type{Val{true}}; saveat::Tuple{}, tstops::Tuple{}, d_discontinuities::Tuple{}, save_idxs::Nothing, save_everystep::Bool, save_noise::Bool, save_on::Bool, save_start::Bool, save_end::Nothing, callback::Nothing, dense::Bool, calck::Bool, dt::Float64, adaptive::Bool, gamma::Int64, abstol::Nothing, reltol::Nothing, qmin::Int64, qmax::Int64, qsteady_min::Int64, qsteady_max::Int64, beta2::Nothing, beta1::Nothing, qoldinit::Int64, controller::Nothing, fullnormalize::Bool, failfactor::Int64, delta::Rational{Int64}, maxiters::Int64, dtmax::Float64, dtmin::Float64, internalnorm::typeof(DiffEqBase.ODE_DEFAULT_NORM), isoutofdomain::typeof(DiffEqBase.ODE_DEFAULT_ISOUTOFDOMAIN), unstable_check::typeof(DiffEqBase.ODE_DEFAULT_UNSTABLE_CHECK), verbose::Bool, force_dtmin::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, initialize_integrator::Bool, seed::UInt64, alias_u0::Bool, alias_jumps::Bool, kwargs::@Kwargs{})
   @ StochasticDiffEq C:\Users\42158\.julia\packages\StochasticDiffEq\WPfDF\src\solve.jl:474
 [4] init_call(::JumpProblem{true, SDEProblem{ExtendedJumpArray{Float64, 1, ArrayPartition{Float64, Tuple{Vector{Float64}, Vector{Float64}}}, Vector{Float64}}, Tuple{Float64, Float64}, true, SciMLBase.NullParameters, Nothing, SDEFunction{true, SciMLBase.FullSpecialize, JumpProcesses.var"#145#150"{Tuple{VariableRateJump{typeof(rate), typeof(affect!), Nothing, Nothing, Nothing, Nothing, Float64, Int64}}, DynamicalSDEFunction{true, SciMLBase.FullSpecialize, SDEFunction{true, SciMLBase.FullSpecialize, typeof(f1_harmonic_iip), typeof(g_iip), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, SDEFunction{true, SciMLBase.FullSpecialize, typeof(f2_harmonic_iip), typeof(g_iip), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, typeof(g_iip), LinearAlgebra.UniformScaling{Bool}, Vector{Float64}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}}, JumpProcesses.var"#147#152"{SDEProblem{ArrayPartition{Float64, Tuple{Vector{Float64}, Vector{Float64}}}, Tuple{Float64, Float64}, true, SciMLBase.NullParameters, Nothing, DynamicalSDEFunction{true, SciMLBase.FullSpecialize, SDEFunction{true, SciMLBase.FullSpecialize, typeof(f1_harmonic_iip), typeof(g_iip), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, SDEFunction{true, SciMLBase.FullSpecialize, typeof(f2_harmonic_iip), typeof(g_iip), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, typeof(g_iip), LinearAlgebra.UniformScaling{Bool}, Vector{Float64}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, typeof(g_iip), @Kwargs{}, Nothing}}, LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, JumpProcesses.var"#147#152"{SDEProblem{ArrayPartition{Float64, Tuple{Vector{Float64}, Vector{Float64}}}, Tuple{Float64, Float64}, true, SciMLBase.NullParameters, Nothing, DynamicalSDEFunction{true, SciMLBase.FullSpecialize, SDEFunction{true, SciMLBase.FullSpecialize, typeof(f1_harmonic_iip), typeof(g_iip), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, SDEFunction{true, SciMLBase.FullSpecialize, typeof(f2_harmonic_iip), typeof(g_iip), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, typeof(g_iip), LinearAlgebra.UniformScaling{Bool}, Vector{Float64}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, typeof(g_iip), @Kwargs{}, Nothing}}, @Kwargs{g::JumpProcesses.var"#147#152"{SDEProblem{ArrayPartition{Float64, Tuple{Vector{Float64}, Vector{Float64}}}, Tuple{Float64, Float64}, true, SciMLBase.NullParameters, Nothing, DynamicalSDEFunction{true, SciMLBase.FullSpecialize, SDEFunction{true, SciMLBase.FullSpecialize, typeof(f1_harmonic_iip), typeof(g_iip), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, SDEFunction{true, SciMLBase.FullSpecialize, typeof(f2_harmonic_iip), typeof(g_iip), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, typeof(g_iip), LinearAlgebra.UniformScaling{Bool}, Vector{Float64}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, typeof(g_iip), @Kwargs{}, Nothing}}}, Nothing}, Direct, CallbackSet{Tuple{ContinuousCallback{JumpProcesses.var"#175#177"{Int64}, JumpProcesses.var"#176#178"{TaskLocalRNG, Int64, VariableRateJump{typeof(rate), typeof(affect!), Nothing, Nothing, Nothing, Nothing, Float64, Int64}}, JumpProcesses.var"#176#178"{TaskLocalRNG, Int64, VariableRateJump{typeof(rate), typeof(affect!), Nothing, Nothing, Nothing, Nothing, Float64, Int64}}, typeof(SciMLBase.INITIALIZE_DEFAULT), typeof(SciMLBase.FINALIZE_DEFAULT), Float64, Int64, Rational{Int64}, Nothing, Int64}}, Tuple{}}, Nothing, Tuple{VariableRateJump{typeof(rate), typeof(affect!), Nothing, Nothing, Nothing, Nothing, Float64, Int64}}, Nothing, Nothing, TaskLocalRNG, @Kwargs{callback::Nothing}}, ::BAOAB{Int64}, ::Vararg{Any}; merge_callbacks::Bool, kwargshandle::Nothing, kwargs::@Kwargs{dt::Float64, save_noise::Bool})
   @ DiffEqBase C:\Users\42158\.julia\packages\DiffEqBase\SlYdg\src\solve.jl:489
 [5] init(::JumpProblem{true, SDEProblem{ExtendedJumpArray{Float64, 1, ArrayPartition{Float64, Tuple{Vector{Float64}, Vector{Float64}}}, Vector{Float64}}, Tuple{Float64, Float64}, true, SciMLBase.NullParameters, Nothing, SDEFunction{true, SciMLBase.FullSpecialize, JumpProcesses.var"#145#150"{Tuple{VariableRateJump{typeof(rate), typeof(affect!), Nothing, Nothing, Nothing, Nothing, Float64, Int64}}, DynamicalSDEFunction{true, SciMLBase.FullSpecialize, SDEFunction{true, SciMLBase.FullSpecialize, typeof(f1_harmonic_iip), typeof(g_iip), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, SDEFunction{true, SciMLBase.FullSpecialize, typeof(f2_harmonic_iip), typeof(g_iip), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, typeof(g_iip), LinearAlgebra.UniformScaling{Bool}, Vector{Float64}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}}, JumpProcesses.var"#147#152"{SDEProblem{ArrayPartition{Float64, Tuple{Vector{Float64}, Vector{Float64}}}, Tuple{Float64, Float64}, true, SciMLBase.NullParameters, Nothing, DynamicalSDEFunction{true, SciMLBase.FullSpecialize, SDEFunction{true, SciMLBase.FullSpecialize, typeof(f1_harmonic_iip), typeof(g_iip), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, SDEFunction{true, SciMLBase.FullSpecialize, typeof(f2_harmonic_iip), typeof(g_iip), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, typeof(g_iip), LinearAlgebra.UniformScaling{Bool}, Vector{Float64}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, typeof(g_iip), @Kwargs{}, Nothing}}, LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, JumpProcesses.var"#147#152"{SDEProblem{ArrayPartition{Float64, Tuple{Vector{Float64}, Vector{Float64}}}, Tuple{Float64, Float64}, true, SciMLBase.NullParameters, Nothing, DynamicalSDEFunction{true, SciMLBase.FullSpecialize, SDEFunction{true, SciMLBase.FullSpecialize, typeof(f1_harmonic_iip), typeof(g_iip), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, SDEFunction{true, SciMLBase.FullSpecialize, typeof(f2_harmonic_iip), typeof(g_iip), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, typeof(g_iip), LinearAlgebra.UniformScaling{Bool}, Vector{Float64}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, typeof(g_iip), @Kwargs{}, Nothing}}, @Kwargs{g::JumpProcesses.var"#147#152"{SDEProblem{ArrayPartition{Float64, Tuple{Vector{Float64}, Vector{Float64}}}, Tuple{Float64, Float64}, true, SciMLBase.NullParameters, Nothing, DynamicalSDEFunction{true, SciMLBase.FullSpecialize, SDEFunction{true, SciMLBase.FullSpecialize, typeof(f1_harmonic_iip), typeof(g_iip), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, SDEFunction{true, SciMLBase.FullSpecialize, typeof(f2_harmonic_iip), typeof(g_iip), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, typeof(g_iip), LinearAlgebra.UniformScaling{Bool}, Vector{Float64}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, typeof(g_iip), @Kwargs{}, Nothing}}}, Nothing}, Direct, CallbackSet{Tuple{ContinuousCallback{JumpProcesses.var"#175#177"{Int64}, JumpProcesses.var"#176#178"{TaskLocalRNG, Int64, VariableRateJump{typeof(rate), typeof(affect!), Nothing, Nothing, Nothing, Nothing, Float64, Int64}}, JumpProcesses.var"#176#178"{TaskLocalRNG, Int64, VariableRateJump{typeof(rate), typeof(affect!), Nothing, Nothing, Nothing, Nothing, Float64, Int64}}, typeof(SciMLBase.INITIALIZE_DEFAULT), typeof(SciMLBase.FINALIZE_DEFAULT), Float64, Int64, Rational{Int64}, Nothing, Int64}}, Tuple{}}, Nothing, Tuple{VariableRateJump{typeof(rate), typeof(affect!), Nothing, Nothing, Nothing, Nothing, Float64, Int64}}, Nothing, Nothing, TaskLocalRNG, @Kwargs{callback::Nothing}}, ::BAOAB{Int64}, ::Vararg{Any}; kwargs::@Kwargs{dt::Float64, save_noise::Bool})     
   @ DiffEqBase C:\Users\42158\.julia\packages\DiffEqBase\SlYdg\src\solve.jl:506
 [6] __solve(jump_prob::JumpProblem{true, SDEProblem{ExtendedJumpArray{Float64, 1, ArrayPartition{Float64, Tuple{Vector{Float64}, Vector{Float64}}}, Vector{Float64}}, Tuple{Float64, Float64}, true, SciMLBase.NullParameters, Nothing, SDEFunction{true, SciMLBase.FullSpecialize, JumpProcesses.var"#145#150"{Tuple{VariableRateJump{typeof(rate), typeof(affect!), Nothing, Nothing, Nothing, Nothing, Float64, Int64}}, DynamicalSDEFunction{true, SciMLBase.FullSpecialize, SDEFunction{true, SciMLBase.FullSpecialize, typeof(f1_harmonic_iip), typeof(g_iip), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, SDEFunction{true, SciMLBase.FullSpecialize, typeof(f2_harmonic_iip), typeof(g_iip), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, typeof(g_iip), LinearAlgebra.UniformScaling{Bool}, Vector{Float64}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}}, JumpProcesses.var"#147#152"{SDEProblem{ArrayPartition{Float64, Tuple{Vector{Float64}, Vector{Float64}}}, Tuple{Float64, Float64}, true, SciMLBase.NullParameters, Nothing, DynamicalSDEFunction{true, SciMLBase.FullSpecialize, SDEFunction{true, SciMLBase.FullSpecialize, typeof(f1_harmonic_iip), typeof(g_iip), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, SDEFunction{true, SciMLBase.FullSpecialize, typeof(f2_harmonic_iip), typeof(g_iip), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, typeof(g_iip), LinearAlgebra.UniformScaling{Bool}, Vector{Float64}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, typeof(g_iip), @Kwargs{}, Nothing}}, LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, JumpProcesses.var"#147#152"{SDEProblem{ArrayPartition{Float64, Tuple{Vector{Float64}, Vector{Float64}}}, Tuple{Float64, Float64}, true, SciMLBase.NullParameters, Nothing, DynamicalSDEFunction{true, SciMLBase.FullSpecialize, SDEFunction{true, SciMLBase.FullSpecialize, typeof(f1_harmonic_iip), typeof(g_iip), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, SDEFunction{true, SciMLBase.FullSpecialize, typeof(f2_harmonic_iip), typeof(g_iip), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, typeof(g_iip), LinearAlgebra.UniformScaling{Bool}, Vector{Float64}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, typeof(g_iip), @Kwargs{}, Nothing}}, @Kwargs{g::JumpProcesses.var"#147#152"{SDEProblem{ArrayPartition{Float64, Tuple{Vector{Float64}, Vector{Float64}}}, Tuple{Float64, Float64}, true, SciMLBase.NullParameters, Nothing, DynamicalSDEFunction{true, SciMLBase.FullSpecialize, SDEFunction{true, SciMLBase.FullSpecialize, typeof(f1_harmonic_iip), typeof(g_iip), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, SDEFunction{true, SciMLBase.FullSpecialize, typeof(f2_harmonic_iip), typeof(g_iip), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, typeof(g_iip), LinearAlgebra.UniformScaling{Bool}, Vector{Float64}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, typeof(g_iip), @Kwargs{}, Nothing}}}, Nothing}, Direct, CallbackSet{Tuple{ContinuousCallback{JumpProcesses.var"#175#177"{Int64}, JumpProcesses.var"#176#178"{TaskLocalRNG, Int64, VariableRateJump{typeof(rate), typeof(affect!), Nothing, Nothing, Nothing, Nothing, Float64, Int64}}, JumpProcesses.var"#176#178"{TaskLocalRNG, Int64, VariableRateJump{typeof(rate), typeof(affect!), Nothing, Nothing, Nothing, Nothing, Float64, Int64}}, typeof(SciMLBase.INITIALIZE_DEFAULT), typeof(SciMLBase.FINALIZE_DEFAULT), Float64, Int64, Rational{Int64}, Nothing, Int64}}, Tuple{}}, Nothing, Tuple{VariableRateJump{typeof(rate), typeof(affect!), Nothing, Nothing, Nothing, Nothing, Float64, Int64}}, Nothing, Nothing, TaskLocalRNG, @Kwargs{callback::Nothing}}, alg::BAOAB{Int64}, timeseries::Vector{Any}, ts::Vector{Any}, ks::Vector{Any}, recompile::Type{Val{true}}; kwargs::@Kwargs{dt::Float64, save_noise::Bool})
   @ JumpProcesses C:\Users\42158\.julia\packages\JumpProcesses\kKbII\src\solve.jl:5
 [7] solve(prob::JumpProblem{true, SDEProblem{ExtendedJumpArray{Float64, 1, ArrayPartition{Float64, Tuple{Vector{Float64}, Vector{Float64}}}, Vector{Float64}}, Tuple{Float64, Float64}, true, SciMLBase.NullParameters, Nothing, SDEFunction{true, SciMLBase.FullSpecialize, JumpProcesses.var"#145#150"{Tuple{VariableRateJump{typeof(rate), typeof(affect!), Nothing, Nothing, Nothing, Nothing, Float64, Int64}}, DynamicalSDEFunction{true, SciMLBase.FullSpecialize, SDEFunction{true, SciMLBase.FullSpecialize, typeof(f1_harmonic_iip), typeof(g_iip), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, SDEFunction{true, SciMLBase.FullSpecialize, typeof(f2_harmonic_iip), typeof(g_iip), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, typeof(g_iip), LinearAlgebra.UniformScaling{Bool}, Vector{Float64}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}}, JumpProcesses.var"#147#152"{SDEProblem{ArrayPartition{Float64, Tuple{Vector{Float64}, Vector{Float64}}}, Tuple{Float64, Float64}, true, SciMLBase.NullParameters, Nothing, DynamicalSDEFunction{true, SciMLBase.FullSpecialize, SDEFunction{true, SciMLBase.FullSpecialize, typeof(f1_harmonic_iip), typeof(g_iip), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, SDEFunction{true, SciMLBase.FullSpecialize, typeof(f2_harmonic_iip), typeof(g_iip), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, typeof(g_iip), LinearAlgebra.UniformScaling{Bool}, Vector{Float64}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, typeof(g_iip), @Kwargs{}, Nothing}}, LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, JumpProcesses.var"#147#152"{SDEProblem{ArrayPartition{Float64, Tuple{Vector{Float64}, Vector{Float64}}}, Tuple{Float64, Float64}, true, SciMLBase.NullParameters, Nothing, DynamicalSDEFunction{true, SciMLBase.FullSpecialize, SDEFunction{true, SciMLBase.FullSpecialize, typeof(f1_harmonic_iip), typeof(g_iip), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, SDEFunction{true, SciMLBase.FullSpecialize, typeof(f2_harmonic_iip), typeof(g_iip), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, typeof(g_iip), LinearAlgebra.UniformScaling{Bool}, Vector{Float64}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, typeof(g_iip), @Kwargs{}, Nothing}}, @Kwargs{g::JumpProcesses.var"#147#152"{SDEProblem{ArrayPartition{Float64, Tuple{Vector{Float64}, Vector{Float64}}}, Tuple{Float64, Float64}, true, SciMLBase.NullParameters, Nothing, DynamicalSDEFunction{true, SciMLBase.FullSpecialize, SDEFunction{true, SciMLBase.FullSpecialize, typeof(f1_harmonic_iip), typeof(g_iip), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, SDEFunction{true, SciMLBase.FullSpecialize, typeof(f2_harmonic_iip), typeof(g_iip), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, typeof(g_iip), LinearAlgebra.UniformScaling{Bool}, Vector{Float64}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, typeof(g_iip), @Kwargs{}, Nothing}}}, Nothing}, Direct, CallbackSet{Tuple{ContinuousCallback{JumpProcesses.var"#175#177"{Int64}, JumpProcesses.var"#176#178"{TaskLocalRNG, Int64, VariableRateJump{typeof(rate), typeof(affect!), Nothing, Nothing, Nothing, Nothing, Float64, Int64}}, JumpProcesses.var"#176#178"{TaskLocalRNG, Int64, VariableRateJump{typeof(rate), typeof(affect!), Nothing, Nothing, Nothing, Nothing, Float64, Int64}}, typeof(SciMLBase.INITIALIZE_DEFAULT), typeof(SciMLBase.FINALIZE_DEFAULT), Float64, Int64, Rational{Int64}, Nothing, Int64}}, Tuple{}}, Nothing, Tuple{VariableRateJump{typeof(rate), typeof(affect!), Nothing, Nothing, Nothing, Nothing, Float64, Int64}}, Nothing, Nothing, TaskLocalRNG, @Kwargs{callback::Nothing}}, args::BAOAB{Int64}; kwargs::@Kwargs{dt::Float64, save_noise::Bool})
   @ DiffEqBase C:\Users\42158\.julia\packages\DiffEqBase\SlYdg\src\solve.jl:1039
 [8] top-level scope
   @ c:\Users\42158\Documents\PhD-projects\wire-mediated coupling\Scripts\jump_debug.jl:26
@Lightup1 Lightup1 added the bug label Nov 29, 2023
@Lightup1 Lightup1 changed the title Dynamical ODEs and SDEs fail when they are combined with VariableRateJump. Dynamical ODE and SDE solvers fail when they are combined with VariableRateJump. Nov 29, 2023
@ChrisRackauckas
Copy link
Member

This seems somewhat fundamental. At a programming level what's going on is that the array type is then wrapped in a ExtendedJumpArray when it's a variable rate jump of this form. However, dynamical ODEs want a partitionedarray, and so the ExtendedJumpArray{PartitionedArray{Array}} isn't hitting the right dispatches. One may thing you can fix this by just fixing the dispatches it would hit, but the issue there is that the ExtendedJumpArray is adding ODEs to the system which aren't quite part of the dynamical structure, so there isn't a clean way to map it to the partitionedarray.

There are two ways to do this. One, the way that should be recommended, is just use Coevolve which does the variable rate jumps by rejection instead of extension, and thus the problem is immediately gone.

What would need to be done here is that the variable rate jump method should do an implementation via callback like https://docs.sciml.ai/DiffEqCallbacks/stable/integrating/.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants