Skip to content

Commit 90ff796

Browse files
committed
rebase
1 parent 12eb6c9 commit 90ff796

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

docs/pages.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ pages = Any[
3939
"steady_state_functionality/nonlinear_solve.md",
4040
"steady_state_functionality/steady_state_stability_computation.md",
4141
"steady_state_functionality/bifurcation_diagrams.md"
42-
# Dynamical systems analysis.
42+
"steady_state_functionality/dynamical_systems.md"
4343
],
4444
"Inverse Problems" => Any[
4545
# Inverse problems introduction.

docs/src/catalyst_applications/dynamical_systems.md renamed to docs/src/steady_state_functionality/dynamical_systems.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# [Analysing model steady state properties with DynamicalSystems.jl](@id dynamical_systems)
2-
The [DynamicalSystems.jl package](https://github.com/JuliaDynamics/DynamicalSystems.jl) implements a wide range of methods for analysing dynamical systems. This includes both continuous-time systems (i.e. ODEs) and discrete-times ones (difference equations, these are, however, not relevant to chemical reaction network modelling). Here we give two examples of how DynamicalSystems.jl can be used, with the package's [documentation describing many more features](https://juliadynamics.github.io/DynamicalSystemsDocs.jl/dynamicalsystems/dev/tutorial/). Finally, it should also be noted that DynamicalSystems.jl contain several tools for [analysing data measured from dynamical systems](https://juliadynamics.github.io/DynamicalSystemsDocs.jl/dynamicalsystems/dev/contents/#Exported-submodules).
2+
The [DynamicalSystems.jl package](https://github.com/JuliaDynamics/DynamicalSystems.jl) implements a wide range of methods for analysing dynamical systems. This includes both continuous-time systems (i.e. ODEs) and discrete-times ones (difference equations, however, these are not relevant to chemical reaction network modelling). Here we give two examples of how DynamicalSystems.jl can be used, with the package's [documentation describing many more features](https://juliadynamics.github.io/DynamicalSystemsDocs.jl/dynamicalsystems/dev/tutorial/). Finally, it should also be noted that DynamicalSystems.jl contain several tools for [analysing data measured from dynamical systems](https://juliadynamics.github.io/DynamicalSystemsDocs.jl/dynamicalsystems/dev/contents/#Exported-submodules).
33

44
## [Finding basins of attraction](@id dynamical_systems_basins_of_attraction)
55
Given enough time, an ODE will eventually reach a so-called [*attractor*](https://en.wikipedia.org/wiki/Attractor). For chemical reaction networks (CRNs), this will typically be either a *steady state* or a *limit cycle*. Since ODEs are deterministic, which attractor a simulation will reach is uniquely determined by the initial condition (assuming parameter values are fixed). Conversely, each attractor is associated with a set of initial conditions such that model simulations originating in these will tend to that attractor. These sets are called *basins of attraction*. Here, phase space (the space of all possible states of the system) can be divided into a number of basins of attraction equal to the number of attractors.
66

7-
DynamicalSystems.jl provides a simple interface for finding an ODE's basins of attraction across any given subspace of phase space. In this example we will use the bistable [Wilhelm model](https://bmcsystbiol.biomedcentral.com/articles/10.1186/1752-0509-3-90) (which steady states we have previous [computed using homotopy continuation](@ref homotopy_continuation_basic_example)). As a first step, we create a `ODEProblem` corresponding to the model which basins of attraction we wish to compute. For this application, `u0` and `tspan` is unused, and their values are of little importance (the only exception is than `tspan`, for implementation reason, must provide a not to small interval, we recommend minimum `(0.0, 1.0)`).
7+
DynamicalSystems.jl provides a simple interface for finding an ODE's basins of attraction across any given subspace of phase space. In this example we will use the bistable [Wilhelm model](https://bmcsystbiol.biomedcentral.com/articles/10.1186/1752-0509-3-90) (which steady states we have previous [computed using homotopy continuation](@ref homotopy_continuation_basic_example)). As a first step, we create an `ODEProblem` corresponding to the model which basins of attraction we wish to compute. For this application, `u0` and `tspan` is unused, and their values are of little importance (the only exception is than `tspan`, for implementation reason, must provide a not too small interval, we recommend minimum `(0.0, 1.0)`).
88
```@example dynamical_systems_basins
99
using Catalyst
1010
wilhelm_model = @reaction_network begin
@@ -54,7 +54,7 @@ More information on how to compute basins of attractions for ODEs using Dynamica
5454

5555
While Lyapunov exponents can be used for other purposes, they are primarily used to characterise [*chaotic behaviours*](https://en.wikipedia.org/wiki/Chaos_theory) (where small changes in initial conditions has large effect on the resulting trajectories). Generally, an ODE exhibit chaotic behaviour if its attractor(s) have *at least one* positive Lyapunov exponent. Practically, Lyapunov exponents can be computed using DynamicalSystems.jl's `lyapunovspectrum` function. Here we will use it to investigate two models, one which exhibits chaos and one which do not.
5656

57-
First, let us consider the [Willamowski–Rössler](https://www.degruyter.com/document/doi/10.1515/zna-1980-0308/html?lang=en) model, which is known to exhibit chaotic behaviour.
57+
First, let us consider the [Willamowski–Rössler model](@ref ref), which is known to exhibit chaotic behaviour.
5858
```@example dynamical_systems_lyapunov
5959
using Catalyst
6060
wr_model = @reaction_network begin
@@ -82,14 +82,14 @@ plot(sol; idxs=(:X, :Y, :Z))
8282
Next, like when we [computed basins of attraction](@ref dynamical_systems_basins_of_attraction), we create a `CoupledODEs` corresponding to the model and state for which we wish to compute our Lyapunov spectrum. Lke previously, `tspan` must provide some small interval (at least `(0.0, 1.0)` is recommended), but else have no impact on the computed Lyapunov spectrum.
8383
```@example dynamical_systems_lyapunov
8484
using DynamicalSystems
85-
ds = CoupledODEs(oprob, (alg = Rodas5P(autodiff=false),))
85+
ds = CoupledODEs(oprob, (alg = Rodas5P(autodiff = false),))
8686
nothing # hide
8787
```
88-
Here, the `autodiff=false` argument is required when Lyapunov spectrums are computed. We can now provide our `CoupledODEs` (`ds`) to `lyapunovspectrum` to compute the lyapunov spectrum. This function requires a second argument (here set to `100`). Generally setting this to a higher value will increase accuracy, but also increase runtime (since `lyapunovspectrum` is fast for most systems, setting this to a large value is recommended).
88+
Here, the `autodiff = false` argument is required when Lyapunov spectrums are computed. We can now provide our `CoupledODEs` (`ds`) to `lyapunovspectrum` to compute the lyapunov spectrum. This function requires a second argument (here set to `100`). Generally setting this to a higher value will increase accuracy, but also increase runtime (since `lyapunovspectrum` is fast for most systems, setting this to a large value is recommended).
8989
```@example dynamical_systems_lyapunov
9090
lyapunovspectrum(ds, 100)
9191
```
92-
Here, the largest exponent is positive, suggesting that the model is chaotic (or, more accurately, it has at least one chaotic attractor, to which it go to from the initial condition $(1.5, 1.5, 1.5)).
92+
Here, the largest exponent is positive, suggesting that the model is chaotic (or, more accurately, it has at least one chaotic attractor, to which is approached from the initial condition $(1.5,1.5,1.5)).
9393

9494
Next, we consider the [Brusselator] model. First we simulate the model for two similar initial conditions, confirming that they converge to the same limit cycle:
9595
```@example dynamical_systems_lyapunov
@@ -114,7 +114,7 @@ plot!(osol2; idxs = (:X, :Y))
114114
```
115115
Next, we compute the Lyapunov spectrum at one of the initial conditions:
116116
```@example dynamical_systems_lyapunov
117-
ds = CoupledODEs(oprob1, (alg = Rodas5P(autodiff=false),))
117+
ds = CoupledODEs(oprob1, (alg = Rodas5P(autodiff = false),))
118118
lyapunovspectrum(ds, 100)
119119
```
120120
Here, all Lyapunov exponents are negative, confirming that the brusselator is non-chaotic.

0 commit comments

Comments
 (0)