Skip to content

Commit f82d836

Browse files
committed
solver choice docs upd
1 parent 23a5027 commit f82d836

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

docs/src/basics/solvers.md

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,21 @@ One can also set relative and absolute tolerances (`reltol`, `abstol`) and other
1010

1111
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.
1212

13+
```julia
14+
sol = sim(
15+
scen;
16+
alg = Rodas5P(),
17+
reltol=1e-6,
18+
abstol=1e-8
19+
)
20+
```
21+
1322
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.
1423
For many ODE systems the following simplified guideline is sufficient:
1524
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()`*
1929

2030
*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

Comments
 (0)