You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/src/basics/solvers.md
+13-3Lines changed: 13 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,11 +10,21 @@ One can also set relative and absolute tolerances (`reltol`, `abstol`) and other
10
10
11
11
If no solver is provided the default one `AutoTsit5(Rosenbrock23())` will be used with `reltol=1e-3` and `abstol=1e-6` for simulation problems and `reltol=1e-6` and `abstol=1e-8` for parameters estimation.
12
12
13
+
```julia
14
+
sol = sim(
15
+
scen;
16
+
alg = Rodas5P(),
17
+
reltol=1e-6,
18
+
abstol=1e-8
19
+
)
20
+
```
21
+
13
22
The following [DiffEq Docs page](https://docs.sciml.ai/DiffEqDocs/stable/solvers/ode_solve/) provides general advice on how to choose a solver suitable for your ODE system.
14
23
For many ODE systems the following simplified guideline is sufficient:
15
24
1. If your system is small (~10 ODEs) go with the default solver
16
-
2. If the system is large and stiff choose `FBDF()` or `QNDF()`
17
-
3. If `FBDF()` fails to solve the system check the model and try it again :)
18
-
4. If `FBDF()` still fails to solve the system or the integration takes too long try `CVODE_BDF()`*
25
+
2. If your system is medium-sized (~50 ODEs) choose `Rodas5P()`
26
+
3. If the system is large and stiff choose `FBDF()` or `QNDF()`
27
+
4. If `FBDF()` fails to solve the system check the model and try it again :)
28
+
5. If `FBDF()` still fails to solve the system or the integration takes too long try `CVODE_BDF()`*
19
29
20
30
*You should be cautious when using `CVODE_BDF()`. In many cases it is the fastest solver, however the accuracy of the solution is often the tradeoff. You shouldn't use it with tolerances higher than ~ `reltol=1e-4` and `abstol=1e-7`.
0 commit comments