DISCRETE-EVENT SIMULATION · 13 min

Discrete-Event Queueing: Building and Validating the Browser M/M/c Simulation

Poisson arrivals, exponential service, event state and the tests that keep an animation from becoming theater.

What the showcase simulates

The browser simulation represents a pooled multi-server queue. Arrival counts over each simulation interval are sampled from a Poisson distribution; individual service durations are sampled exponentially. Those choices correspond to the M/M/c assumptions used by the analytical queueing lab.

Why the stochastic mechanism matters

A smooth fractional-arrival accumulator can produce a visually busy queue without actually being a Poisson process. The audited implementation now samples Poisson arrival counts explicitly. Service sampling uses the exponential inverse transform −ln(U)/μ.

State drives both animation and analytics

Entities move through queue and service states; the visible animation and reported queue/wait metrics derive from the same simulation state. That architecture is preferable to animating decorative objects independently of the model being measured.

Controls and interpretation

Changing arrival intensity, service rate or server count changes congestion. One stochastic run is not an estimate of a distribution, however. The animation is primarily a mechanism demonstration; decision-grade simulation requires replications, warm-up treatment, confidence intervals and controlled random-number experiments.

Analytical cross-check

When the simulation is configured as a stable stationary M/M/c system and run sufficiently long across replications, its long-run averages should approach Erlang-C expectations within sampling error. Little’s Law provides another conservation check. This is why the analytical and simulation showcases are useful together.

Validation checks

Zero arrivals must produce zero throughput after the system drains. Increasing practical service capacity should reduce congestion in expectation, not necessarily in every short random trace. Fixed seeds should reproduce a trace. Queue discipline, resource count, event timing and units should be testable independently of the animation.

Limits

The browser demonstration is not a production simulation package. It does not yet provide formal replication analysis, transient deletion, arbitrary empirical distributions, calendars, priorities or skill matrices. Those omissions are explicit rather than hidden behind visual polish.

← Queueing & Staffing Lab: Erlang C, Stability and Little’s Law Cross-ChecksAll WritingNetwork Science for Engineers: Stop Treating Dependencies Like a List →LAB 10 · Open companion Lab ↗