Skip to content

Commit ccaeb75

Browse files
Merge pull request #430 from isaacsas/jumpproblem-kwarg-fix
Jump problem kwarg fix
2 parents b813592 + 8f97710 commit ccaeb75

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/systems/jumps/jumpsystem.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ function DiffEqJump.JumpProblem(js::JumpSystem, prob, aggregator; kwargs...)
198198
vtoj = nothing; jtov = nothing; jtoj = nothing
199199
end
200200

201-
JumpProblem(prob, aggregator, jset; dep_graph=jtoj, vartojumps_map=vtoj, jumptovars_map=jtov)
201+
JumpProblem(prob, aggregator, jset; dep_graph=jtoj, vartojumps_map=vtoj, jumptovars_map=jtov, kwargs...)
202202
end
203203

204204

test/jumpsystem.jl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,11 @@ function getmean(jprob,Nsims)
7171
end
7272
m = getmean(jprob,Nsims)
7373

74+
# test save_positions is working
75+
jprob = JumpProblem(js2, dprob, Direct(), save_positions=(false,false))
76+
sol = solve(jprob, SSAStepper(), saveat=1.0)
77+
@test all((sol.t) .== collect(0.:tspan[2]))
78+
7479
#test the MT JumpProblem rates/affects are correct
7580
rate2(u,p,t) = 0.01u[2]
7681
jump2 = ConstantRateJump(rate2,affect2!)

0 commit comments

Comments
 (0)