-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fbedff3
commit 564c81c
Showing
2 changed files
with
22 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Solver choice | ||
|
||
### Page under development. Information will be updated | ||
|
||
## ODE solver choice | ||
|
||
`HetaSimulator.jl` relies on [DifferentialEquations.jl](https://docs.sciml.ai/DiffEqDocs/stable/) packages, which provide access to 300+ ODE solvers. | ||
These solvers can be used in `HetaSimulator` simulation and parameters estimation functions (`sim`, `fit`, etc.), provided via `alg` keyword argument (For example, see [`sim`](@ref)). | ||
One can also set relative and absolute tolerances (`reltol`, `abstol`) and other stepsize related settings via relevant keyword arguments. See [DiffEqDocs](https://docs.sciml.ai/DiffEqDocs/stable/basics/common_solver_opts/) for details. | ||
|
||
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. | ||
|
||
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. | ||
For most of ODE systems the following simplified guideline is sufficient: | ||
1. If your system is small (~10 ODEs) go with the default solver | ||
2. If the system is large and stiff choose `FBDF()` or `QNDF()` | ||
3. If `FBDF()` fails to solve the system check the model and try it again :) | ||
4. If `FBDF()` still fails to solve the system or the integration takes too long, try `CVODE_BDF()`* | ||
|
||
* You should be caution with `CVODE_BDF()`. With many models it is the most fast 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`. |