Skip to content

Commit 4531c19

Browse files
Update solve.jl
1 parent 4479f54 commit 4531c19

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/solve.jl

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
# when the solver (i.e. StochasticDiffEq.jl) allows for jumps in __init
33
struct ForceJumpDispatch end
44

5+
6+
57
function DiffEqBase.__solve(jump_prob::DiffEqBase.AbstractJumpProblem{P},
68
alg::DiffEqBase.DEAlgorithm;
79
kwargs...) where {P}
@@ -10,6 +12,15 @@ function DiffEqBase.__solve(jump_prob::DiffEqBase.AbstractJumpProblem{P},
1012
integrator.sol
1113
end
1214

15+
#Ambiguity Fix
16+
function DiffEqBase.__solve(jump_prob::DiffEqBase.AbstractJumpProblem{P},
17+
alg::Union{SciMLBase.AbstractRODEAlgorithm, SciMLBase.AbstractSDEAlgorithm};
18+
kwargs...) where {P}
19+
integrator = DiffEqBase.__init(jump_prob, alg, ForceJumpDispatch(); kwargs...)
20+
solve!(integrator)
21+
integrator.sol
22+
end
23+
1324
# if passed a JumpProblem over a DiscreteProblem, and no aggregator is selected use
1425
# SSAStepper
1526
function DiffEqBase.__solve(jump_prob::DiffEqBase.AbstractJumpProblem{P};

0 commit comments

Comments
 (0)