Repository navigation
Closed
Description
Hi,
I tried to run a Jump DDE and, given the supreme coolness of DifferentialEquations.jl, I rather expected this to just work. However, it did not.
M(not)WE:
using DifferentialEquations
function dde(du, u, h, p, t)
du[1] = h(p, t-p[1], idxs=1)
end
h(p, t; kwargs...) = 0
p = [ 5.]
tspan = (0., 15)
u0 = [1.]
prob = DDEProblem(dde, u0, h, tspan, p)
### Add some Gillespie action
prod_rate(u,p,t) = (1 + 9 * u[1] / (5 + u[1]))/10
prod_affect!(i) = (i.u[1] += 1)
prod_jump = ConstantRateJump(prod_rate, prod_affect!)
deg_rate(u,p,t) = u[1]/10
deg_affect!(i) = (i.u[1] -= 1)
deg_jump = ConstantRateJump(deg_rate, deg_affect!)
jump_prob = JumpProblem(prob, Direct(), prod_jump, deg_jump)
sol = solve(jump_prob, MethodOfSteps(Tsit5()))MethodError: no method matching __init(::DDEProblem{Array{Float64,1},Tuple{Float64,Float64},Array{Any,1},Array{Any,1},true,Array{Float64,1},DDEFunction{true,typeof(dde),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},typeof(h),Nothing}, ::MethodOfSteps{Tsit5,Nothing,Nothing,Nothing,false}, ::Array{Any,1}, ::Array{Any,1}, ::Array{Any,1}, ::Type{Val{true}}; callback=CallbackSet{Tuple{},Tuple{DiscreteCallback{DiffEqJump.DirectJumpAggregation{Float64,MassActionJump{Array{Float64,1},Array{Array{Pair{Int64,Float64},1},1},Array{Array{Pair{Int64,Float64},1},1}},Tuple{typeof(prod_rate),typeof(deg_rate)},Tuple{typeof(prod_affect!),typeof(deg_affect!)},RandomNumbers.Xorshifts.Xoroshiro128Star},DiffEqJump.DirectJumpAggregation{Float64,MassActionJump{Array{Float64,1},Array{Array{Pair{Int64,Float64},1},1},Array{Array{Pair{Int64,Float64},1},1}},Tuple{typeof(prod_rate),typeof(deg_rate)},Tuple{typeof(prod_affect!),typeof(deg_affect!)},RandomNumbers.Xorshifts.Xoroshiro128Star},DiffEqJump.DirectJumpAggregation{Float64,MassActionJump{Array{Float64,1},Array{Array{Pair{Int64,Float64},1},1},Array{Array{Pair{Int64,Float64},1},1}},Tuple{typeof(prod_rate),typeof(deg_rate)},Tuple{typeof(prod_affect!),typeof(deg_affect!)},RandomNumbers.Xorshifts.Xoroshiro128Star}}}}((), (DiscreteCallback{DiffEqJump.DirectJumpAggregation{Float64,MassActionJump{Array{Float64,1},Array{Array{Pair{Int64,Float64},1},1},Array{Array{Pair{Int64,Float64},1},1}},Tuple{typeof(prod_rate),typeof(deg_rate)},Tuple{typeof(prod_affect!),typeof(deg_affect!)},RandomNumbers.Xorshifts.Xoroshiro128Star},DiffEqJump.DirectJumpAggregation{Float64,MassActionJump{Array{Float64,1},Array{Array{Pair{Int64,Float64},1},1},Array{Array{Pair{Int64,Float64},1},1}},Tuple{typeof(prod_rate),typeof(deg_rate)},Tuple{typeof(prod_affect!),typeof(deg_affect!)},RandomNumbers.Xorshifts.Xoroshiro128Star},DiffEqJump.DirectJumpAggregation{Float64,MassActionJump{Array{Float64,1},Array{Array{Pair{Int64,Float64},1},1},Array{Array{Pair{Int64,Float64},1},1}},Tuple{typeof(prod_rate),typeof(deg_rate)},Tuple{typeof(prod_affect!),typeof(deg_affect!)},RandomNumbers.Xorshifts.Xoroshiro128Star}}(DiffEqJump.DirectJumpAggregation{Float64,MassActionJump{Array{Float64,1},Array{Array{Pair{Int64,Float64},1},1},Array{Array{Pair{Int64,Float64},1},1}},Tuple{typeof(prod_rate),typeof(deg_rate)},Tuple{typeof(prod_affect!),typeof(deg_affect!)},RandomNumbers.Xorshifts.Xoroshiro128Star}(0, Inf, 15.0, [6.93198e-310, 6.93186e-310], 0.0, MassActionJump{Array{Float64,1},Array{Array{Pair{Int64,Float64},1},1},Array{Array{Pair{Int64,Float64},1},1}}(Float64[], Array{Pair{Int64,Float64},1}[], Array{Pair{Int64,Float64},1}[]), (prod_rate, deg_rate), (prod_affect!, deg_affect!), (true, true), RandomNumbers.Xorshifts.Xoroshiro128Star(0x388bd4d0a1d82370, 0x4a55a747b07e9e37)), DiffEqJump.DirectJumpAggregation{Float64,MassActionJump{Array{Float64,1},Array{Array{Pair{Int64,Float64},1},1},Array{Array{Pair{Int64,Float64},1},1}},Tuple{typeof(prod_rate),typeof(deg_rate)},Tuple{typeof(prod_affect!),typeof(deg_affect!)},RandomNumbers.Xorshifts.Xoroshiro128Star}(0, Inf, 15.0, [6.93198e-310, 6.93186e-310], 0.0, MassActionJump{Array{Float64,1},Array{Array{Pair{Int64,Float64},1},1},Array{Array{Pair{Int64,Float64},1},1}}(Float64[], Array{Pair{Int64,Float64},1}[], Array{Pair{Int64,Float64},1}[]), (prod_rate, deg_rate), (prod_affect!, deg_affect!), (true, true), RandomNumbers.Xorshifts.Xoroshiro128Star(0x388bd4d0a1d82370, 0x4a55a747b07e9e37)), DiffEqJump.DirectJumpAggregation{Float64,MassActionJump{Array{Float64,1},Array{Array{Pair{Int64,Float64},1},1},Array{Array{Pair{Int64,Float64},1},1}},Tuple{typeof(prod_rate),typeof(deg_rate)},Tuple{typeof(prod_affect!),typeof(deg_affect!)},RandomNumbers.Xorshifts.Xoroshiro128Star}(0, Inf, 15.0, [6.93198e-310, 6.93186e-310], 0.0, MassActionJump{Array{Float64,1},Array{Array{Pair{Int64,Float64},1},1},Array{Array{Pair{Int64,Float64},1},1}}(Float64[], Array{Pair{Int64,Float64},1}[], Array{Pair{Int64,Float64},1}[]), (prod_rate, deg_rate), (prod_affect!, deg_affect!), (true, true), RandomNumbers.Xorshifts.Xoroshiro128Star(0x388bd4d0a1d82370, 0x4a55a747b07e9e37)), Bool[true, true]),)))
Closest candidates are:
__init(::DiffEqBase.AbstractDDEProblem{uType,tupType,lType,iip}, ::algType<:DelayDiffEq.AbstractMethodOfStepsAlgorithm, ::Any, ::Any, ::Any; d_discontinuities, dtmax, dt, saveat, tstops, save_idxs, save_everystep, save_start, save_end, save_on, dense, minimal_solution, discontinuity_interp_points, discontinuity_abstol, discontinuity_reltol, initial_order, initialize_integrator, initialize_save, callback, alias_u0, kwargs...) where {uType, tupType, lType, iip, algType<:AbstractMethodOfStepsAlgorithm} at /home/Niklas/.julia/packages/DelayDiffEq/NcMLM/src/solve.jl:22
__init(!Matched::DiffEqBase.AbstractJumpProblem{P,J} where J, ::DiffEqBase.DEAlgorithm, ::Any, ::Any, ::Any, ::Type{Val{recompile_flag}}; callback, seed, kwargs...) where {P, recompile_flag} at /home/Niklas/.julia/packages/DiffEqJump/cDHIH/src/solve.jl:17
__init(!Matched::DiffEqBase.AbstractODEProblem, !Matched::algType<:OrdinaryDiffEqAlgorithm, ::Any, ::Any, ::Any, ::Type{Val{recompile_flag}}; saveat, tstops, d_discontinuities, save_idxs, save_everystep, save_timeseries, save_on, save_start, save_end, callback, dense, calck, dt, adaptive, gamma, abstol, reltol, qmax, qmin, qsteady_min, qsteady_max, qoldinit, fullnormalize, failfactor, beta2, beta1, maxiters, dtmax, dtmin, internalnorm, internalopnorm, isoutofdomain, unstable_check, verbose, force_dtmin, timeseries_errors, dense_errors, advance_to_tstop, stop_at_next_tstop, initialize_save, progress, progress_steps, progress_name, progress_message, userdata, allow_extrapolation, initialize_integrator, alias_u0, kwargs...) where {algType<:OrdinaryDiffEqAlgorithm, recompile_flag} at /home/Niklas/.julia/packages/OrdinaryDiffEq/TUKTm/src/solve.jl:62
...
Stacktrace:
[1] #init#455(::Base.Iterators.Pairs{Symbol,CallbackSet{Tuple{},Tuple{DiscreteCallback{DiffEqJump.DirectJumpAggregation{Float64,MassActionJump{Array{Float64,1},Array{Array{Pair{Int64,Float64},1},1},Array{Array{Pair{Int64,Float64},1},1}},Tuple{typeof(prod_rate),typeof(deg_rate)},Tuple{typeof(prod_affect!),typeof(deg_affect!)},RandomNumbers.Xorshifts.Xoroshiro128Star},DiffEqJump.DirectJumpAggregation{Float64,MassActionJump{Array{Float64,1},Array{Array{Pair{Int64,Float64},1},1},Array{Array{Pair{Int64,Float64},1},1}},Tuple{typeof(prod_rate),typeof(deg_rate)},Tuple{typeof(prod_affect!),typeof(deg_affect!)},RandomNumbers.Xorshifts.Xoroshiro128Star},DiffEqJump.DirectJumpAggregation{Float64,MassActionJump{Array{Float64,1},Array{Array{Pair{Int64,Float64},1},1},Array{Array{Pair{Int64,Float64},1},1}},Tuple{typeof(prod_rate),typeof(deg_rate)},Tuple{typeof(prod_affect!),typeof(deg_affect!)},RandomNumbers.Xorshifts.Xoroshiro128Star}}}},Tuple{Symbol},NamedTuple{(:callback,),Tuple{CallbackSet{Tuple{},Tuple{DiscreteCallback{DiffEqJump.DirectJumpAggregation{Float64,MassActionJump{Array{Float64,1},Array{Array{Pair{Int64,Float64},1},1},Array{Array{Pair{Int64,Float64},1},1}},Tuple{typeof(prod_rate),typeof(deg_rate)},Tuple{typeof(prod_affect!),typeof(deg_affect!)},RandomNumbers.Xorshifts.Xoroshiro128Star},DiffEqJump.DirectJumpAggregation{Float64,MassActionJump{Array{Float64,1},Array{Array{Pair{Int64,Float64},1},1},Array{Array{Pair{Int64,Float64},1},1}},Tuple{typeof(prod_rate),typeof(deg_rate)},Tuple{typeof(prod_affect!),typeof(deg_affect!)},RandomNumbers.Xorshifts.Xoroshiro128Star},DiffEqJump.DirectJumpAggregation{Float64,MassActionJump{Array{Float64,1},Array{Array{Pair{Int64,Float64},1},1},Array{Array{Pair{Int64,Float64},1},1}},Tuple{typeof(prod_rate),typeof(deg_rate)},Tuple{typeof(prod_affect!),typeof(deg_affect!)},RandomNumbers.Xorshifts.Xoroshiro128Star}}}}}}}, ::Function, ::DDEProblem{Array{Float64,1},Tuple{Float64,Float64},Array{Any,1},Array{Any,1},true,Array{Float64,1},DDEFunction{true,typeof(dde),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},typeof(h),Nothing}, ::MethodOfSteps{Tsit5,Nothing,Nothing,Nothing,false}, ::Vararg{Any,N} where N) at /home/Niklas/.julia/packages/DiffEqBase/6ewdP/src/solve.jl:20
[2] (::getfield(DiffEqBase, Symbol("#kw##init")))(::NamedTuple{(:callback,),Tuple{CallbackSet{Tuple{},Tuple{DiscreteCallback{DiffEqJump.DirectJumpAggregation{Float64,MassActionJump{Array{Float64,1},Array{Array{Pair{Int64,Float64},1},1},Array{Array{Pair{Int64,Float64},1},1}},Tuple{typeof(prod_rate),typeof(deg_rate)},Tuple{typeof(prod_affect!),typeof(deg_affect!)},RandomNumbers.Xorshifts.Xoroshiro128Star},DiffEqJump.DirectJumpAggregation{Float64,MassActionJump{Array{Float64,1},Array{Array{Pair{Int64,Float64},1},1},Array{Array{Pair{Int64,Float64},1},1}},Tuple{typeof(prod_rate),typeof(deg_rate)},Tuple{typeof(prod_affect!),typeof(deg_affect!)},RandomNumbers.Xorshifts.Xoroshiro128Star},DiffEqJump.DirectJumpAggregation{Float64,MassActionJump{Array{Float64,1},Array{Array{Pair{Int64,Float64},1},1},Array{Array{Pair{Int64,Float64},1},1}},Tuple{typeof(prod_rate),typeof(deg_rate)},Tuple{typeof(prod_affect!),typeof(deg_affect!)},RandomNumbers.Xorshifts.Xoroshiro128Star}}}}}}, ::typeof(init), ::DDEProblem{Array{Float64,1},Tuple{Float64,Float64},Array{Any,1},Array{Any,1},true,Array{Float64,1},DDEFunction{true,typeof(dde),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},typeof(h),Nothing}, ::MethodOfSteps{Tsit5,Nothing,Nothing,Nothing,false}, ::Array{Any,1}, ::Vararg{Any,N} where N) at ./none:0
[3] #__init#75(::Nothing, ::UInt64, ::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::Function, ::JumpProblem{DDEProblem{Array{Float64,1},Tuple{Float64,Float64},Array{Any,1},Array{Any,1},true,Array{Float64,1},DDEFunction{true,typeof(dde),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},typeof(h),Nothing},Direct,CallbackSet{Tuple{},Tuple{DiscreteCallback{DiffEqJump.DirectJumpAggregation{Float64,MassActionJump{Array{Float64,1},Array{Array{Pair{Int64,Float64},1},1},Array{Array{Pair{Int64,Float64},1},1}},Tuple{typeof(prod_rate),typeof(deg_rate)},Tuple{typeof(prod_affect!),typeof(deg_affect!)},RandomNumbers.Xorshifts.Xoroshiro128Star},DiffEqJump.DirectJumpAggregation{Float64,MassActionJump{Array{Float64,1},Array{Array{Pair{Int64,Float64},1},1},Array{Array{Pair{Int64,Float64},1},1}},Tuple{typeof(prod_rate),typeof(deg_rate)},Tuple{typeof(prod_affect!),typeof(deg_affect!)},RandomNumbers.Xorshifts.Xoroshiro128Star},DiffEqJump.DirectJumpAggregation{Float64,MassActionJump{Array{Float64,1},Array{Array{Pair{Int64,Float64},1},1},Array{Array{Pair{Int64,Float64},1},1}},Tuple{typeof(prod_rate),typeof(deg_rate)},Tuple{typeof(prod_affect!),typeof(deg_affect!)},RandomNumbers.Xorshifts.Xoroshiro128Star}}}},DiffEqJump.DirectJumpAggregation{Float64,MassActionJump{Array{Float64,1},Array{Array{Pair{Int64,Float64},1},1},Array{Array{Pair{Int64,Float64},1},1}},Tuple{typeof(prod_rate),typeof(deg_rate)},Tuple{typeof(prod_affect!),typeof(deg_affect!)},RandomNumbers.Xorshifts.Xoroshiro128Star},Tuple{},Nothing,Nothing}, ::MethodOfSteps{Tsit5,Nothing,Nothing,Nothing,false}, ::Array{Any,1}, ::Array{Any,1}, ::Array{Any,1}, ::Type{Val{true}}) at /home/Niklas/.julia/packages/DiffEqJump/cDHIH/src/solve.jl:20
[4] __init(::JumpProblem{DDEProblem{Array{Float64,1},Tuple{Float64,Float64},Array{Any,1},Array{Any,1},true,Array{Float64,1},DDEFunction{true,typeof(dde),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},typeof(h),Nothing},Direct,CallbackSet{Tuple{},Tuple{DiscreteCallback{DiffEqJump.DirectJumpAggregation{Float64,MassActionJump{Array{Float64,1},Array{Array{Pair{Int64,Float64},1},1},Array{Array{Pair{Int64,Float64},1},1}},Tuple{typeof(prod_rate),typeof(deg_rate)},Tuple{typeof(prod_affect!),typeof(deg_affect!)},RandomNumbers.Xorshifts.Xoroshiro128Star},DiffEqJump.DirectJumpAggregation{Float64,MassActionJump{Array{Float64,1},Array{Array{Pair{Int64,Float64},1},1},Array{Array{Pair{Int64,Float64},1},1}},Tuple{typeof(prod_rate),typeof(deg_rate)},Tuple{typeof(prod_affect!),typeof(deg_affect!)},RandomNumbers.Xorshifts.Xoroshiro128Star},DiffEqJump.DirectJumpAggregation{Float64,MassActionJump{Array{Float64,1},Array{Array{Pair{Int64,Float64},1},1},Array{Array{Pair{Int64,Float64},1},1}},Tuple{typeof(prod_rate),typeof(deg_rate)},Tuple{typeof(prod_affect!),typeof(deg_affect!)},RandomNumbers.Xorshifts.Xoroshiro128Star}}}},DiffEqJump.DirectJumpAggregation{Float64,MassActionJump{Array{Float64,1},Array{Array{Pair{Int64,Float64},1},1},Array{Array{Pair{Int64,Float64},1},1}},Tuple{typeof(prod_rate),typeof(deg_rate)},Tuple{typeof(prod_affect!),typeof(deg_affect!)},RandomNumbers.Xorshifts.Xoroshiro128Star},Tuple{},Nothing,Nothing}, ::MethodOfSteps{Tsit5,Nothing,Nothing,Nothing,false}, ::Array{Any,1}, ::Array{Any,1}, ::Array{Any,1}, ::Type{Val{true}}) at /home/Niklas/.julia/packages/DiffEqJump/cDHIH/src/solve.jl:17
[5] #init#455(::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::Function, ::JumpProblem{DDEProblem{Array{Float64,1},Tuple{Float64,Float64},Array{Any,1},Array{Any,1},true,Array{Float64,1},DDEFunction{true,typeof(dde),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},typeof(h),Nothing},Direct,CallbackSet{Tuple{},Tuple{DiscreteCallback{DiffEqJump.DirectJumpAggregation{Float64,MassActionJump{Array{Float64,1},Array{Array{Pair{Int64,Float64},1},1},Array{Array{Pair{Int64,Float64},1},1}},Tuple{typeof(prod_rate),typeof(deg_rate)},Tuple{typeof(prod_affect!),typeof(deg_affect!)},RandomNumbers.Xorshifts.Xoroshiro128Star},DiffEqJump.DirectJumpAggregation{Float64,MassActionJump{Array{Float64,1},Array{Array{Pair{Int64,Float64},1},1},Array{Array{Pair{Int64,Float64},1},1}},Tuple{typeof(prod_rate),typeof(deg_rate)},Tuple{typeof(prod_affect!),typeof(deg_affect!)},RandomNumbers.Xorshifts.Xoroshiro128Star},DiffEqJump.DirectJumpAggregation{Float64,MassActionJump{Array{Float64,1},Array{Array{Pair{Int64,Float64},1},1},Array{Array{Pair{Int64,Float64},1},1}},Tuple{typeof(prod_rate),typeof(deg_rate)},Tuple{typeof(prod_affect!),typeof(deg_affect!)},RandomNumbers.Xorshifts.Xoroshiro128Star}}}},DiffEqJump.DirectJumpAggregation{Float64,MassActionJump{Array{Float64,1},Array{Array{Pair{Int64,Float64},1},1},Array{Array{Pair{Int64,Float64},1},1}},Tuple{typeof(prod_rate),typeof(deg_rate)},Tuple{typeof(prod_affect!),typeof(deg_affect!)},RandomNumbers.Xorshifts.Xoroshiro128Star},Tuple{},Nothing,Nothing}, ::MethodOfSteps{Tsit5,Nothing,Nothing,Nothing,false}, ::Vararg{Any,N} where N) at /home/Niklas/.julia/packages/DiffEqBase/6ewdP/src/solve.jl:20
[6] init(::JumpProblem{DDEProblem{Array{Float64,1},Tuple{Float64,Float64},Array{Any,1},Array{Any,1},true,Array{Float64,1},DDEFunction{true,typeof(dde),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},typeof(h),Nothing},Direct,CallbackSet{Tuple{},Tuple{DiscreteCallback{DiffEqJump.DirectJumpAggregation{Float64,MassActionJump{Array{Float64,1},Array{Array{Pair{Int64,Float64},1},1},Array{Array{Pair{Int64,Float64},1},1}},Tuple{typeof(prod_rate),typeof(deg_rate)},Tuple{typeof(prod_affect!),typeof(deg_affect!)},RandomNumbers.Xorshifts.Xoroshiro128Star},DiffEqJump.DirectJumpAggregation{Float64,MassActionJump{Array{Float64,1},Array{Array{Pair{Int64,Float64},1},1},Array{Array{Pair{Int64,Float64},1},1}},Tuple{typeof(prod_rate),typeof(deg_rate)},Tuple{typeof(prod_affect!),typeof(deg_affect!)},RandomNumbers.Xorshifts.Xoroshiro128Star},DiffEqJump.DirectJumpAggregation{Float64,MassActionJump{Array{Float64,1},Array{Array{Pair{Int64,Float64},1},1},Array{Array{Pair{Int64,Float64},1},1}},Tuple{typeof(prod_rate),typeof(deg_rate)},Tuple{typeof(prod_affect!),typeof(deg_affect!)},RandomNumbers.Xorshifts.Xoroshiro128Star}}}},DiffEqJump.DirectJumpAggregation{Float64,MassActionJump{Array{Float64,1},Array{Array{Pair{Int64,Float64},1},1},Array{Array{Pair{Int64,Float64},1},1}},Tuple{typeof(prod_rate),typeof(deg_rate)},Tuple{typeof(prod_affect!),typeof(deg_affect!)},RandomNumbers.Xorshifts.Xoroshiro128Star},Tuple{},Nothing,Nothing}, ::MethodOfSteps{Tsit5,Nothing,Nothing,Nothing,false}, ::Array{Any,1}, ::Vararg{Any,N} where N) at /home/Niklas/.julia/packages/DiffEqBase/6ewdP/src/solve.jl:8
[7] #__solve#74(::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::Function, ::JumpProblem{DDEProblem{Array{Float64,1},Tuple{Float64,Float64},Array{Any,1},Array{Any,1},true,Array{Float64,1},DDEFunction{true,typeof(dde),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},typeof(h),Nothing},Direct,CallbackSet{Tuple{},Tuple{DiscreteCallback{DiffEqJump.DirectJumpAggregation{Float64,MassActionJump{Array{Float64,1},Array{Array{Pair{Int64,Float64},1},1},Array{Array{Pair{Int64,Float64},1},1}},Tuple{typeof(prod_rate),typeof(deg_rate)},Tuple{typeof(prod_affect!),typeof(deg_affect!)},RandomNumbers.Xorshifts.Xoroshiro128Star},DiffEqJump.DirectJumpAggregation{Float64,MassActionJump{Array{Float64,1},Array{Array{Pair{Int64,Float64},1},1},Array{Array{Pair{Int64,Float64},1},1}},Tuple{typeof(prod_rate),typeof(deg_rate)},Tuple{typeof(prod_affect!),typeof(deg_affect!)},RandomNumbers.Xorshifts.Xoroshiro128Star},DiffEqJump.DirectJumpAggregation{Float64,MassActionJump{Array{Float64,1},Array{Array{Pair{Int64,Float64},1},1},Array{Array{Pair{Int64,Float64},1},1}},Tuple{typeof(prod_rate),typeof(deg_rate)},Tuple{typeof(prod_affect!),typeof(deg_affect!)},RandomNumbers.Xorshifts.Xoroshiro128Star}}}},DiffEqJump.DirectJumpAggregation{Float64,MassActionJump{Array{Float64,1},Array{Array{Pair{Int64,Float64},1},1},Array{Array{Pair{Int64,Float64},1},1}},Tuple{typeof(prod_rate),typeof(deg_rate)},Tuple{typeof(prod_affect!),typeof(deg_affect!)},RandomNumbers.Xorshifts.Xoroshiro128Star},Tuple{},Nothing,Nothing}, ::MethodOfSteps{Tsit5,Nothing,Nothing,Nothing,false}, ::Array{Any,1}, ::Array{Any,1}, ::Array{Any,1}, ::Type{Val{true}}) at /home/Niklas/.julia/packages/DiffEqJump/cDHIH/src/solve.jl:6
[8] __solve(::JumpProblem{DDEProblem{Array{Float64,1},Tuple{Float64,Float64},Array{Any,1},Array{Any,1},true,Array{Float64,1},DDEFunction{true,typeof(dde),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},typeof(h),Nothing},Direct,CallbackSet{Tuple{},Tuple{DiscreteCallback{DiffEqJump.DirectJumpAggregation{Float64,MassActionJump{Array{Float64,1},Array{Array{Pair{Int64,Float64},1},1},Array{Array{Pair{Int64,Float64},1},1}},Tuple{typeof(prod_rate),typeof(deg_rate)},Tuple{typeof(prod_affect!),typeof(deg_affect!)},RandomNumbers.Xorshifts.Xoroshiro128Star},DiffEqJump.DirectJumpAggregation{Float64,MassActionJump{Array{Float64,1},Array{Array{Pair{Int64,Float64},1},1},Array{Array{Pair{Int64,Float64},1},1}},Tuple{typeof(prod_rate),typeof(deg_rate)},Tuple{typeof(prod_affect!),typeof(deg_affect!)},RandomNumbers.Xorshifts.Xoroshiro128Star},DiffEqJump.DirectJumpAggregation{Float64,MassActionJump{Array{Float64,1},Array{Array{Pair{Int64,Float64},1},1},Array{Array{Pair{Int64,Float64},1},1}},Tuple{typeof(prod_rate),typeof(deg_rate)},Tuple{typeof(prod_affect!),typeof(deg_affect!)},RandomNumbers.Xorshifts.Xoroshiro128Star}}}},DiffEqJump.DirectJumpAggregation{Float64,MassActionJump{Array{Float64,1},Array{Array{Pair{Int64,Float64},1},1},Array{Array{Pair{Int64,Float64},1},1}},Tuple{typeof(prod_rate),typeof(deg_rate)},Tuple{typeof(prod_affect!),typeof(deg_affect!)},RandomNumbers.Xorshifts.Xoroshiro128Star},Tuple{},Nothing,Nothing}, ::MethodOfSteps{Tsit5,Nothing,Nothing,Nothing,false}, ::Array{Any,1}, ::Array{Any,1}, ::Array{Any,1}, ::Type{Val{true}}) at /home/Niklas/.julia/packages/DiffEqJump/cDHIH/src/solve.jl:6 (repeats 5 times)
[9] #solve#456(::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::Function, ::JumpProblem{DDEProblem{Array{Float64,1},Tuple{Float64,Float64},Array{Any,1},Array{Any,1},true,Array{Float64,1},DDEFunction{true,typeof(dde),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},typeof(h),Nothing},Direct,CallbackSet{Tuple{},Tuple{DiscreteCallback{DiffEqJump.DirectJumpAggregation{Float64,MassActionJump{Array{Float64,1},Array{Array{Pair{Int64,Float64},1},1},Array{Array{Pair{Int64,Float64},1},1}},Tuple{typeof(prod_rate),typeof(deg_rate)},Tuple{typeof(prod_affect!),typeof(deg_affect!)},RandomNumbers.Xorshifts.Xoroshiro128Star},DiffEqJump.DirectJumpAggregation{Float64,MassActionJump{Array{Float64,1},Array{Array{Pair{Int64,Float64},1},1},Array{Array{Pair{Int64,Float64},1},1}},Tuple{typeof(prod_rate),typeof(deg_rate)},Tuple{typeof(prod_affect!),typeof(deg_affect!)},RandomNumbers.Xorshifts.Xoroshiro128Star},DiffEqJump.DirectJumpAggregation{Float64,MassActionJump{Array{Float64,1},Array{Array{Pair{Int64,Float64},1},1},Array{Array{Pair{Int64,Float64},1},1}},Tuple{typeof(prod_rate),typeof(deg_rate)},Tuple{typeof(prod_affect!),typeof(deg_affect!)},RandomNumbers.Xorshifts.Xoroshiro128Star}}}},DiffEqJump.DirectJumpAggregation{Float64,MassActionJump{Array{Float64,1},Array{Array{Pair{Int64,Float64},1},1},Array{Array{Pair{Int64,Float64},1},1}},Tuple{typeof(prod_rate),typeof(deg_rate)},Tuple{typeof(prod_affect!),typeof(deg_affect!)},RandomNumbers.Xorshifts.Xoroshiro128Star},Tuple{},Nothing,Nothing}, ::MethodOfSteps{Tsit5,Nothing,Nothing,Nothing,false}) at /home/Niklas/.julia/packages/DiffEqBase/6ewdP/src/solve.jl:39
[10] solve(::JumpProblem{DDEProblem{Array{Float64,1},Tuple{Float64,Float64},Array{Any,1},Array{Any,1},true,Array{Float64,1},DDEFunction{true,typeof(dde),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},typeof(h),Nothing},Direct,CallbackSet{Tuple{},Tuple{DiscreteCallback{DiffEqJump.DirectJumpAggregation{Float64,MassActionJump{Array{Float64,1},Array{Array{Pair{Int64,Float64},1},1},Array{Array{Pair{Int64,Float64},1},1}},Tuple{typeof(prod_rate),typeof(deg_rate)},Tuple{typeof(prod_affect!),typeof(deg_affect!)},RandomNumbers.Xorshifts.Xoroshiro128Star},DiffEqJump.DirectJumpAggregation{Float64,MassActionJump{Array{Float64,1},Array{Array{Pair{Int64,Float64},1},1},Array{Array{Pair{Int64,Float64},1},1}},Tuple{typeof(prod_rate),typeof(deg_rate)},Tuple{typeof(prod_affect!),typeof(deg_affect!)},RandomNumbers.Xorshifts.Xoroshiro128Star},DiffEqJump.DirectJumpAggregation{Float64,MassActionJump{Array{Float64,1},Array{Array{Pair{Int64,Float64},1},1},Array{Array{Pair{Int64,Float64},1},1}},Tuple{typeof(prod_rate),typeof(deg_rate)},Tuple{typeof(prod_affect!),typeof(deg_affect!)},RandomNumbers.Xorshifts.Xoroshiro128Star}}}},DiffEqJump.DirectJumpAggregation{Float64,MassActionJump{Array{Float64,1},Array{Array{Pair{Int64,Float64},1},1},Array{Array{Pair{Int64,Float64},1},1}},Tuple{typeof(prod_rate),typeof(deg_rate)},Tuple{typeof(prod_affect!),typeof(deg_affect!)},RandomNumbers.Xorshifts.Xoroshiro128Star},Tuple{},Nothing,Nothing}, ::MethodOfSteps{Tsit5,Nothing,Nothing,Nothing,false}) at /home/Niklas/.julia/packages/DiffEqBase/6ewdP/src/solve.jl:27
[11] top-level scope at In[59]:23
I can achieve what I want using callbacks, so I'm not desperate for a fix, but I thought I should report the problem.
Metadata
Metadata
Assignees
Labels
No labels
Activity
alanderos91 commentedon Jun 14, 2019
Is
ConstantRateJumpappropriate here? The variableu[1]could change continuously with the DDE which means the jump rates do too. UsingVariableRateJumpthrows a different error:and can be traced to https://github.com/JuliaDiffEq/DiffEqJump.jl/blob/master/src/problem.jl#L86
korsbo commentedon Jun 14, 2019
You are right. However, that is a problem with my MWE and I don't think its an issue with my real problem. The system that I am really trying to solve has one variable with is exclusively governed by a Gillespie simulation (with no information taken from any other variable) and the other variables use the first one as input.
In my real problem, I also do not use a fixed time lag but rather calculate the integral of the entire history function. I thus use a different algorithm too (
MethodOfSteps(RK4())).So the MWE may not be perfect, but it results in the same error that my real problem raises.
korsbo commentedon Jun 14, 2019
For the sake of bug-hunting I think that the MWE is fine. However, the problem I'm actually trying to simulate is much closer to:
I just figured that this contained more complexity than the MWE needed.
Ps. for the computational biologist who cares: this model simulates the signal-transformation conferred by a multi-step linear pathway without having to explicitly include every pathway step. I'm hoping that the related paper will be submitted in a week or two.
alanderos91 commentedon Jun 14, 2019
Yeah your MWE is fine. My guess is that the constructor for DDEProblem changed and this was never updated: https://github.com/JuliaDiffEq/DiffEqJump.jl/blob/master/src/problem.jl#L86
I'll give this a look but I may not get back with a solution until Monday.
korsbo commentedon Jun 14, 2019
Thanks! There is no rush on my part. I have already solved my problem using callbacks instead. I just wanted to report the issue.
ChrisRackauckas commentedon Jun 19, 2019
We were almost cool. Then we weren't. Now? 😎
ChrisRackauckas commentedon Jun 19, 2019
Oh, but we didn't handle the ConstantRateJump 😢
alanderos91 commentedon Jun 19, 2019
I assumed everything was working in the past and did not check for missing jumps.
Here's what I've found (based on the second example):
This means the
CallbackSetis never touched to initialize the jumps, in contrast to ODE/Jump problems. Seeing as how ODE/Jump problems work and that I've made my way down to thesolve!(integrator)call, I suspect the error may be outside DiffEqJump. Maybe I missed something?ChrisRackauckas commentedon Jun 19, 2019
Maybe DDEs aren't running the callback initialization step at the right point?
alanderos91 commentedon Jun 20, 2019
See the offending LOCs. There are references to
dde_intand the bootstrap integratordde_int.integrator. I'm not sure what L394 is doing here:The function call should be

initialize!(callbacks, **u**, **t**, integrator). Changing this and replacing references tointegratorwithdde_intseems to yield the desired behavior:I'll file a separate issue.
isaacsas commentedon Jan 5, 2021
@korsbo both examples here seem to go through for me now, but if you are still having issues let me know and I can reopen.