The 3D scene
People walk into the hall at random (Poisson) arrival times and are served by up to eight desks; served customers stand at a desk (teal), the others wait in the rope-guarded queue (blue). The two columns on the left compare the number in the system in this one random run (teal) with the deterministic fluid model max(0, N0 + (lambda - c mu) t) (gold); at most 140 people are drawn.
All numbers come from the same lab.js solver as the 2D companion, including the Erlang-C and ensemble checks below. Drag to orbit, scroll or pinch to zoom.
The science
The case-study files model a queue as a fluid: dQ/dt = λ − μ while Q > 0. That is the mean behaviour of a random queue only when the line is long. This lab runs the fluid curve next to many random (Poisson) runs with one to eight servers, so you can see where the fluid story is right and where it is not.
Equations as delivered in the case-study files
dQ/dt=λ−kQ [people/s]; Q(t)=λ/k+(Q₀−λ/k)e^(−kt).
dN/dt = λ−μ [people/s] while N>0; N(t)=max(0,N₀+(λ−μ)t) [people].
dQ/dt = (λ − μ)/60 [people/s] while Q > 0; Q(t) = max(0, Q₀ + (λ − μ)t/60) [people].
dN/dt = λ − μ [persons/s] while N > 0 ; N(t) = max(0, N₀ + (λ − μ)t) [persons] ; W ≈ N/μ [s] for a steady single-capacity fluid-flow approximation
dQ/dt = λ − μ when Q > 0 [people/s] ; Q(t) = max(0,Q₀ + (λ−μ)t) [people] (fluid approximation)
dN/dt = λ−μ [people/s] while N>0 ; N(t) = max(0, N₀+(λ−μ)t) [people] ; Fluid-rate approximation; fractional expectation is not actual person count
What this lab adds
Random model: arrivals at rate λ, departures at rate μ·min(n, c), simulated event by event (Gillespie method)
Fluid model: Q(t) = max(0, N₀ + (λ − cμ) t); unlimited servers: Q(t) = λ/μ + (N₀ − λ/μ) e^(−μt)
Erlang C (c servers, a = λ/μ, ρ = a/c < 1): P_wait = (a^c/c!)/(1−ρ) / [Σ_{k<c} a^k/k! + (a^c/c!)/(1−ρ)], Lq = P_wait ρ/(1−ρ), L = Lq + a
Assumptions in the delivered files
- Continuous fluid approximation with departure rate proportional to waiting queue; not a discrete M/M/1 simulation.
- Deterministic fluid-flow approximation; people are represented by a continuous quantity. Arrival and service rates are constant and waiting times are not individually modelled.
- Constant g = 9.81 m/s², rigid components and fixed coefficients unless adjusted. One-dimensional or planar idealisation; the scene is illustrative, not engineering certification. The analytic overlay is a baseline for the initial settings; interventions can cause divergence.
Honest simplifications of this lab
- Exponential service times and Poisson arrivals; real queues have burstier or more regular patterns.
- Rates are constant; no balking, priorities, breaks or finite waiting room.
- The ramp, slide and shockwave files grouped with the queues in the same pile are different physics (friction on an incline, traffic waves) and are not presets here.
- The ensemble is capped so that the page stays responsive; the number actually used is shown in the readout.
Independent check The page compares the unlimited-server ensemble mean with its closed form (within 4 standard errors), the fluid curve with max(0, …), and long-run M/M/1 and M/M/2 averages with Erlang C; the test file repeats the formulas and runs an independent Python simulation.
Educational model. The 3D scene is a visual aid; walking animation is cosmetic and not part of the model. Numbers, plots and checks are those of the 2D companion.