Ecology: Rosenzweig–MacArthur
A practical predator–prey model. Adds carrying capacity, Holling type II handling-time saturation, and optional seasonality, disease, migration, and patch structure on top of the Lotka–Volterra skeleton.
What it simulates
- Prey grow but cap out at the habitat carrying capacity.
- Predation saturates at high prey density (Holling type II).
- Predators turn a fraction of consumed prey into new predators.
- Optional layers: seasonal forcing, disease compartments, inter-patch migration, and noise.
- The default scenario is intentionally boom-bust so collapse risk and threshold crossings are visible in one run.

Run it on the Hub
- Open the Rosenzweig–MacArthur Predator-Prey System Lab on the public Hub.
- Click Run. The default scenario runs for one simulated year (365 days).
Inputs you can tune
| Input | Meaning |
|---|---|
prey_initial_population | Starting prey count. |
predator_initial_population | Starting predator count. |
prey_growth_rate | Prey growth in good conditions. |
prey_carrying_capacity | Habitat limit for prey. |
attack_rate | How quickly predators find prey. |
handling_time | Time spent handling each prey item. |
predator_mortality_rate | Predator loss rate. |
predator_conversion_efficiency | Predator gain per prey eaten. |
food_resource_index | Resource-quality multiplier. |
Optional inputs configure seasonal forcing, disease, migration, and patch settings.
What results to expect
- Population trajectory: prey surge, lagged predator response, overshoot, and crash.
- Phase portrait: large boom-bust loop with the carrying-capacity line and the coexistence equilibrium marked.
- Holling type II curve: predator consumption versus prey density, with a marker at the current state.
- Risk and state table: extinction-risk scores (
prey,predator,joint) and the active mechanisms list.

Source on GitHub: models-ecology — rosenzweig-macarthur.