Little's law check on a simulated queue

Relates the long-run average number of entities in a stable queueing system to their arrival rate and average time in the system. In a DES with constrained resources it is used as a validation check: the simulated average number in the system should match the arrival rate multiplied by the simulated average time in the system.

Signature

L = lambda * W
Inputs
InputsDefinitionUnit
lambdaAverage number of entities arriving per unit of timeentities per unit of time, for example per day
WAverage time an entity spends in the system, waiting plus servicetime, in the unit used for lambda
Output
LLong-run time-average number of entities in the system, waiting or in serviceentities

Function

Event time sampling function

Maps a uniform random number and a fitted time-to-event distribution to a sampled time to the next event for one simulated patient. The sampled time is the value at which the survival function equals the random number, so repeated draws reproduce the fitted distribution. The simulation clock then advances to the earliest scheduled event.

Try this function

Implementations

  • Excel

    Little's law comparison in one cell

    Excel returns the relative gap between the simulated time-average number in the system and the value implied by Little's law, using named cells.

    =ABS(SimulatedL-ArrivalRate*SimulatedW)/SimulatedL

Assumptions

  • Stable system over the observation window

    Arrivals, capacity and service rules do not shift during the observation period, and the system is not in a warm-up phase. The law does not apply mechanically to a transient system.

  • Consistent definitions of the system

    L, lambda and W refer to the same boundary, for example waiting and service together, and use the same time unit.

Worked examples

  • Diagnostic service with 18 arrivals per day

    In the article's illustrative diagnostic service, 18 patients arrive per day and the simulation estimates an average time in the system of 0.30 days, so about 18 × 0.30 = 5.4 patients should be in the system on average.

    lambda = 18; W = 0.30; L = 5.4

Common errors

  • Mixing time units

    Combining an arrival rate per day with a time in the system in hours gives 18 × 7.2 = 129.6 instead of 5.4, which a check with consistent units would flag.

  • Including the warm-up period

    Averaging over a simulation that starts empty includes an artificial low-congestion period, so L and W can both be understated and the check can pass on a misleading run.

Sources

  • Original proof of Little's law

    Little JDC. A proof for the queuing formula: L = λW. Operations Research. 1961;9(3):383-387.

    View source →

  • Simulation output analysis and queueing measures

    Law AM. Simulation Modeling and Analysis. 5th ed. New York: McGraw-Hill Education; 2015.

    View source →

Canonical Identity

Stable URI · Machine-readable · Resolvable · CC BY 4.0