Examples tagged with queuellms.txt

Select an example to explore it in the playground.

Beginner - Introductory Models

Queue Simulation

A single-server queue at the edge of overload: nudge utilization past 1 and the backlog diverges.

Level: Beginner

queuethroughputbottleneckdiscrete-eventservicecapacity

  • Stocks: backlog
  • Flows: arrivals, served
  • Probes: backlog, utilization, throughput
Intermediate - Classic Dynamics

Bank Renege Simulation

At a teller running near capacity, patience decides everything: impatient customers give up before a line even forms - half walk out - while patient ones build a long queue yet nearly all get served.

Level: Intermediate

queueservicediscrete-eventreneging

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

Hospital ER Patient Flow

Queuing theory demo of patient flow through an emergency department.

Level: Intermediate

queuehealthcareresource-managementprioritization

  • Stocks: beds
  • Flows: arrivals, departures
  • Feedback Loops: staffing effects
  • Probes: wait_low, wait_med, wait_high, bed_util, lwbs, served

Matchmaking Queue

Simulates skill-based matchmaking with adjustable buckets, skill delta and max wait.

Level: Intermediate

matchmakingqueuegamefairness

  • Probes: queue_len, avg_wait, avg_delta

Ride-Share Surge Control

Dynamic pricing stabilises rider waits—until high gain and delay turn it into surge whiplash.

Level: Intermediate

queuepricingelasticitybalancing-loopdelayoscillation

  • Stocks: Riders Waiting, Idle Drivers, Drivers on Trip
  • Flows: Passenger Arrivals, Driver Logins, Matches, Trip Completions, Driver Logouts
  • Feedback Loops: Wait-driven surge (balancing), High-gain with delay (reinforcing oscillation)
  • Probes: price_multiplier, wait_estimate, riders_waiting, idle_drivers, arrival_rate, driver_logins, matches_per_min
Advanced - Complex Simulations

Car Service Simulation - SimPy Tutorial

A car service simulation showing priority washing with features like interrupts.

Level: Advanced

simpypriorityservicemaintenancequeueinterruptsdiscrete-eventreliabilityworkflow

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

Machines Simulation

A machines simulation depicting resource allocation and reliability.

Level: Advanced

reliabilityresource-managementmaintenancequeuethroughput

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