02 - Fundamentals fo Queuing Theory - OMT
02 - Fundamentals fo Queuing Theory - OMT
Queues appear when a flow of vehicles, persons or objects wants to receive a service that implies a restriction. Typically, services have a limited capacity or are offered only with some frequency, which may lead to queues, delays and waits.
The subject that studies queues is referred to Queuing Theory (see also 03. Variabili Aleatorie#Teoria delle code, 05. Teoria del Deflusso#Teoria delle code).
Most of the complexities of queuing theory come from the stochastic nature of the processes involved.
Components of a queuing system
Server: the restriction
Storage: where the costumer waits
Arrivals: the ones that feed the queue
Departures: the yield after service
Server
In a queuing system, the server represents the restriction of the system. The server is able to provide the service at a certain rate,
Server disposition
In any system, there can be more than 1 server. The
Servers in parallel
When the servers are localized in parallel, they can work at the same time. These are differentiated based on how the queue works:
- #Decentralized system
- #Centralized queue
One problem that might arise with parallel service, is that the servers are not positioned in space in an efficient way. It may happen that the queue blocks some other server. This could happen, for example, at a petrol station where two pumps are one after the other and there is not enought space for cars to overtake each other.
Decentralized system
In a decentralized system, each server has its own queue.
Centralized queue
In a centralized queue, there are multiple servers but only 1 queue.
The centralized queue, if well managed, can maximize the capacity and efficiency of the system. In fact, in this case, no server will ever be idle, while there are other servers working.
It also guarantees the #First Come First Serves - FCFS functioning.
In these kind of systems, it is important to implement adequate information system that assigns customers to servers at due time. This needs to ensure that there is no idle server at any time.
This can be challenging, especially when it takes a long time for the costumer to get to the server from the end of the queue (think of container ships waiting outside a port).
Servers in series
Tandem queues
In this kind of systems costumers need to undertake several steps to receive a complete service.
For example, in an airport, a passenger has first to check-in, thank go through security, and finally queue to board the plane. Seen as a whole, this is a tandem queue.
In this scenario, the departure from the previous server, is the arrival of the subsequent one.
Storage
Arrivals
Departures
Queuing disciplines
Queuing discipline is a non-physical component of a queuing system. It refers to the rules which determine in which order the costumers are served.
The most common ones are:
- #First Come First Serves - FCFS
- #Last Come Last Serves - LCLS
- #Service in Random Order - SIRO
- #Round Robin - RR
Sometimes, there can be priorities assigned to some kind of costumers, leading to a new type of discipline:
First Come First Serves - FCFS
This is the most common discipline when dealing with human costumers.
In FCFS discipline, service is provided in the same order of arrivals.
This doesn't mean that the first costumer to enter will also be the first one to exit as, with #Servers in parallel, some server may be faster than another allowing for overtakes in the system.
Last Come Last Serves - LCLS
In LCLS discipline, costumers are served in the reversed order of arrival.
This happens when the #Storage is in a closed space and the entrance and exit are the same "door".
For example an airport shuttle bus will unload first the passengers that boarded the bus at last and viceversa.
Service in Random Order - SIRO
In SIRO discipline there is no preset order and the costumer is selected randomly from the queu.
This system is mostly applied to industrial processes where the costumer are different items in a production line.
Round Robin - RR
In RR discipline, each costumer is assigned the same amount of service time. If the service is not completed in said time, the costumer returns back into the queue.
This discipline applies in the communication networks.
Early Due Date First - EDDF
Shortest Service Time First - SSTF
Cumulative plot
A cumulative plot -
Properties of the cumulative plot:
- It's a discrete function
- It's always increasing or, at most, constant
The flow of vehicles or passengers
where
the period of observation
The plot can be obtained in 2 ways:
- Every time a customer enters the system, the time and the cumulative number of customer is recorded
- Every a predefined
, the cumulative number of customer that entered the system in that time interval is recored
When a large number of customer is recorded, the jumps of the
In this situation, we can calculate the instantaneous flow
Input-output diagram
An input-output diagram is the overlay of 2 #Cumulative plot:
-
cumulative plot measured at location , before the system being measured. In other words, the #Arrivals -
cumulative plot measured at location , after the system being measured. In other words, the #Departures
The diagram above is an input-output diagram.
Notice that the horizontal distance between the 2 curves at a given number of cumulative costumers,
- Potential delays
- Free flow service time
Instead, the vertical distance between the 2 curves at a given instant
- The customer being served at the moment
- The customers waiting to be served
The
It the 2 curves match, it means that the system is empty of customers.
In the diagram above, other than the input-output diagram, the amount of customers in service and in queue at any given time is also shown:
A logistic curve
We will now consider an #Input-output diagram with a large number of customers, so that the curves can be seen as continuous functions.
In the input-output diagram, the Arrival curve
The arrival rate is always relatively small at the two extremes while it picks in the middle (the arrival rate,
The departure curve instead, has a fixed maximum rate,
From a normal #Input-output diagram we can easily read the sum of the service time and delay, and the total accumulation (number of customer being served + customers queuing).
It is useful to be able to read directly the delay and the excess accumulation. This can be done through the #Virtual Arrivals Curve
3D representation of input-output diagram
If we want to visualize both vehicles trajectories and input-output diagram on the same chart, we can do so in a 3D diagram:
The projection of this diagram on the (
We can also look at the two projection one under the other to visualize everything on a single plane:
Virtual Arrivals Curve
The Virtual Arrivals Curve is a curve obtained by moving the arrival curve (
It can also be defined as the #Departures curve that would be measured in the absence of delay.
What we obtain:
Excess accumulation
Excess accumulation is the number of extra costumer that we have in the system due to the fact that there is a queue forming.
The Excess accumulation can be obtained as the vertical distance in the
Average excess accumulation
We define the area
as the total aggregated delay in the period
We can calculate Average excess accumulation (
Take some time to think on the meaning of the average excess accumulation:
The average excess accumulation
The diagram shows a stretch of road in 2 scenarios:
- No queue: cars move freely at the same speed
- We count 2 veh in the area of interest (the one in the orange dashed box)
- Queue: Some cars are queueing in the area of interest
- We count 5 cars
Notice that, of the 5 cars in the boxed area, even without queue, there would be 2. Meaning, the excess accumulation is NOT 5, but just 3.
Delay
The Delay (
Delay can be obtained as the horizontal distance in the
Average delay per costumer
We define the area:$$
W_{2} \quad \rm[costumers]
\begin{align}
\text{Knowns: }&
\begin{cases}
V(t): \text{Measured when there are few people} \
\mu : \text{Max service flow (it's a property of the facility)}
\end{cases} \ \
\text{Unknowns: }&
\begin{cases}
\overline{w}\
\overline{Q}
\end{cases} \quad \Longrightarrow\text{We need the }D(t)
\end
\begin{cases}
D(t) < V(t) \quad \forall t \
\dot{D}(t) < \mu \quad \forall t
\end