Examples

Select an example to explore it in the playground.

Beginner - Introductory Models

Fishery Simulation

A miniature world of systems-thinking with stocks, flows, and feedback loops modeling fish population dynamics and ecosystem management.

Level:Beginner

  • Stocks:population
  • Flows:births, quota
  • Feedback Loops:reproduction (reinforcing), quota (balancing)
  • Probes:population, quota, gap_to_capacity, extracted_total

Bathtub Fill and Drain

Simple stock and flow model of water volume in a bathtub.

Level:Beginner

  • Stocks:water_volume
  • Flows:inflow, outflow
  • Probes:water_volume, inflow, outflow

Goal-Seeking Decay

First-order exponential approach toward a goal level, such as medication elimination.

Level:Beginner

  • Stocks:level
  • Flows:approach_rate
  • Feedback Loops:goal-seeking (balancing)
  • Probes:level, approach_rate

Logistic Growth

Simple logistic population growth with saturation.

Level:Beginner

  • Stocks:population
  • Flows:growth
  • Feedback Loops:reinforcing adoption, saturation constraint
  • Probes:population, growth

Nested Hierarchy Workflow

Tasks flow from company to departments and teams, illustrating resource constraints across two levels.

Level:Beginner

  • Flows:arrivals, service
  • Probes:Dept0, Dept1, Dept0-Team0, Dept0-Team1, Dept1-Team0, Dept1-Team1

Queue Simulation

Message processing system demonstrating queuing theory, system capacity, and throughput limitations.

Level:Beginner

  • Stocks:backlog[p]
  • Flows:produced, consumed
  • Probes:backlog_total, incoming_per_sec, outgoing_per_sec

Savings vs Credit-Card Debt

Compares growth of savings and credit-card debt under compounding interest.

Level:Beginner

  • Stocks:savings_balance, debt_balance
  • Feedback Loops:compound interest on savings (reinforcing), compound interest on debt (reinforcing)
  • Probes:savings_balance, debt_balance

Thermostat Simulation

A temperature control system demonstrating balancing feedback loops and time delays in a heating system.

Level:Beginner

  • Stocks:indoor_temp
  • Flows:heat_gain, heat_loss
  • Feedback Loops:controller chasing set-point (balancing), high gain overshoot (reinforcing)
  • Probes:indoor_temp, heater_on
Intermediate - Classic Dynamics

Antifragile System

A simple model where each failure reduces the probability of future failures.

Level:Intermediate

  • Flows:failure
  • Feedback Loops:learning from failure
  • Probes:failure, failure_rate, total_failures

Bank Renege Simulation

Customers join a queue with limited patience and may leave before service if the wait is too long.

Level:Intermediate

  • Stocks:queue
  • Flows:served, reneged
  • Probes:wait_time, served, reneged

Car Service Simulation - SimPy Tutorial

Priority car wash example demonstrating SimPy features like PriorityResource, FilterStore, and interrupts.

Level:Intermediate

  • Stocks:fuel_level, parts
  • Probes:fuel_level, wash_q, parts

Predator-Prey (Lotka–Volterra)

Classic predator–prey model showing oscillating populations.

Level:Intermediate

  • Stocks:prey, predator
  • Flows:prey_births, predations, predator_deaths
  • Feedback Loops:predation cycle
  • Probes:prey, predator

SIR Model with Vaccination

Classic epidemic SIR model with optional vaccination of susceptibles.

Level:Intermediate

  • Stocks:susceptible, infected, recovered
  • Flows:infections, recoveries, vaccinations
  • Feedback Loops:disease spread (reinforcing), herd immunity (balancing)
  • Probes:susceptible, infected, recovered

Sleep Debt Simulation

Models sleep patterns, caffeine intake, and sleep debt accumulation over time with reinforcing and balancing feedback.

Level:Intermediate

  • Stocks:sleep_debt_hours
  • Feedback Loops:coffee reduces sleep (reinforcing), circadian pressure triggers sleep (balancing)
  • Probes:sleep_debt, subjective_energy
Advanced - Complex Simulations

Logistic Map

Iterates the logistic map x_{n+1}=r*x_n*(1-x_n) to illustrate chaotic dynamics.

Level:Advanced

  • Stocks:x
  • Feedback Loops:growth with self-limiting term
  • Probes:x

Machines Simulation

Parts processing system showing resource allocation, machine utilization, and reliability with random breakdowns.

Level:Advanced

  • Stocks:buffer, idle-token store
  • Flows:in_rate, dispatch_rate
  • Probes:in_rate, dispatch_rate, buffer_level, breakdown, repair