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. Case-study presets reuse the parameter sets, titles and captions of ChatGPT-generated simulations delivered for MySimulator; the physics core here is a richer shared model.