Skip to content

Commit 33d0a26

Browse files
committed
refactor: tweak tolerances
1 parent 016c9e7 commit 33d0a26

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/lotka_volterra.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ prob = ODEProblem{true, SciMLBase.FullSpecialize}(sys, [], (0, 1.0), [])
6262

6363
model_true = structural_simplify(lotka_true())
6464
prob_true = ODEProblem{true, SciMLBase.FullSpecialize}(model_true, [], (0, 1.0), [])
65-
sol_ref = solve(prob_true, Rodas4())
65+
sol_ref = solve(prob_true, Rodas5P(), abstol = 1e-8, reltol = 1e-8)
6666

6767
x0 = default_values(sys)[nn.p]
6868

@@ -74,7 +74,7 @@ function loss(x, (prob, sol_ref, get_vars, get_refs, set_x))
7474
new_p = set_x(prob, x)
7575
new_prob = remake(prob, p = new_p, u0 = eltype(x).(prob.u0))
7676
ts = sol_ref.t
77-
new_sol = solve(new_prob, Rodas4(), saveat = ts)
77+
new_sol = solve(new_prob, Rodas5P(), abstol = 1e-8, reltol = 1e-8, saveat = ts)
7878

7979
loss = zero(eltype(x))
8080

0 commit comments

Comments
 (0)