Simulation & uncertainty

Queue simulation: utilisation and waiting time

A team can have enough average capacity and still create long queues. This simulation explores how utilisation, variable service times and a second server interact.

  • 4 min read
  • Updated on
  • smartlytics editorial team

The short answer

Queues form when random arrivals temporarily bring more work than available servers can process. High utilisation and variable service times increase waiting. This simulation follows 400 jobs from an empty start until completion.

Try the free interactive calculatorFree · in your browser · no sign-up

At a glance

  1. Average capacity alone does not explain waiting time.
  2. Identical random draws make the one-server and two-server comparison inspectable.
  3. At or above 100% offered utilisation, these assumptions do not give a stable long-run mean.

Why do jobs wait despite spare average capacity?

A service worker needs ten minutes per job on average. That corresponds to six jobs per hour. If 4.8 jobs arrive per hour on average, offered utilisation is 80%. Yet some jobs still cannot start immediately. Two closely spaced arrivals may need the same worker, and one long service can delay everything behind it. Spare time in the morning cannot be carried forward to an afternoon rush.

The simulation makes this timing visible. It generates 400 arrivals and follows every job through completion. One or two identical servers share a single queue. Jobs are served in arrival order, with no abandonment, priorities or interruptions. This use of a limited shared resource follows a standard discrete-event queueing approach (SimPy developers 2026).

Work through a short sequence

Start with three jobs arriving at minutes zero, two and four, each requiring five minutes of service. With one server, they start at zero, five and ten. Their waits are therefore zero, three and six minutes. With two servers, the first two start immediately; the third starts at minute five and waits one minute.

The calculator applies exactly this scheduling principle to a larger sample. For each arriving job, it finds the server that becomes available first. Service starts at the later of the arrival time and that server’s next availability. Start minus arrival gives waiting time; start plus service duration gives completion time. The model moves between events without inventing minute-by-minute time steps.

Mean service time remains ten minutes. Individual times follow a lognormal distribution: they are positive and can have a long right tail. The coefficient of variation is the standard deviation divided by the mean. At zero, every job takes exactly ten minutes; at one, the standard deviation equals the mean. Interarrival times are independent and exponentially distributed.

Experiment with load and variability

Interactive

Queue simulation – interactive calculator

400 jobs arrive at random. A shared FIFO queue assigns them to one or two servers. At 4.8 arrivals per hour and ten minutes of mean service, one server has 80% offered utilisation.

First increase the arrival rate while holding service variability and server count fixed. The line plots waiting time against arrival time, so peaks reveal individual periods of congestion. An average alone hides these differences. The 90th percentile is the waiting time not exceeded by 90% of the 400 simulated jobs.

Next switch to two servers. The calculator reuses exactly the same arrival and service draws. The difference therefore does not come from a luckier second sample. Finally, change variability. Equal mean service times do not imply equal waits; the effect of service variance is a classical topic in queueing theory (Larson, R. C.; Odoni, A. R. 1981).

Read high utilisation carefully

Offered utilisation is ρ=λE[S]/c\rho=\lambda E[S]/c: arrivals per time unit multiplied by mean service duration, divided by the number of servers. The default gives 4.8⋅10/60=0.84.8\cdot10/60=0.8 for one server. Two servers halve that value. This display is calculated from model parameters; it is not a measurement of actual busy time during the short run.

At ρ≥1\rho\ge1, this model cannot produce a stable long-run queue. The calculator still returns finite numbers because no more jobs arrive after the 400th arrival. Those statistics describe a finite run, not a stationary average. Even below the boundary, the empty initial state and limited sample matter. A single reproducible simulation is not a precise capacity guarantee.

From a learning model to staffing decisions

Real systems have daily patterns, appointments, breaks, different skills and related jobs. Some customers leave the queue; others receive priority. This model includes none of those features. In particular, independent random arrivals may be inappropriate for batch deliveries or work released at a common shift start.

A practical application needs arrival, service-start and completion timestamps from a clearly defined process. First check whether the model roughly reproduces known waiting times. Then compare specific staffing or process options using several independent runs and an agreed service target. Keep the time horizon and starting conditions identical when comparing options, so their differences can be interpreted fairly.

The Monte Carlo simulation article explains why additional repetitions reduce sampling error but cannot replace missing process rules. Treat the experiment as a way to understand mechanisms and formulate the next measurement, rather than as a staffing recommendation for an unobserved operation.

Frequently asked questions

Is utilisation below 100% enough?

It is a condition for stable long-run operation here, but does not guarantee short waits. Variability and temporary arrival bursts still matter.

Why is the result finite under overload?

The calculator simulates only 400 jobs from an empty initial state. That finite sample statistic is not a stationary long-run average.

Sources and further reading

  1. OnlineSimPy developers (2026): Shared Resources.
  2. OnlineLarson, R. C.; Odoni, A. R. (1981): Urban Operations Research: M/G/1 Queues.

Content last reviewed on 14 November 2026. Please let us know about any errors: impressum@nyxai.com.

From NyxAI

smartlytics is the learning hub of NyxAI GmbH.

Explore the methods we work with, explained openly, with sources and calculations you can reproduce.

Decision Core

NyxAI is developing a Decision Core for Decision Intelligence that combines optimisation, simulation, statistics and reinforcement learning: compare options, make uncertainty visible and learn from outcomes, with people in control.

DeepSquare

Explainable chess AI with human playing styles: NyxAI’s testing ground for understandable decisions under time pressure.