JumpProcesses.jl
JumpProcesses.jl copied to clipboard
Provide integrator interface for getting aliased u with ExtendedJumpArrays
Here is the code:
using DifferentialEquations
function f(du,u,p,t)
du[1] = u[1]
end
function affect!(integrator)
#print(typeof(integrator.u))
integrator.u = [0.0, 1.0]
end
function main()
x₀ = [1.0, 2.0]
prob = ODEProblem(f, x₀ ,(0.0,10.0))
rate(u,p,t) = u[1]
jump = VariableRateJump(rate,affect!)
jump_prob = JumpProblem(prob,Direct(),jump)
sol = solve(jump_prob,Tsit5())
end
main()
And the error:
ERROR: MethodError: Cannot `convert` an object of type Vector{Float64} to an object of type ExtendedJumpArray{Float64, 1, Vector{Float64}, Vector{Float64}}
Closest candidates are:
convert(::Type{T}, ::LinearAlgebra.Factorization) where T<:AbstractArray at E:\Julia-1.7.2\share\julia\stdlib\v1.7\LinearAlgebra\src\factorization.jl:58
convert(::Type{T}, ::T) where T<:AbstractArray at E:\Julia-1.7.2\share\julia\base\abstractarray.jl:16
convert(::Type{T}, ::T) where T at E:\Julia-1.7.2\share\julia\base\essentials.jl:218
...
Stacktrace:
[1] setproperty!(x::OrdinaryDiffEq.ODEIntegrator{Tsit5{typeof(OrdinaryDiffEq.trivial_limiter!), typeof(OrdinaryDiffEq.trivial_limiter!), Static.False}, true, ExtendedJumpArray{Float64, 1, Vector{Float64}, Vector{Float64}}, Nothing, Float64, SciMLBase.NullParameters, Float64, Float64, Float64, Float64, Vector{ExtendedJumpArray{Float64, 1, Vector{Float64}, Vector{Float64}}}, ODESolution{Float64, 2, Vector{ExtendedJumpArray{Float64, 1, Vector{Float64}, Vector{Float64}}}, Nothing, Nothing, Vector{Float64}, Vector{Vector{ExtendedJumpArray{Float64, 1, Vector{Float64}, Vector{Float64}}}}, ODEProblem{ExtendedJumpArray{Float64, 1, Vector{Float64}, Vector{Float64}}, Tuple{Float64, Float64}, true, SciMLBase.NullParameters, ODEFunction{true, DiffEqJump.var"#jump_f#132"{ODEProblem{Vector{Float64}, Tuple{Float64, Float64}, true, SciMLBase.NullParameters, ODEFunction{true, typeof(f), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, SciMLBase.StandardODEProblem}, JumpSet{Tuple{VariableRateJump{var"#rate#12", typeof(affect!), Nothing, Float64, Int64}}, Tuple{}, Nothing, Nothing}}, LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, SciMLBase.StandardODEProblem}, Tsit5{typeof(OrdinaryDiffEq.trivial_limiter!), typeof(OrdinaryDiffEq.trivial_limiter!), Static.False}, OrdinaryDiffEq.InterpolationData{ODEFunction{true, DiffEqJump.var"#jump_f#132"{ODEProblem{Vector{Float64}, Tuple{Float64, Float64}, true, SciMLBase.NullParameters, ODEFunction{true, typeof(f), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, SciMLBase.StandardODEProblem}, JumpSet{Tuple{VariableRateJump{var"#rate#12", typeof(affect!), Nothing, Float64, Int64}}, Tuple{}, Nothing, Nothing}}, LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing,
Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Vector{ExtendedJumpArray{Float64, 1, Vector{Float64}, Vector{Float64}}}, Vector{Float64}, Vector{Vector{ExtendedJumpArray{Float64, 1, Vector{Float64}, Vector{Float64}}}}, OrdinaryDiffEq.Tsit5Cache{ExtendedJumpArray{Float64, 1, Vector{Float64}, Vector{Float64}}, ExtendedJumpArray{Float64, 1, Vector{Float64}, Vector{Float64}}, ExtendedJumpArray{Float64, 1, Vector{Float64}, Vector{Float64}}, OrdinaryDiffEq.Tsit5ConstantCache{Float64, Float64}, typeof(OrdinaryDiffEq.trivial_limiter!), typeof(OrdinaryDiffEq.trivial_limiter!), Static.False}}, DiffEqBase.DEStats}, ODEFunction{true, DiffEqJump.var"#jump_f#132"{ODEProblem{Vector{Float64}, Tuple{Float64, Float64}, true, SciMLBase.NullParameters, ODEFunction{true, typeof(f), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, SciMLBase.StandardODEProblem}, JumpSet{Tuple{VariableRateJump{var"#rate#12", typeof(affect!), Nothing, Float64, Int64}}, Tuple{}, Nothing, Nothing}}, LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, OrdinaryDiffEq.Tsit5Cache{ExtendedJumpArray{Float64, 1, Vector{Float64}, Vector{Float64}}, ExtendedJumpArray{Float64, 1, Vector{Float64}, Vector{Float64}}, ExtendedJumpArray{Float64, 1, Vector{Float64}, Vector{Float64}}, OrdinaryDiffEq.Tsit5ConstantCache{Float64, 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{ContinuousCallback{DiffEqJump.var"#158#160"{Int64}, DiffEqJump.var"#159#161"{Random.TaskLocalRNG, Int64, VariableRateJump{var"#rate#12", typeof(affect!), Nothing, Float64, Int64}}, DiffEqJump.var"#159#161"{Random.TaskLocalRNG, Int64, VariableRateJump{var"#rate#12", typeof(affect!), Nothing, Float64, Int64}}, typeof(SciMLBase.INITIALIZE_DEFAULT), typeof(SciMLBase.FINALIZE_DEFAULT), Float64, Int64, Rational{Int64}, Nothing, Int64}}, 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{}}, ExtendedJumpArray{Float64, 1, Vector{Float64}, Vector{Float64}}, Float64, Nothing, OrdinaryDiffEq.DefaultInit}, f::Symbol, v::Vector{Float64})
@ Base .\Base.jl:43
[2] affect!(integrator::OrdinaryDiffEq.ODEIntegrator{Tsit5{typeof(OrdinaryDiffEq.trivial_limiter!), typeof(OrdinaryDiffEq.trivial_limiter!), Static.False}, true, ExtendedJumpArray{Float64, 1, Vector{Float64}, Vector{Float64}}, Nothing, Float64, SciMLBase.NullParameters, Float64, Float64, Float64, Float64, Vector{ExtendedJumpArray{Float64, 1, Vector{Float64}, Vector{Float64}}}, ODESolution{Float64, 2, Vector{ExtendedJumpArray{Float64, 1, Vector{Float64}, Vector{Float64}}}, Nothing, Nothing, Vector{Float64}, Vector{Vector{ExtendedJumpArray{Float64, 1, Vector{Float64}, Vector{Float64}}}}, ODEProblem{ExtendedJumpArray{Float64, 1, Vector{Float64}, Vector{Float64}}, Tuple{Float64, Float64}, true, SciMLBase.NullParameters, ODEFunction{true, DiffEqJump.var"#jump_f#132"{ODEProblem{Vector{Float64}, Tuple{Float64, Float64}, true, SciMLBase.NullParameters, ODEFunction{true, typeof(f), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, SciMLBase.StandardODEProblem}, JumpSet{Tuple{VariableRateJump{var"#rate#12", typeof(affect!), Nothing, Float64, Int64}}, Tuple{}, Nothing, Nothing}}, LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, SciMLBase.StandardODEProblem}, Tsit5{typeof(OrdinaryDiffEq.trivial_limiter!), typeof(OrdinaryDiffEq.trivial_limiter!), Static.False}, OrdinaryDiffEq.InterpolationData{ODEFunction{true, DiffEqJump.var"#jump_f#132"{ODEProblem{Vector{Float64}, Tuple{Float64, Float64}, true, SciMLBase.NullParameters, ODEFunction{true, typeof(f), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, SciMLBase.StandardODEProblem}, JumpSet{Tuple{VariableRateJump{var"#rate#12", typeof(affect!), Nothing, Float64, Int64}}, Tuple{}, Nothing, Nothing}}, LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Vector{ExtendedJumpArray{Float64, 1, Vector{Float64}, Vector{Float64}}}, Vector{Float64}, Vector{Vector{ExtendedJumpArray{Float64, 1, Vector{Float64}, Vector{Float64}}}}, OrdinaryDiffEq.Tsit5Cache{ExtendedJumpArray{Float64, 1, Vector{Float64}, Vector{Float64}}, ExtendedJumpArray{Float64, 1, Vector{Float64}, Vector{Float64}}, ExtendedJumpArray{Float64, 1,
Vector{Float64}, Vector{Float64}}, OrdinaryDiffEq.Tsit5ConstantCache{Float64, Float64}, typeof(OrdinaryDiffEq.trivial_limiter!), typeof(OrdinaryDiffEq.trivial_limiter!), Static.False}}, DiffEqBase.DEStats}, ODEFunction{true, DiffEqJump.var"#jump_f#132"{ODEProblem{Vector{Float64}, Tuple{Float64, Float64}, true, SciMLBase.NullParameters, ODEFunction{true, typeof(f), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, SciMLBase.StandardODEProblem},
JumpSet{Tuple{VariableRateJump{var"#rate#12", typeof(affect!), Nothing, Float64, Int64}}, Tuple{}, Nothing, Nothing}}, LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, OrdinaryDiffEq.Tsit5Cache{ExtendedJumpArray{Float64, 1, Vector{Float64}, Vector{Float64}}, ExtendedJumpArray{Float64, 1, Vector{Float64}, Vector{Float64}}, ExtendedJumpArray{Float64, 1, Vector{Float64}, Vector{Float64}}, OrdinaryDiffEq.Tsit5ConstantCache{Float64, 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{ContinuousCallback{DiffEqJump.var"#158#160"{Int64}, DiffEqJump.var"#159#161"{Random.TaskLocalRNG, Int64, VariableRateJump{var"#rate#12", typeof(affect!), Nothing, Float64, Int64}}, DiffEqJump.var"#159#161"{Random.TaskLocalRNG, Int64, VariableRateJump{var"#rate#12", typeof(affect!), Nothing, Float64, Int64}}, typeof(SciMLBase.INITIALIZE_DEFAULT), typeof(SciMLBase.FINALIZE_DEFAULT), Float64, Int64, Rational{Int64}, Nothing, Int64}}, 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{}}, ExtendedJumpArray{Float64, 1, Vector{Float64}, Vector{Float64}}, Float64, Nothing, OrdinaryDiffEq.DefaultInit})
@ Main e:\KouluHommia\Gradu\Koodeja\JumpShouldWorkExample.jl:9
[3] (::DiffEqJump.var"#159#161"{Random.TaskLocalRNG, Int64, VariableRateJump{var"#rate#12", typeof(affect!), Nothing, Float64, Int64}})(integrator::OrdinaryDiffEq.ODEIntegrator{Tsit5{typeof(OrdinaryDiffEq.trivial_limiter!), typeof(OrdinaryDiffEq.trivial_limiter!), Static.False}, true, ExtendedJumpArray{Float64, 1, Vector{Float64}, Vector{Float64}}, Nothing, Float64, SciMLBase.NullParameters, Float64, Float64, Float64, Float64, Vector{ExtendedJumpArray{Float64, 1, Vector{Float64}, Vector{Float64}}}, ODESolution{Float64, 2, Vector{ExtendedJumpArray{Float64, 1, Vector{Float64}, Vector{Float64}}}, Nothing, Nothing, Vector{Float64}, Vector{Vector{ExtendedJumpArray{Float64, 1, Vector{Float64}, Vector{Float64}}}}, ODEProblem{ExtendedJumpArray{Float64, 1, Vector{Float64}, Vector{Float64}}, Tuple{Float64, Float64}, true, SciMLBase.NullParameters, ODEFunction{true, DiffEqJump.var"#jump_f#132"{ODEProblem{Vector{Float64}, Tuple{Float64, Float64}, true, SciMLBase.NullParameters, ODEFunction{true, typeof(f), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, SciMLBase.StandardODEProblem}, JumpSet{Tuple{VariableRateJump{var"#rate#12", typeof(affect!), Nothing, Float64, Int64}}, Tuple{}, Nothing, Nothing}}, LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, SciMLBase.StandardODEProblem}, Tsit5{typeof(OrdinaryDiffEq.trivial_limiter!), typeof(OrdinaryDiffEq.trivial_limiter!), Static.False}, OrdinaryDiffEq.InterpolationData{ODEFunction{true, DiffEqJump.var"#jump_f#132"{ODEProblem{Vector{Float64}, Tuple{Float64, Float64}, true, SciMLBase.NullParameters, ODEFunction{true, typeof(f), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, SciMLBase.StandardODEProblem}, JumpSet{Tuple{VariableRateJump{var"#rate#12", typeof(affect!), Nothing, Float64, Int64}}, Tuple{}, Nothing,
Nothing}}, LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Vector{ExtendedJumpArray{Float64, 1, Vector{Float64}, Vector{Float64}}}, Vector{Float64}, Vector{Vector{ExtendedJumpArray{Float64, 1, Vector{Float64}, Vector{Float64}}}}, OrdinaryDiffEq.Tsit5Cache{ExtendedJumpArray{Float64, 1, Vector{Float64}, Vector{Float64}}, ExtendedJumpArray{Float64, 1, Vector{Float64}, Vector{Float64}}, ExtendedJumpArray{Float64, 1, Vector{Float64}, Vector{Float64}}, OrdinaryDiffEq.Tsit5ConstantCache{Float64, Float64}, typeof(OrdinaryDiffEq.trivial_limiter!), typeof(OrdinaryDiffEq.trivial_limiter!), Static.False}}, DiffEqBase.DEStats}, ODEFunction{true, DiffEqJump.var"#jump_f#132"{ODEProblem{Vector{Float64}, Tuple{Float64, Float64}, true, SciMLBase.NullParameters, ODEFunction{true, typeof(f), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, SciMLBase.StandardODEProblem}, JumpSet{Tuple{VariableRateJump{var"#rate#12", typeof(affect!), Nothing, Float64, Int64}}, Tuple{}, Nothing, Nothing}}, LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, OrdinaryDiffEq.Tsit5Cache{ExtendedJumpArray{Float64, 1, Vector{Float64}, Vector{Float64}}, ExtendedJumpArray{Float64, 1, Vector{Float64}, Vector{Float64}}, ExtendedJumpArray{Float64, 1, Vector{Float64}, Vector{Float64}}, OrdinaryDiffEq.Tsit5ConstantCache{Float64, 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{ContinuousCallback{DiffEqJump.var"#158#160"{Int64}, DiffEqJump.var"#159#161"{Random.TaskLocalRNG, Int64, VariableRateJump{var"#rate#12", typeof(affect!), Nothing, Float64, Int64}}, DiffEqJump.var"#159#161"{Random.TaskLocalRNG, Int64, VariableRateJump{var"#rate#12", typeof(affect!), Nothing, Float64, Int64}}, typeof(SciMLBase.INITIALIZE_DEFAULT), typeof(SciMLBase.FINALIZE_DEFAULT), Float64, Int64, Rational{Int64}, Nothing, Int64}}, 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{}}, ExtendedJumpArray{Float64, 1, Vector{Float64}, Vector{Float64}}, Float64, Nothing, OrdinaryDiffEq.DefaultInit})
@ DiffEqJump C:\Users\Work\.julia\packages\DiffEqJump\09ATD\src\problem.jl:265
[4] apply_callback!(integrator::OrdinaryDiffEq.ODEIntegrator{Tsit5{typeof(OrdinaryDiffEq.trivial_limiter!), typeof(OrdinaryDiffEq.trivial_limiter!), Static.False}, true, ExtendedJumpArray{Float64, 1, Vector{Float64}, Vector{Float64}}, Nothing, Float64, SciMLBase.NullParameters, Float64, Float64, Float64, Float64, Vector{ExtendedJumpArray{Float64, 1, Vector{Float64}, Vector{Float64}}}, ODESolution{Float64, 2, Vector{ExtendedJumpArray{Float64, 1, Vector{Float64}, Vector{Float64}}}, Nothing, Nothing, Vector{Float64}, Vector{Vector{ExtendedJumpArray{Float64, 1, Vector{Float64}, Vector{Float64}}}}, ODEProblem{ExtendedJumpArray{Float64, 1, Vector{Float64}, Vector{Float64}}, Tuple{Float64, Float64}, true, SciMLBase.NullParameters, ODEFunction{true, DiffEqJump.var"#jump_f#132"{ODEProblem{Vector{Float64}, Tuple{Float64, Float64}, true, SciMLBase.NullParameters, ODEFunction{true, typeof(f), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, SciMLBase.StandardODEProblem}, JumpSet{Tuple{VariableRateJump{var"#rate#12", typeof(affect!), Nothing, Float64, Int64}}, Tuple{}, Nothing, Nothing}}, LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, SciMLBase.StandardODEProblem}, Tsit5{typeof(OrdinaryDiffEq.trivial_limiter!), typeof(OrdinaryDiffEq.trivial_limiter!), Static.False}, OrdinaryDiffEq.InterpolationData{ODEFunction{true, DiffEqJump.var"#jump_f#132"{ODEProblem{Vector{Float64}, Tuple{Float64, Float64}, true, SciMLBase.NullParameters, ODEFunction{true, typeof(f), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, SciMLBase.StandardODEProblem}, JumpSet{Tuple{VariableRateJump{var"#rate#12", typeof(affect!), Nothing, Float64, Int64}}, Tuple{}, Nothing, Nothing}}, LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Vector{ExtendedJumpArray{Float64, 1, Vector{Float64}, Vector{Float64}}}, Vector{Float64}, Vector{Vector{ExtendedJumpArray{Float64, 1, Vector{Float64}, Vector{Float64}}}}, OrdinaryDiffEq.Tsit5Cache{ExtendedJumpArray{Float64, 1, Vector{Float64}, Vector{Float64}}, ExtendedJumpArray{Float64, 1, Vector{Float64}, Vector{Float64}}, ExtendedJumpArray{Float64, 1, Vector{Float64}, Vector{Float64}}, OrdinaryDiffEq.Tsit5ConstantCache{Float64, Float64}, typeof(OrdinaryDiffEq.trivial_limiter!), typeof(OrdinaryDiffEq.trivial_limiter!), Static.False}}, DiffEqBase.DEStats}, ODEFunction{true, DiffEqJump.var"#jump_f#132"{ODEProblem{Vector{Float64}, Tuple{Float64, Float64}, true, SciMLBase.NullParameters, ODEFunction{true, typeof(f), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, SciMLBase.StandardODEProblem}, JumpSet{Tuple{VariableRateJump{var"#rate#12", typeof(affect!), Nothing, Float64, Int64}}, Tuple{}, Nothing, Nothing}}, LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing,
Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, OrdinaryDiffEq.Tsit5Cache{ExtendedJumpArray{Float64, 1, Vector{Float64}, Vector{Float64}}, ExtendedJumpArray{Float64, 1, Vector{Float64}, Vector{Float64}}, ExtendedJumpArray{Float64, 1, Vector{Float64}, Vector{Float64}}, OrdinaryDiffEq.Tsit5ConstantCache{Float64, 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{ContinuousCallback{DiffEqJump.var"#158#160"{Int64}, DiffEqJump.var"#159#161"{Random.TaskLocalRNG, Int64, VariableRateJump{var"#rate#12", typeof(affect!), Nothing, Float64, Int64}}, DiffEqJump.var"#159#161"{Random.TaskLocalRNG, Int64, VariableRateJump{var"#rate#12", typeof(affect!), Nothing, Float64, Int64}}, typeof(SciMLBase.INITIALIZE_DEFAULT), typeof(SciMLBase.FINALIZE_DEFAULT), Float64, Int64, Rational{Int64}, Nothing, Int64}}, 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{}}, ExtendedJumpArray{Float64, 1, Vector{Float64}, Vector{Float64}}, Float64, Nothing, OrdinaryDiffEq.DefaultInit}, callback::ContinuousCallback{DiffEqJump.var"#158#160"{Int64}, DiffEqJump.var"#159#161"{Random.TaskLocalRNG, Int64, VariableRateJump{var"#rate#12", typeof(affect!), Nothing, Float64, Int64}}, DiffEqJump.var"#159#161"{Random.TaskLocalRNG, Int64, VariableRateJump{var"#rate#12", typeof(affect!), Nothing, Float64, Int64}}, typeof(SciMLBase.INITIALIZE_DEFAULT), typeof(SciMLBase.FINALIZE_DEFAULT), Float64, Int64, Rational{Int64}, Nothing, Int64}, cb_time::Float64, prev_sign::Float64, event_idx::Int64)
@ DiffEqBase C:\Users\Work\.julia\packages\DiffEqBase\U3LtB\src\callbacks.jl:513
[5] handle_callbacks!
@ C:\Users\Work\.julia\packages\OrdinaryDiffEq\ZBye7\src\integrators\integrator_utils.jl:261 [inlined]
[6] _loopfooter!(integrator::OrdinaryDiffEq.ODEIntegrator{Tsit5{typeof(OrdinaryDiffEq.trivial_limiter!), typeof(OrdinaryDiffEq.trivial_limiter!), Static.False}, true, ExtendedJumpArray{Float64, 1, Vector{Float64}, Vector{Float64}}, Nothing, Float64, SciMLBase.NullParameters, Float64, Float64, Float64, Float64, Vector{ExtendedJumpArray{Float64, 1, Vector{Float64}, Vector{Float64}}}, ODESolution{Float64, 2, Vector{ExtendedJumpArray{Float64, 1, Vector{Float64}, Vector{Float64}}}, Nothing, Nothing, Vector{Float64}, Vector{Vector{ExtendedJumpArray{Float64, 1, Vector{Float64}, Vector{Float64}}}}, ODEProblem{ExtendedJumpArray{Float64, 1, Vector{Float64}, Vector{Float64}}, Tuple{Float64, Float64}, true, SciMLBase.NullParameters, ODEFunction{true, DiffEqJump.var"#jump_f#132"{ODEProblem{Vector{Float64}, Tuple{Float64, Float64}, true, SciMLBase.NullParameters, ODEFunction{true, typeof(f), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, SciMLBase.StandardODEProblem}, JumpSet{Tuple{VariableRateJump{var"#rate#12", typeof(affect!), Nothing, Float64, Int64}}, Tuple{}, Nothing, Nothing}}, LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, SciMLBase.StandardODEProblem}, Tsit5{typeof(OrdinaryDiffEq.trivial_limiter!), typeof(OrdinaryDiffEq.trivial_limiter!), Static.False}, OrdinaryDiffEq.InterpolationData{ODEFunction{true, DiffEqJump.var"#jump_f#132"{ODEProblem{Vector{Float64}, Tuple{Float64, Float64}, true, SciMLBase.NullParameters, ODEFunction{true, typeof(f), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, SciMLBase.StandardODEProblem}, JumpSet{Tuple{VariableRateJump{var"#rate#12", typeof(affect!), Nothing, Float64, Int64}}, Tuple{}, Nothing, Nothing}}, LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing,
Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Vector{ExtendedJumpArray{Float64, 1, Vector{Float64}, Vector{Float64}}}, Vector{Float64}, Vector{Vector{ExtendedJumpArray{Float64, 1, Vector{Float64}, Vector{Float64}}}}, OrdinaryDiffEq.Tsit5Cache{ExtendedJumpArray{Float64, 1, Vector{Float64}, Vector{Float64}}, ExtendedJumpArray{Float64, 1, Vector{Float64}, Vector{Float64}}, ExtendedJumpArray{Float64, 1, Vector{Float64}, Vector{Float64}}, OrdinaryDiffEq.Tsit5ConstantCache{Float64, Float64}, typeof(OrdinaryDiffEq.trivial_limiter!), typeof(OrdinaryDiffEq.trivial_limiter!), Static.False}}, DiffEqBase.DEStats}, ODEFunction{true, DiffEqJump.var"#jump_f#132"{ODEProblem{Vector{Float64}, Tuple{Float64, Float64}, true, SciMLBase.NullParameters, ODEFunction{true, typeof(f), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, SciMLBase.StandardODEProblem}, JumpSet{Tuple{VariableRateJump{var"#rate#12", typeof(affect!), Nothing, Float64, Int64}}, Tuple{}, Nothing, Nothing}}, LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, OrdinaryDiffEq.Tsit5Cache{ExtendedJumpArray{Float64, 1, Vector{Float64}, Vector{Float64}}, ExtendedJumpArray{Float64, 1, Vector{Float64}, Vector{Float64}}, ExtendedJumpArray{Float64, 1, Vector{Float64}, Vector{Float64}}, OrdinaryDiffEq.Tsit5ConstantCache{Float64, 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{ContinuousCallback{DiffEqJump.var"#158#160"{Int64}, DiffEqJump.var"#159#161"{Random.TaskLocalRNG, Int64, VariableRateJump{var"#rate#12", typeof(affect!), Nothing, Float64, Int64}}, DiffEqJump.var"#159#161"{Random.TaskLocalRNG, Int64, VariableRateJump{var"#rate#12", typeof(affect!), Nothing, Float64, Int64}}, typeof(SciMLBase.INITIALIZE_DEFAULT), typeof(SciMLBase.FINALIZE_DEFAULT), Float64, Int64, Rational{Int64}, Nothing, Int64}}, 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{}}, ExtendedJumpArray{Float64, 1, Vector{Float64}, Vector{Float64}}, Float64, Nothing, OrdinaryDiffEq.DefaultInit})
@ OrdinaryDiffEq C:\Users\Work\.julia\packages\OrdinaryDiffEq\ZBye7\src\integrators\integrator_utils.jl:208
[7] loopfooter!
@ C:\Users\Work\.julia\packages\OrdinaryDiffEq\ZBye7\src\integrators\integrator_utils.jl:170 [inlined]
[8] solve!(integrator::OrdinaryDiffEq.ODEIntegrator{Tsit5{typeof(OrdinaryDiffEq.trivial_limiter!), typeof(OrdinaryDiffEq.trivial_limiter!), Static.False}, true, ExtendedJumpArray{Float64, 1, Vector{Float64}, Vector{Float64}}, Nothing, Float64, SciMLBase.NullParameters, Float64, Float64, Float64, Float64, Vector{ExtendedJumpArray{Float64, 1, Vector{Float64}, Vector{Float64}}}, ODESolution{Float64, 2, Vector{ExtendedJumpArray{Float64, 1, Vector{Float64}, Vector{Float64}}}, Nothing, Nothing, Vector{Float64}, Vector{Vector{ExtendedJumpArray{Float64, 1, Vector{Float64}, Vector{Float64}}}}, ODEProblem{ExtendedJumpArray{Float64, 1, Vector{Float64}, Vector{Float64}}, Tuple{Float64, Float64}, true, SciMLBase.NullParameters, ODEFunction{true, DiffEqJump.var"#jump_f#132"{ODEProblem{Vector{Float64}, Tuple{Float64, Float64}, true, SciMLBase.NullParameters, ODEFunction{true, typeof(f), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, SciMLBase.StandardODEProblem}, JumpSet{Tuple{VariableRateJump{var"#rate#12", typeof(affect!), Nothing, Float64, Int64}}, Tuple{}, Nothing, Nothing}}, LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, SciMLBase.StandardODEProblem}, Tsit5{typeof(OrdinaryDiffEq.trivial_limiter!), typeof(OrdinaryDiffEq.trivial_limiter!), Static.False}, OrdinaryDiffEq.InterpolationData{ODEFunction{true, DiffEqJump.var"#jump_f#132"{ODEProblem{Vector{Float64}, Tuple{Float64, Float64}, true, SciMLBase.NullParameters, ODEFunction{true, typeof(f), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, SciMLBase.StandardODEProblem}, JumpSet{Tuple{VariableRateJump{var"#rate#12", typeof(affect!), Nothing, Float64, Int64}}, Tuple{}, Nothing, Nothing}}, LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Vector{ExtendedJumpArray{Float64, 1, Vector{Float64}, Vector{Float64}}}, Vector{Float64}, Vector{Vector{ExtendedJumpArray{Float64, 1, Vector{Float64}, Vector{Float64}}}}, OrdinaryDiffEq.Tsit5Cache{ExtendedJumpArray{Float64, 1, Vector{Float64}, Vector{Float64}}, ExtendedJumpArray{Float64, 1, Vector{Float64}, Vector{Float64}}, ExtendedJumpArray{Float64, 1, Vector{Float64}, Vector{Float64}}, OrdinaryDiffEq.Tsit5ConstantCache{Float64, Float64}, typeof(OrdinaryDiffEq.trivial_limiter!), typeof(OrdinaryDiffEq.trivial_limiter!), Static.False}}, DiffEqBase.DEStats}, ODEFunction{true, DiffEqJump.var"#jump_f#132"{ODEProblem{Vector{Float64}, Tuple{Float64, Float64}, true, SciMLBase.NullParameters, ODEFunction{true, typeof(f), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, SciMLBase.StandardODEProblem}, JumpSet{Tuple{VariableRateJump{var"#rate#12", typeof(affect!), Nothing, Float64, Int64}}, Tuple{}, Nothing, Nothing}}, LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing,
Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, OrdinaryDiffEq.Tsit5Cache{ExtendedJumpArray{Float64, 1, Vector{Float64}, Vector{Float64}}, ExtendedJumpArray{Float64, 1, Vector{Float64}, Vector{Float64}}, ExtendedJumpArray{Float64, 1, Vector{Float64}, Vector{Float64}}, OrdinaryDiffEq.Tsit5ConstantCache{Float64, 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{ContinuousCallback{DiffEqJump.var"#158#160"{Int64}, DiffEqJump.var"#159#161"{Random.TaskLocalRNG, Int64, VariableRateJump{var"#rate#12", typeof(affect!), Nothing, Float64, Int64}}, DiffEqJump.var"#159#161"{Random.TaskLocalRNG, Int64, VariableRateJump{var"#rate#12", typeof(affect!), Nothing, Float64, Int64}}, typeof(SciMLBase.INITIALIZE_DEFAULT), typeof(SciMLBase.FINALIZE_DEFAULT), Float64, Int64, Rational{Int64}, Nothing, Int64}}, 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{}}, ExtendedJumpArray{Float64, 1, Vector{Float64}, Vector{Float64}}, Float64, Nothing, OrdinaryDiffEq.DefaultInit})
@ OrdinaryDiffEq C:\Users\Work\.julia\packages\OrdinaryDiffEq\ZBye7\src\solve.jl:478
[9] __solve(jump_prob::JumpProblem{true, ODEProblem{ExtendedJumpArray{Float64, 1, Vector{Float64}, Vector{Float64}}, Tuple{Float64, Float64}, true, SciMLBase.NullParameters, ODEFunction{true, DiffEqJump.var"#jump_f#132"{ODEProblem{Vector{Float64}, Tuple{Float64, Float64}, true, SciMLBase.NullParameters, ODEFunction{true, typeof(f), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, SciMLBase.StandardODEProblem}, JumpSet{Tuple{VariableRateJump{var"#rate#12", typeof(affect!), Nothing, Float64, Int64}}, Tuple{}, Nothing, Nothing}}, LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, SciMLBase.StandardODEProblem}, Direct, CallbackSet{Tuple{ContinuousCallback{DiffEqJump.var"#158#160"{Int64}, DiffEqJump.var"#159#161"{Random.TaskLocalRNG, Int64, VariableRateJump{var"#rate#12", typeof(affect!), Nothing, Float64, Int64}}, DiffEqJump.var"#159#161"{Random.TaskLocalRNG, Int64, VariableRateJump{var"#rate#12", typeof(affect!), Nothing, Float64, Int64}}, typeof(SciMLBase.INITIALIZE_DEFAULT), typeof(SciMLBase.FINALIZE_DEFAULT), Float64, Int64, Rational{Int64}, Nothing, Int64}}, Tuple{}}, Nothing, Tuple{VariableRateJump{var"#rate#12", typeof(affect!), Nothing, Float64, Int64}}, Nothing, Nothing, Random.TaskLocalRNG}, alg::Tsit5{typeof(OrdinaryDiffEq.trivial_limiter!), typeof(OrdinaryDiffEq.trivial_limiter!), Static.False}, timeseries::Vector{Any}, ts::Vector{Any}, ks::Vector{Any}, recompile::Type{Val{true}}; kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
@ DiffEqJump C:\Users\Work\.julia\packages\DiffEqJump\09ATD\src\solve.jl:7
[10] __solve (repeats 5 times)
@ C:\Users\Work\.julia\packages\DiffEqJump\09ATD\src\solve.jl:6 [inlined]
[11] #solve#44
@ C:\Users\Work\.julia\packages\DiffEqBase\U3LtB\src\solve.jl:205 [inlined]
[12] solve(prob::JumpProblem{true, ODEProblem{ExtendedJumpArray{Float64, 1, Vector{Float64}, Vector{Float64}}, Tuple{Float64, Float64}, true, SciMLBase.NullParameters, ODEFunction{true, DiffEqJump.var"#jump_f#132"{ODEProblem{Vector{Float64}, Tuple{Float64, Float64}, true, SciMLBase.NullParameters, ODEFunction{true, typeof(f), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, SciMLBase.StandardODEProblem}, JumpSet{Tuple{VariableRateJump{var"#rate#12", typeof(affect!), Nothing, Float64, Int64}}, Tuple{}, Nothing, Nothing}}, LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, SciMLBase.StandardODEProblem}, Direct, CallbackSet{Tuple{ContinuousCallback{DiffEqJump.var"#158#160"{Int64}, DiffEqJump.var"#159#161"{Random.TaskLocalRNG, Int64, VariableRateJump{var"#rate#12", typeof(affect!), Nothing, Float64, Int64}}, DiffEqJump.var"#159#161"{Random.TaskLocalRNG, Int64, VariableRateJump{var"#rate#12", typeof(affect!), Nothing, Float64, Int64}}, typeof(SciMLBase.INITIALIZE_DEFAULT), typeof(SciMLBase.FINALIZE_DEFAULT), Float64, Int64, Rational{Int64}, Nothing, Int64}}, Tuple{}}, Nothing, Tuple{VariableRateJump{var"#rate#12", typeof(affect!), Nothing, Float64, Int64}}, Nothing, Nothing, Random.TaskLocalRNG}, args::Tsit5{typeof(OrdinaryDiffEq.trivial_limiter!), typeof(OrdinaryDiffEq.trivial_limiter!), Static.False})
@ DiffEqBase C:\Users\Work\.julia\packages\DiffEqBase\U3LtB\src\solve.jl:205
[13] main()
@ Main e:\KouluHommia\Gradu\Koodeja\JumpShouldWorkExample.jl:20
[14] top-level scope
@ e:\KouluHommia\Gradu\Koodeja\JumpShouldWorkExample.jl:24
If I change the type of the jump to ConstantRateJump
and print the type of integrator.u
in the function affect!
, I get Vector{Float64}
, but if the type of the jump is VariableRateJump
, then the type of intergrator.u
is ExtendedJumpArray{Float64, 1, Vector{Float64}, Vector{Float64}}
. Is this intented?
Try integrator.u.u
. For VariableRateJump
s we rewrap your u
in an ExtendedJumpArray
within the integrator (see here for the definition of ExtendedJumpArray
). You also probably need to use:
integrator.u.u .= [1.0,1.0]
so you aren't trying to actually change the array but just changing its values.
@ChrisRackauckas is there a standard interface to get u
from the integrator that we could point people to use so they don't have to know about the ExtendedJumpArray
?
I've updated the VariableRateJump
doc string and added one for ExtendedJumpArray
s to provide more info about this going forward. This should be in the next release.
I'll leave this issue open as we should also update the main tutorial and/or FAQ to explain a bit about this.
We might be able to overload getproperty
to handle this?
That would be breaking though right, since integrator.u.u
would no longer work if we set integrator.u
to return the ExtendedJumpArray
s u
field via dispatch? I'd be happy with such a change, but I guess that could mess up existing code of anyone who was using this (which is maybe no one)...
Reflecting about it more, I think we should add a getproperty
dispatch on DEIntegrator
with ExtendedJumpArray
s as the utype
, replacing integrator.u
with what is currently integrator.u.u
and adding integrator.jump_u
. It will be breaking, but makes more sense as most users will be expecting u
in their callbacks to be the solution anyways, but this still provides access to the jump rates for anyone that needs it. We can just make a breaking release then.
@isaacsas Thanks for your help! Changing it to integrator.u.u
fixes this issue. But, I have used saveat
in my code, which results in this issue. It could be that I don't need to have a saveat
in my code, at least the code runs if I remove it, but for some reason I don't get any jumps. I don't want to open an duplicate issue about this, what should I do?
Reflecting about it more, I think we should add a getproperty dispatch on DEIntegrator with ExtendedJumpArrays as the utype, replacing integrator.u with what is currently integrator.u.u and adding integrator.jump_u. It will be breaking, but makes more sense as most users will be expecting u in their callbacks to be the solution anyways, but this still provides access to the jump rates for anyone that needs it. We can just make a breaking release then.
Looking at this, it may be hard to support because the solvers always do integrator.u
, and so it would break them to do a getproperty overload unless every single internal usage was changed to a getfield. That would be a major change. For now, documentation is probably the right approach.
Which I guess would break the whole purpose of the ExtendedJumpArray
s, i.e. https://github.com/SciML/DiffEqJump.jl/blob/c66a4d9595813199f0e9e794d2d43880f25759eb/src/problem.jl#L189-L192
Otherwise, the solvers shouldn't really be making use of the ExtendedJumpArray
anywhere outside of DiffEqJump right? i.e. the type is really just for the modified ODE rhs and modified VariableRateJump
s callbacks.
@ttolppanen at this point I have to turn it over to @ChrisRackauckas as this is getting too much into the weeds of the general way that integrators and solution objects work across all of SciML, which is not something I'm particularly familiar with. Hopefully Chris has a suggestion for the saveat
issue.
@ChrisRackauckas just out of curiosity, would ArrayPartition
s or ComponentArray
s potentially work as a replacement to ExtendedJumpArray
s (i.e. have they gotten more development to make sure they work in solution objects?).
@ChrisRackauckas just out of curiosity, would ArrayPartitions or ComponentArrays potentially work as a replacement to ExtendedJumpArrays (i.e. have they gotten more development to make sure they work in solution objects?).
They just work fine. The issue is that they don't "hide" the extra pieces from the users. ExtendedJumpArray tries to omit the extra stuff every time you save or print one, which is what causes the issues. We may want to just go with the ComponentArray and just make it more explicit what transformation was done.
What about dropping the ExtendedJumpArrays, and instead building a functor with internal state for the jump_u
s that handles the ode rhs and callback functions?
it needs to act like an array for linear algebra to work.
I meant that the state in integrators and solution objects is just the user’s type. The functor is a wrapper that serves as the ODE’s internal rhs function, and the callbacks’ condition/affects, while storing the jump_u’s. Essentially a VariableJumpAggregation.
Then how does it participate in the broadcast and all of that in the ODE solving?
Ahh, got it. Right, the intensities won’t get automatically integrated by that approach.