Skip to content

Queue Simulation Sweep

Software or tool — instantiates Batch Size Calibration

A simulation that evaluates candidate batch sizes under stochastic arrivals, service times, and capacity.

When arrivals are bumpy and service times vary, no tidy formula tells you the best batch size — the interactions between queueing, variability, and finite capacity are too tangled to solve on paper. Queue Simulation Sweep is the software tool that answers by experiment in silico: it builds a discrete-event model of the flow, then runs it once per candidate batch size, sweeping across the range and recording what each size actually does to waiting time, throughput, and downstream congestion. Its defining idea is that the cost surface is discovered by simulation rather than derived, so it captures the queueing effects — the nonlinear blow-up in waiting as load and variability rise — that closed-form batch models assume away. Where a formula gives one number under ideal assumptions, the sweep gives a whole curve under realistic randomness.

Example

A clinical laboratory runs blood specimens on an automated analyzer. Specimens don't arrive smoothly — they surge after morning rounds and trickle overnight. The analyzer has a fixed startup routine each time it begins a run, so the lab batches specimens into runs to amortize it. Too-small runs mean the startup routine eats the day; too-large runs mean early specimens sit waiting for the batch to fill, and results to the wards run late.

A queue simulation sweep settles it. Analysts build a discrete-event model fed by a week of real arrival timestamps and measured per-specimen processing times, including their variability. They then sweep candidate run sizes from 10 to 120 specimens, running each through the stochastic model and logging mean and 95th-percentile turnaround time, analyzer utilization, and how often the downstream result-verification desk backs up. The output is a curve, not a point: turnaround is flat and awful for tiny runs, dips to a broad minimum around 30–45 specimens, then climbs as large runs make early specimens wait. Crucially the sweep shows the tail — a run size that looks fine on the average turnaround blows out the 95th percentile during the morning surge, which a deterministic model would never have revealed.

How it works

Its distinguishing move is stochastic, capacity-aware evaluation of each candidate size — it models the randomness a formula cannot, then reads the answer off simulated behavior.

  • Build the model from real variability. Arrival timestamps, service-time distributions, and capacity limits, not smooth averages.
  • Sweep the candidate sizes. Run the simulation once per batch size across the range, with enough replications that the result is statistically stable rather than a lucky seed.
  • Trace the full cost surface. Record waiting time (mean and tail), throughput, utilization, and downstream congestion for each size.
  • Locate the operating minimum, reading it off the simulated curve — typically a broad band rather than a knife-edge, and often chosen on the tail metric that matters under surge.

Tuning parameters

  • Input distributions — the assumed arrival and service-time randomness; the whole result hinges on these matching reality, so they are fitted to data, not guessed.
  • Sweep resolution — how finely candidate sizes are spaced; fine sweeps locate the minimum precisely but cost run time.
  • Replications per size — how many stochastic runs average each point; more replications tighten confidence but multiply compute.
  • Objective metric — whether the minimum is chosen on mean waiting, a tail percentile, throughput, or a blend; the tail choice matters most under bursty load.
  • Warm-up discard — how much of each run's start is thrown away before measuring, so the empty-system transient doesn't bias the steady-state estimate.

When it helps, and when it misleads

It is the tool of choice exactly where closed-form batch sizing fails — variable arrivals, variable service, finite capacity, and the fierce nonlinearity where waiting explodes as utilization approaches one. Queueing theory names this: mean waiting time rises with the variability of arrivals and service, not just their averages, which is why a deterministic optimum can be badly wrong under real burstiness.[1] The sweep is also the only sibling that surfaces the tail of delay, where surges actually hurt.

Its failure mode is the seduction of a detailed model built on wrong inputs: garbage distributions in, precise-looking garbage out, and a simulation's polish makes that garbage persuasive. The classic misuse is fitting the model to a calm week and trusting its optimum through a peak season it never saw. The discipline that guards against it is to fit inputs to representative data including the surges, validate the model against known real behavior before trusting its optimum, and treat the result as a band robust across scenarios rather than a single simulated number.

How it implements the components

  • simulation_or_queue_model — it is a discrete-event queueing model of the flow; this component is its core machinery.
  • batch_cost_surface — sweeping candidate sizes traces the empirical cost-versus-size curve under randomness.
  • interior_optimum_estimator — it locates the operating minimum on that simulated surface, typically a robust band.
  • downstream_absorption_capacity_signal — the model includes downstream stations, so each candidate size reports how much it congests them.

It computes a size under uncertainty but does not profile batch_risk_accumulation_profile or open a batch_size_exception_path to gate a live release — that's Batch Release Gate; and where demand is steady and only two costs matter, the analytic Economic Order Quantity Model reaches the same optimum without simulation.

Editorial Notes

Form Classification

Form family: Analysis, Modeling & Optimization

Rationale: Queue Simulation Sweep operates as an analytical, modeling, inference, comparison, or optimization procedure that derives insight or a solution because it a simulation that evaluates candidate batch sizes under stochastic arrivals, service times, and capacity.

Independent corroboration: The frozen evidence defines Queue Simulation Sweep as 'A simulation that evaluates candidate batch sizes under stochastic arrivals, service times, and capacity', so its operative form is Analysis, Modeling & Optimization.

Review outcome: Independent reviewer agreement; high confidence.

Origin Attribution

Primary origin: Operations Research

Origin pattern: Cross-disciplinary synthesis

Present-day reach: Multi-domain

Rationale: Simulating stochastic arrivals, service times, and capacity over candidate batch sizes is canonical operations research.

Related originating lineages:

Review resolution: Both blind reviewers agree on operations_research as the primary origin. Explicit reconciliation resolves alternate_origin_disagreement, origin_mode_disagreement, domain_reach_disagreement, encyclopedia_synthesis_disagreement. The merged alternate lineages retain only domains the reviewers identified as materially formative; domain_reach=multi_domain records later applicability separately from origin breadth.

Encyclopedia synthesis: The exact catalogued form synthesizes established practice rather than reproducing a single standard historical label.

Review outcome: Reconciled after independent review; high confidence.

References

[1] Kingman's formula (the VUT equation) approximates queue waiting time as a product of terms for utilization and for the variability of arrivals and service — formalizing why waiting blows up nonlinearly as load and variability rise, and why a batch optimum found under deterministic assumptions can be badly wrong. Named for John Kingman (1961). withdrawn registry