Skip to content

TurchinHanski

Systems / ODEs / Chemical & biological systems

An empirically grounded vole–weasel predator–prey model under seasonal forcing that reproduces the latitudinal gradient from stable cycles to chaos.

continuous · ODE3 dimensionschaotic cycles

Start here

Python
import tsdynamics as ts

system = ts.systems.TurchinHanski()
traj = system.run(final_time=20.0, dt=0.01, seed=0)
ts.plot(traj)

traj.t contains the sample times and traj.y the state array; system.info shows the defaults. In a notebook the last line displays the plot. In a Python script, call .show() on it to open a window, or .save("trajectory.svg") to export it.

With an adaptive ODE solver, dt sets the output spacing; rtol and atol control local integration error. For a fixed-step solver, reduce dt to check numerical convergence.

state projection (n, p); playback follows arc length, not physical speed. Interactive: drag to rotate; use the play/pause control in the viewer.

This finite simulation illustrates one initial condition and view. The diagnostics below report their own inputs and observation windows.

Dynamics at the default parameters

Lyapunov exponents measure separation rates along an orbit. The Kaplan–Yorke dimension is derived from those rates, not a direct geometric measurement. Finite runs depend on the initial condition, transient and observation window; a value near zero needs a convergence check.

Lyapunov spectrum
Finite-time / numerical estimate
$+0.09595,\; -2.121e-06,\; -2.476$
per time unit
Method and evidence

Benettin QR tangent dynamics

Finite-time estimate, not a convergence certificate. All state-space directions were computed.

Settings

{
  "backend": "jit",
  "k": 3,
  "final_time": 400.0,
  "transient": 100.0,
  "dt": 0.1,
  "ic": [
    0.5,
    0.5,
    0.0
  ],
  "rtol": 1e-09,
  "atol": 1e-12,
  "solver": "rk45"
}

Preparation

{
  "seed": 1842806017,
  "ic_policy": "declared/in-basin start, else seeded small ball"
}

Estimator runtime in the recorded environment: 0.1289 s.

Kaplan–Yorke dimension
Finite-time / numerical estimate
$D_{KY} = 2.039$
Method and evidence

Kaplan–Yorke interpolation of the recorded spectrum

Lyapunov dimension estimate; equality with a fractal or information dimension requires additional dynamical assumptions.

Settings

{
  "backend": "jit",
  "k": 3,
  "final_time": 400.0,
  "transient": 100.0,
  "dt": 0.1,
  "ic": [
    0.5,
    0.5,
    0.0
  ],
  "rtol": 1e-09,
  "atol": 1e-12,
  "solver": "rk45"
}
Divergence ∇·f
Symbolic
$\nabla\!\cdot f = \frac{a n p}{d^{2} + 2 d n + n^{2}} - \frac{a p}{d + n} - e r \sin{\left(z \right)} - e s \sin{\left(z \right)} + \frac{2 g n^{3}}{h^{4} + 2 h^{2} n^{2} + n^{4}} - \frac{2 g n}{h^{2} + n^{2}} - 2 n r + r + s - \frac{2 p s}{n}$
state-dependent
Equilibria / fixed points
Finite-time / numerical estimate
none found in this search
Method and evidence

A seeded numerical search, not a completeness proof. Stability means linear asymptotic stability. Marginal/nonhyperbolic roots have no nonlinear stability verdict from this linearisation.

max Re(eigenvalue) for flows; max |multiplier| - 1 for maps. Boundary band: 1e-7 * max(1, max |eigenvalue|).

Settings

{
  "method": "newton",
  "n_seeds": 80,
  "seed": 0
}

Estimator runtime in the recorded environment: 0.0375 s.

Recorded parameters and software
{
  "parameters": {
    "a": 8,
    "d": 0.04,
    "e": 0.5,
    "g": 0.1,
    "h": 0.8,
    "r": 8.12,
    "s": 1.25
  },
  "parameter_expressions": {},
  "state_dimension": 3,
  "explicit_time": false,
  "library_version": "6.0.3",
  "python": "3.14.8",
  "numpy": "2.4.4",
  "scipy": "1.17.1",
  "protocol_version": 1
}

Definition

\[ \begin{aligned} \dot{n} &= - \frac{a n p}{d + n} - \frac{g n^{2}}{h^{2} + n^{2}} - n^{2} r + n r \left(- e \sin{\left(z \right)} + 1\right) \\ \dot{p} &= p s \left(- e \sin{\left(z \right)} + 1\right) - \frac{p^{2} s}{n} \\ \dot{z} &= 2 \pi \end{aligned} \]

Parameters

Symbol Default Role
a 8 specialist predator attack rate
d 0.04 half-saturation of the specialist response
e 0.5 amplitude of the seasonal modulation
g 0.1 maximum generalist predation rate
h 0.8 half-saturation of generalist predation
r 8.12 intrinsic prey growth rate
s 1.25 specialist predator growth/self-limitation rate

State variables: n, p, z

Explore further

Reference

Turchin & Hanski (1997), Am. Nat. 149, 842-874
doi:10.1086/286027

BibTeX
BibTeX
@misc{turchinhanski,
  title = {TurchinHanski system},
  note = {Turchin & Hanski (1997), Am. Nat. 149, 842-874},
  doi = {10.1086/286027}
}