Skip to Main Content Skip to Search
Accelerating the pace of engineering and science

 

M/M/1 Queuing Simulation

Contents

Overview

This model shows queuing simulation of a single-queue single-server system having a single traffic source and an infinite storage capacity. In the notation, the M stands for Markovian; M/M/1 means that the system has a Poisson arrival process, an exponential service time distribution, and one server. Queuing theory provides exact theoretical results for some performance measures of an M/M/1 queuing system and this queuing simulation makes it easy to compare empirical results with the corresponding theoretical results.

Structure of Queuing Simulation Model

The model includes the components listed below:

  • Time Based Entity Generator block: It models a Poisson arrival process by generating entities (also known as “customers” in queuing theory).
  • Exponential Interarrival Time Distribution subsystem: It creates a signal representing the interarrival times for the generated entities. The interarrival time of a Poisson arrival process is an exponential random variable.
  • FIFO Queue block: It stores entities that have yet to be served.
  • Single Server block: It models a server whose service time has an exponential distribution.
Queuing Simulation of M/M/1 system consists of a server and a queue with infinite capacity Adjusting the arrival rate gain during the queuing simulation

Queuing Simulation Results and Displays

The model includes these visual ways to understand its performance:

  • Display blocks that show the waiting time in the queue and the server utilization
  • A scope showing the number of entities (customers) in the queue at any given time
  • A scope showing the theoretical and empirical values of the waiting time in the queue, on a single set of axes. You can use this plot to see how the empirical values evolve during the simulation and compare them with the theoretical value.
Block showing the wait time in the queue Block showing the server utilization in the queue Showing the number of entities in the queue Showing the theoretical and empirical values of the waiting time in the queue

Theoretical Results

Queuing theory provides the following theoretical results for an M/M/1 queue with an arrival rate of $$ \lambda $$ and a service rate of $$ \mu $$:

  • Mean waiting time in the queue =

The first term is the mean total waiting time in the combined queue-server system and the second term is the mean service time.

  • Utilization of the server =

This queuing simulation allows you to compare empirical values from the simulation with theoretical values.

Experimenting with the Model

Move the Arrival Rate Gain slider during the simulation and observe the change in the queue content, shown in the Q Content Scope.

References

[1] Kleinrock, Leonard, Queueing Systems, Volume I: Theory, New York, Wiley, 1975.

Free Discrete Event Simulation Technical Kit

Model electronic system architectures, process flows, and logistics as queuing systems or agent-based systems.

Get free kit

Trials Available

Try the latest version of discrete-event simulation products.

Get trial software
Contact sales
Trial software

Get Pricing and
Licensing Options