Carrying capacity scenarios (logistic growth)
This calculator is a logistic scenario explorer: it shows how the population trajectory changes when you vary
the carrying capacity K and the growth rate r, and how a disturbance (“shock”) at time ts
can instantly reduce population size and/or shift the carrying capacity. It also estimates the time to reach a target
fraction of K, such as 90% of K.
Symbols and interpretation
- N(t): population size at time t
- N0: initial population at the start of the simulation (N(tstart) = N0)
- r: intrinsic growth rate (per time unit)
- K: carrying capacity (long-term ceiling set by the environment)
- tstart, tend: time window for simulation
- ts: shock time (if enabled)
- f: target fraction of K (e.g., 0.90 for 90% of K)
The logistic model is most appropriate when growth is density-dependent—resources become limiting as the
population increases. The parameter K is not “magic”; it summarizes environmental constraints (space, food,
habitat quality, competition, etc.), and can change when conditions change.
Base logistic model
Differential equation (growth slows as N approaches K)
\[
\begin{aligned}
\frac{dN}{dt} &= r \cdot N \left(1-\frac{N}{K}\right)
\end{aligned}
\]
Closed-form solution used for simulation
The calculator uses a time offset \(\Delta t = t - t_{\text{start}}\) so that the initial condition is
N(tstart) = N0.
\[
\begin{aligned}
\Delta t &= t - t_{\text{start}} \\
N(t) &= \frac{K}{1 + A e^{-r\Delta t}} \\
A &= \frac{K - N_0}{N_0}
\end{aligned}
\]
When r > 0 and N0 < K, the curve is S-shaped: it starts slowly, increases rapidly, then
levels off near K. If N0 > K, the model predicts a decline toward K.
How K and r change the trajectory
-
Increasing r makes the curve rise faster (steeper mid-phase growth) and shortens the time to reach any target
fraction of K.
-
Increasing K raises the long-term ceiling. For the same N0 and r, it typically
increases the absolute population values and shifts when the curve enters high-percentage bands like 90–100% of K.
Time to reach a target fraction of K
Choose a target percentage (for example 90%). The calculator converts it to a fraction f and defines the target
population as Ntarget = fK. It then reports the first time the trajectory reaches or exceeds that
target.
Target definition
\[
\begin{aligned}
f &= \frac{\text{target\%}}{100} \\
N_{\text{target}} &= fK
\end{aligned}
\]
Closed-form time-to-target (no shock)
If there is no shock and 0 < f < 1, the time to reach fK can be derived by solving the logistic
solution for time:
\[
\begin{aligned}
f &= \frac{1}{1 + A e^{-r\Delta t}} \\
\frac{1}{f} - 1 &= A e^{-r\Delta t} \\
e^{-r\Delta t} &= \frac{1-f}{Af} \\
\Delta t &= \frac{1}{r}\ln\!\left(\frac{Af}{1-f}\right)
\end{aligned}
\]
The calculator may still use simulation and interpolation to keep behavior consistent across all modes (especially when
shocks or K shifts are enabled).
Shock event (disturbance) at time ts
A shock models an instant disturbance such as a die-off, harvesting, disease outbreak, habitat loss, or sudden change
in resources. In this calculator, the shock can affect:
- Population size: either reduce N by a percentage or set N to a specific value at time ts.
- Carrying capacity (optional): reduce K by a percentage or set K to a specific value after ts.
Population shock
Let N(ts−) be the value just before the shock and N(ts+) the
value immediately after.
\[
\begin{aligned}
N(t_s^-) &= \text{logistic model evaluated at } t_s \text{ using } K_{\text{pre}} \\
N(t_s^+) &=
\begin{cases}
(1-p)\,N(t_s^-), & \text{if reducing by a fraction } p \\
N_{\text{set}}, & \text{if setting to a value}
\end{cases}
\end{aligned}
\]
K shift after the shock (optional)
\[
\begin{aligned}
K_{\text{post}} &=
\begin{cases}
(1-q)\,K_{\text{pre}}, & \text{if reducing by a fraction } q \\
K_{\text{set}}, & \text{if setting to a value} \\
K_{\text{pre}}, & \text{if no shift}
\end{cases}
\end{aligned}
\]
Piecewise trajectory with shock and/or K shift
Before the shock, growth follows the logistic curve starting at tstart. After the shock, the curve
“restarts” from N(ts+) using Kpost.
\[
\begin{aligned}
\text{For } t < t_s:\quad
N(t) &= \frac{K_{\text{pre}}}{1 + A_{\text{pre}} e^{-r(t-t_{\text{start}})}},\qquad
A_{\text{pre}} = \frac{K_{\text{pre}}-N_0}{N_0} \\
\text{For } t \ge t_s:\quad
N(t) &= \frac{K_{\text{post}}}{1 + A_{\text{post}} e^{-r(t-t_s)}},\qquad
A_{\text{post}} = \frac{K_{\text{post}}-N(t_s^+)}{N(t_s^+)}
\end{aligned}
\]
If a target is defined as a fraction of K, the calculator interprets it as a fraction of the post-shock K when a
K shift is enabled. This matches the idea that the “new environment” sets the relevant carrying capacity.
Scenario overlays (multiple K values)
The scenario overlay plot draws multiple curves on the same axes by repeating the same computation for each K value you
enter. This makes it easy to compare how quickly different environments approach their carrying capacities. The scenario
table summarizes each case as:
K → time to reach the target % of K.
Reading the plot
- K line: shown as a horizontal reference. If K shifts at ts, the line changes at the shock time.
- Target band: the shaded region near the top (for example 90–100% of K) shows “close to capacity.”
- Time-to-target marker: a vertical indicator shows when the chosen curve first reaches the target.
Common pitfalls and validation checks
- N0 must be > 0 for the closed-form logistic solution as written.
- K must be > 0, and if K is shifted after the shock, the resulting K should also remain > 0.
-
Target% should satisfy 0 < target% < 100 for a meaningful “approach to capacity” time.
Values near 100% can be extremely slow to reach.
-
With r ≤ 0, the population may never reach high targets; in that case the tool reports “not reached.”