ExamplesEcology: Rosenzweig–MacArthur

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.

Rosenzweig-MacArthur boom-bust trajectories and phase portrait

Run it on the Hub

  1. Open the Rosenzweig–MacArthur Predator-Prey System Lab on the public Hub.
  2. Click Run. The default scenario runs for one simulated year (365 days).

Inputs you can tune

InputMeaning
prey_initial_populationStarting prey count.
predator_initial_populationStarting predator count.
prey_growth_ratePrey growth in good conditions.
prey_carrying_capacityHabitat limit for prey.
attack_rateHow quickly predators find prey.
handling_timeTime spent handling each prey item.
predator_mortality_ratePredator loss rate.
predator_conversion_efficiencyPredator gain per prey eaten.
food_resource_indexResource-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.

Rosenzweig-MacArthur Holling type II response and risk table