Skip to content

Commit f3e0168

Browse files
authored
Update nonlinear_solve.jl
more trying to fix with 1.6
1 parent c69c894 commit f3e0168

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/miscellaneous_tests/nonlinear_solve.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ let
2525
nl_prob = NonlinearProblem(steady_state_network_1, u0, p)
2626

2727
# Solves it using standard algorithm and simulation based algorithm.
28-
sol1 = solve(nl_prob, LevenbergMarquardt(); abstol=1e-12, reltol=1e-12).u
28+
sol1 = solve(nl_prob; abstol=1e-12, reltol=1e-12).u
2929
sol2 = solve(nl_prob, DynamicSS(Rosenbrock23(); abstol=1e-12, reltol=1e-12); abstol=1e-12, reltol=1e-12).u
3030

3131
# Tests solutions are correct.
@@ -54,7 +54,7 @@ let
5454
nl_prob = NonlinearProblem(steady_state_network_2, u0, p)
5555

5656
# Solves it using standard algorithm and simulation based algorithm.
57-
sol1 = solve(nl_prob, LevenbergMarquardt(); abstol=1e-12, reltol=1e-12).u
57+
sol1 = solve(nl_prob; abstol=1e-12, reltol=1e-12).u
5858
sol2 = solve(nl_prob, DynamicSS(Rosenbrock23(); abstol=1e-12, reltol=1e-12); abstol=1e-12, reltol=1e-12).u
5959

6060
# Computes NonlinearFunction (manually and automatically).
@@ -90,11 +90,11 @@ let
9090
nl_prob_2 = NonlinearProblem(steady_state_network_3, u0, p)
9191

9292
# Solves it using standard algorithm and simulation based algorithm.
93-
sol1 = solve(nl_prob_1, LevenbergMarquardt(); abstol=1e-12, reltol=1e-12)
93+
sol1 = solve(nl_prob_1; abstol=1e-12, reltol=1e-12)
9494
sol2 = solve(nl_prob_2, DynamicSS(Rosenbrock23(); abstol=1e-12, reltol=1e-12); abstol=1e-12, reltol=1e-12)
9595

9696
# Checks output using NonlinearFunction.
9797
nfunc = NonlinearFunction(convert(NonlinearSystem, steady_state_network_3))
9898
@test isapprox(nfunc([sol1[X], sol1[Y], sol1[Y2], sol1[XY2]], last.(p)), [0.0, 0.0, 0.0, 0.0]; atol=1e-10)
9999
@test isapprox(nfunc([sol2[X], sol2[Y], sol2[Y2], sol2[XY2]], last.(p)), [0.0, 0.0, 0.0, 0.0]; atol=1e-10)
100-
end
100+
end

0 commit comments

Comments
 (0)