Five species share a shrinking or growing habitat. Each population follows logistic growth toward a carrying capacity K that scales with habitat area, minus extra mortality from human pressure (poaching, pollution, habitat fragmentation), partly offset by conservation funding.
dN_i/dt = r_i * N_i * (1 - N_i / K_i) - m_i * N_i
K_i = K0_i * habitat^e_i
m_i = pressure * s_i * (1 - 0.6 * conservation)
r_i = r0_i * (1 + 0.5 * conservation)
Biodiversity is measured with the Shannon diversity index over the five populations, normalized to 0-1:
H = -Σ p_i ln(p_i), p_i = N_i / ΣN
Biodiversity Index = H / ln(5)
- Habitat Area — scales each species' carrying capacity K_i; apex predators (e_i=1.5) and pollinators (e_i=1.3) suffer most from habitat loss.
- Conservation Funding — raises growth rates r_i and cuts human-pressure mortality by up to 60%.
- Human Pressure — poaching, pesticides and pollution; each species has its own sensitivity s_i (apex predator most sensitive).
- Simulation Speed — scales simulated years per real second; Pause/Reset control playback.
This mirrors real conservation trade-offs: protecting habitat and funding enforcement raises both population sizes and species diversity, while unmanaged human pressure can drive sensitive species to local extinction even in intact habitat.