The Queueing Laboratory

An Engine of Operations

Capacity Planning & Operations Optimization Through Stochastic Simulation

Welcome to the Queueing Laboratory

This interactive laboratory provides hands-on exploration of queueing theory and capacity planning under uncertainty through browser-based stochastic simulation. All computation runs entirely in your browser using Python (via Pyodide) with no server dependencies.

Operational systems across all industries face a fundamental challenge: demand arrives randomly following a Poisson process, creating variability that simple average-based planning cannot address. Whether it's patients arriving at an emergency department, customers calling a service center, orders entering a manufacturing system, or requests hitting a web server—the core problem is identical: how much capacity is needed when arrivals are uncertain?

Traditional capacity planning methods that assume constant, predictable demand systematically fail in stochastic environments. A system with 80% average utilization (seemingly comfortable) can experience severe congestion simply due to natural arrival clustering. Through ensemble simulation (60+ parallel realities), we capture the full spectrum of operational volatility and identify optimal capacity configurations that account for this inherent variability.

Our time-path visualizations reveal system dynamics during normal operations and surge scenarios, showing exactly how long it takes systems to recover from demand spikes—critical for capacity planning in healthcare, manufacturing, retail, telecommunications, and service operations. This enables evidence-based answers to fundamental operations questions: How many servers? How much buffer capacity? What service level can we promise?

Surge Scenario Analysis — Each model supports testing multiple demand magnitudes (baseline, 2×, 3×, 5× arrivals) with visual recovery analysis. Test resilience across industries: emergency departments preparing for mass casualty events, call centers handling product launches, manufacturing facilities managing seasonal demand spikes, or retail operations navigating holiday rushes.

Each model below addresses a fundamental queueing scenario with examples spanning multiple industries:

M/M/c Standard Queue

INFINITE CAPACITY MODEL

The foundational multi-server queue with Poisson arrivals and exponential service times. Assumes unlimited waiting capacity—the theoretical baseline for all queueing analysis.

🏭 Industry Applications:
  • Healthcare: Emergency department physician staffing, operating room scheduling
  • Manufacturing: Assembly line workstations, quality inspection stations
  • Retail: Checkout lanes, customer service desks
  • Call Centers: Agent staffing for inbound customer service
  • Transportation: TSA security screening, toll booth lanes

Key Insight: Utilization (ρ) must stay below 100% for stability. At 90% utilization, wait times become highly volatile across all industries. The "elbow" typically occurs around 75-80% utilization—whether you're staffing nurses or configuring servers.

Explore M/M/c Model →
🔄

Finite Capacity (M/M/c/K)

BLOCKING PROBABILITY MODEL

Extends M/M/c with a maximum system capacity K. When K entities are in the system (served + waiting), new arrivals are rejected or diverted. Critical for resource-constrained environments across all industries.

🏭 Industry Applications:
  • Healthcare: ICU bed management, inpatient capacity with fixed bed counts
  • Manufacturing: Buffer storage limits, work-in-process constraints
  • Retail: Parking lot capacity, restaurant seating limits
  • Cloud Computing: Connection pools, server capacity limits
  • Telecommunications: Circuit-switched networks, trunk line capacity

Key Insight: Blocking probability (PB) rises exponentially near capacity. Operating at >90% of K creates cascading failures—whether it's hospital ambulance diversions overwhelming neighboring facilities or network congestion triggering packet loss across infrastructure.

Explore M/M/c/K Model →

Priority Queue (Non-Preemptive)

PRIORITY CLASSIFICATION MODEL

Implements priority logic where high-priority entities receive preferential service. Does not interrupt service-in-progress (non-preemptive). Redistributes variance—reduces wait for critical tasks, increases wait for routine tasks.

🏭 Industry Applications:
  • Healthcare: Emergency triage (ESI), trauma activation protocols
  • IT Operations: Help desk tickets (P1/P2/P3), incident management
  • Airlines: Priority boarding, baggage handling for premium passengers
  • Manufacturing: Rush orders vs. regular production scheduling
  • Call Centers: VIP customer routing, escalated complaint handling

Key Insight: Priority systems don't create capacity—they shift variance. Low-priority wait times can explode to 10-20× high-priority waits at high utilization. Whether it's IT tickets, airline boarding, or emergency triage, this requires careful equity and fairness considerations.

Explore Priority Model →
🚪

Reneging/Abandonment

PATIENCE-LIMITED MODEL

Models customer abandonment when wait times exceed individual patience thresholds. Entities leave without service (balking), creating revenue loss and poor outcomes. Self-regulating but costly across all service industries.

🏭 Industry Applications:
  • Healthcare: LWBS (Left Without Being Seen) in emergency departments
  • Call Centers: Caller abandonment, average speed of answer (ASA) targets
  • E-commerce: Shopping cart abandonment, checkout dropout rates
  • Restaurants: Customer walk-outs from excessive wait times
  • Online Services: User session timeouts, page load abandonment

Key Insight: Abandonment creates a natural upper bound on queue length but at the cost of lost revenue and customer dissatisfaction. A 5% LWBS rate in healthcare, 10% call abandonment, or 20% cart abandonment each represents massive revenue leakage—often millions annually for mid-sized operations.

Explore Reneging Model →