Skip to content

Commit

Permalink
fixes test and formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
gzagatti committed May 17, 2023
1 parent 6223d89 commit 35e8bb4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/src/jump_types.md
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ Note that

- It is currently only possible to simulate `VariableRateJump`s with
`SSAStepper` when using systems with only bounded `VariableRateJump`s and the
`Coevolve` aggregator.
`Coevolve` aggregator.
- When coupling `Coevolve` with a continuous problem type such as an
`ODEProblem` ensure that the bounds are satisfied given changes in `u` over
`rateinterval`. `Coevolve` handles jumps in the same way whether it is
Expand Down
6 changes: 3 additions & 3 deletions test/hawkes_test.jl
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ function hawkes_jump(u, g, h; uselrate = true)
return [hawkes_jump(i, g, h; uselrate) for i in 1:length(u)]
end

function hawkes_problem(p, agg::Union{Coevolve}; u = [0.0],
function hawkes_problem(p, agg::Coevolve; u = [0.0],
tspan = (0.0, 50.0),
save_positions = (false, true),
g = [[1]], h = [[]], uselrate = true)
Expand Down Expand Up @@ -113,7 +113,7 @@ Nsims = 250

for (i, alg) in enumerate(algs)
jump_prob = hawkes_problem(p, alg; u = u0, tspan, g, h, uselrate = uselrate[i])
if typeof(alg) <: Union{Coevolve}
if typeof(alg) <: Coevolve
stepper = SSAStepper()
else
stepper = Tsit5()
Expand All @@ -123,7 +123,7 @@ for (i, alg) in enumerate(algs)
reset_history!(h)
sols[n] = solve(jump_prob, stepper)
end
if typeof(alg) <: Union{Coevolve}
if typeof(alg) <: Coevolve
λs = permutedims(mapreduce((sol) -> empirical_rate(sol), hcat, sols))
else
cols = length(sols[1].u[1].u)
Expand Down

0 comments on commit 35e8bb4

Please sign in to comment.