diff --git a/Project.toml b/Project.toml index aaeececa..938c66d2 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "JumpProcesses" uuid = "ccbc3e58-028d-4f4c-8cd5-9ae44345cda5" authors = ["Chris Rackauckas "] -version = "9.13.1" +version = "9.13.2" [deps] ArrayInterface = "4fba245c-0d91-5ea0-9b3e-6abc04ee57a9" diff --git a/docs/Project.toml b/docs/Project.toml index bfd045a7..6cc0c98d 100644 --- a/docs/Project.toml +++ b/docs/Project.toml @@ -19,7 +19,7 @@ DifferentialEquations = "7.11" Distributions = "0.25" Documenter = "1.1" Graphs = "1.9" -JumpProcesses = "9.8" +JumpProcesses = "9.13.2" OrdinaryDiffEq = "6.59" Plots = "1.39" PointProcesses = "0.5" diff --git a/src/problem.jl b/src/problem.jl index 6af1f1e3..8e6f8247 100644 --- a/src/problem.jl +++ b/src/problem.jl @@ -299,7 +299,9 @@ function extend_problem(prob::DiffEqBase.AbstractODEProblem, jumps; rng = DEFAUL ttype = eltype(prob.tspan) u0 = ExtendedJumpArray(prob.u0, [-randexp(rng, ttype) for i in 1:length(jumps)]) - remake(prob, f = ODEFunction{isinplace(prob)}(jump_f), u0 = u0) + f = ODEFunction{isinplace(prob)}(jump_f; sys = prob.f.sys, + observed = prob.f.observed) + remake(prob; f, u0) end function extend_problem(prob::DiffEqBase.AbstractSDEProblem, jumps; rng = DEFAULT_RNG) @@ -334,7 +336,9 @@ function extend_problem(prob::DiffEqBase.AbstractSDEProblem, jumps; rng = DEFAUL ttype = eltype(prob.tspan) u0 = ExtendedJumpArray(prob.u0, [-randexp(rng, ttype) for i in 1:length(jumps)]) - remake(prob, f = SDEFunction{isinplace(prob)}(jump_f, jump_g), g = jump_g, u0 = u0) + f = SDEFunction{isinplace(prob)}(jump_f, jump_g; sys = prob.f.sys, + observed = prob.f.observed) + remake(prob; f, g = jump_g, u0) end function extend_problem(prob::DiffEqBase.AbstractDDEProblem, jumps; rng = DEFAULT_RNG) @@ -359,7 +363,9 @@ function extend_problem(prob::DiffEqBase.AbstractDDEProblem, jumps; rng = DEFAUL ttype = eltype(prob.tspan) u0 = ExtendedJumpArray(prob.u0, [-randexp(rng, ttype) for i in 1:length(jumps)]) - remake(prob, f = DDEFunction{isinplace(prob)}(jump_f), u0 = u0) + f = DDEFunction{isinplace(prob)}(jump_f; sys = prob.f.sys, + observed = prob.f.observed) + remake(prob; f, u0) end # Not sure if the DAE one is correct: Should be a residual of sorts @@ -386,7 +392,9 @@ function extend_problem(prob::DiffEqBase.AbstractDAEProblem, jumps; rng = DEFAUL ttype = eltype(prob.tspan) u0 = ExtendedJumpArray(prob.u0, [-randexp(rng, ttype) for i in 1:length(jumps)]) - remake(prob, f = DAEFunction{isinplace(prob)}(jump_f), u0 = u0) + f = DAEFunction{isinplace(prob)}(jump_f, sys = prob.f.sys, + observed = prob.f.observed) + remake(prob; f, u0) end function build_variable_callback(cb, idx, jump, jumps...; rng = DEFAULT_RNG)