|
1 | 1 | ### Fetch Packages ###
|
2 | 2 |
|
3 | 3 | # Fetch packages.
|
4 |
| -using Catalyst, NonlinearSolve, OrdinaryDiffEq, SteadyStateDiffEq, DifferentialEquations |
| 4 | +using Catalyst, NonlinearSolve, OrdinaryDiffEq, SteadyStateDiffEq |
5 | 5 | using Random, Test
|
6 | 6 |
|
7 | 7 | # Sets rnd number.
|
|
25 | 25 | nl_prob = NonlinearProblem(steady_state_network_1, u0, p)
|
26 | 26 |
|
27 | 27 | # Solves it using standard algorithm and simulation based algorithm.
|
28 |
| - sol1 = solve(nl_prob; abstol=1e-12, reltol=1e-12).u |
| 28 | + sol1 = solve(nl_prob, LevenbergMarquardt(); abstol=1e-12, reltol=1e-12).u |
29 | 29 | sol2 = solve(nl_prob, DynamicSS(Rosenbrock23(); abstol=1e-12, reltol=1e-12); abstol=1e-12, reltol=1e-12).u
|
30 | 30 |
|
31 | 31 | # Tests solutions are correct.
|
|
54 | 54 | nl_prob = NonlinearProblem(steady_state_network_2, u0, p)
|
55 | 55 |
|
56 | 56 | # Solves it using standard algorithm and simulation based algorithm.
|
57 |
| - sol1 = solve(nl_prob; abstol=1e-12, reltol=1e-12).u |
| 57 | + sol1 = solve(nl_prob, LevenbergMarquardt(); abstol=1e-12, reltol=1e-12).u |
58 | 58 | sol2 = solve(nl_prob, DynamicSS(Rosenbrock23(); abstol=1e-12, reltol=1e-12); abstol=1e-12, reltol=1e-12).u
|
59 | 59 |
|
60 | 60 | # Computes NonlinearFunction (manually and automatically).
|
|
90 | 90 | nl_prob_2 = NonlinearProblem(steady_state_network_3, u0, p)
|
91 | 91 |
|
92 | 92 | # Solves it using standard algorithm and simulation based algorithm.
|
93 |
| - sol1 = solve(nl_prob_1; abstol=1e-12, reltol=1e-12) |
| 93 | + sol1 = solve(nl_prob_1, LevenbergMarquardt(); abstol=1e-12, reltol=1e-12) |
94 | 94 | sol2 = solve(nl_prob_2, DynamicSS(Rosenbrock23(); abstol=1e-12, reltol=1e-12); abstol=1e-12, reltol=1e-12)
|
95 | 95 |
|
96 | 96 | # Checks output using NonlinearFunction.
|
|
0 commit comments