Introduction to Queuing Theory


This text refers to Wentzel E. S. 《Research operations》.

1. Theoretical background

Queuing theory, also known as mass service theory, refers to a theoretical situation of serving a large number of people under limited service conditions. Common scenes in daily life, such as phone booths queuing, customers waiting for haircuts, ticket windows, store checkouts, etc.

Obviously, there are some commonalities in these queuing scenarios. like:

  1. Each queuing scenario must include several "service personnel", which are called service channels . There can be one or more service channels in a queuing context.
  2. Each queuing scenario must also include several application streams (or request streams), and these requests enter the queuing system at a random moment.
  3. An application that is currently being processed takes a certain amount of time, after which time the lane processing that application is "emptied out" and awaits the processing of the next application.
  4. When there are redundant applications waiting to be processed, the application has two situations: either waiting to be processed, forming a "queue" (that is, queuing), or leaving the service channel.
  5. In addition to the situation in 4, a service channel may also be in a state of partial load or shutdown.

The number of applications that can be successfully processed by a service channel is called passability . The queuing theory studies the application flow, the number of service channels, the working capacity of the service channels, the working rules of the queuing system, and work efficiency.

Generally, the efficiency characteristics of a queuing system can be measured in the following ways:

  • The average number of applications that can be processed per unit time;
  • Percentage of applications that could not be fulfilled, rendering the queuing system unserviceable;
  • The probability that a submitted application will be processed in a timely manner;
  • Average time spent waiting in line;
  • The distribution law of the waiting time;
  • The average number of applications in the application queue;
  • The distribution law of the number of applications in the queue;
  • The average income brought by the queuing system per unit time.

2. Mathematical method of research

Mathematical modeling of a queuing system would be straightforward if the stochastic process in the queuing system was a Markov process. Whereas, if the process in the queuing system is indeed a Markov process, then the stream of events occurring one after the other must be a Poisson process , i.e. each individual event has no corresponding consequences or follow-up actions. For the queuing process, it is required that both the application flow and the service flow satisfy the Poisson process. However, it has been proved that the more complex the queuing system and the more service channels, the more it can approximate the Markov process. Therefore, it is not a big problem to use Markov process to study queuing theory.

Before studying the queuing process, several basic parameters in the system need to be known.
nn – the number of service channels;
λ \lambdaλ – strength of application flow;
μ \muμ – The processing capacity (working capacity) of each service channel, that is, the average number of applications that can be processed per unit time per service channel;
the conditions for forming a queue (if any).

Assume that the application flow and service flow in the queuing system are Poisson processes, and they are constant, and the parameters do not change with time. And the time interval between every 2 events TTT is a random variable whose distribution satisfies the following probability distribution density function:
f ( t ) = λ e − λ t ( t > 0 ) f(t) = \lambda {\rm e}^{-\lambda t} \quad (t > 0)f(t)=λe- t _(t>0)

3. Deny queuing system and waiting queuing system

There are 2 types of queuing systems:

  • rejection type. When all service lanes are occupied, new applications are rejected, leaving the queuing system and not participating thereafter.
  • waiting type. When all service channels are occupied, new applications are added to the waiting queue. When a channel finishes processing the previous application and becomes empty, an application is transferred from the waiting queue to the channel and processed.

Next, we will focus on the mathematical model of the rejection queuing system.

4. Deny queuing system

For the rejection queuing system, the index to measure its efficiency is called absolute passability , which refers to the average number of applications that the system can process per unit time . The corresponding concept is relative passability , which refers to the ratio of the average number of applications processed by the system per unit time to the number of new applications within that time period .

Let there be nn in the systemn service channels. According to the number of occupied channels, the status of the system is divided into the following categories:
S 0 S_0S0– all service channels are empty;
S 1 S_1S1– only one service channel is occupied, all other channels are empty;
⋯ \cdots
S k S_k Sk– there is kkk channels are occupied, all other channels are empty;
⋯ \cdots
S n S_n Sn– all nnn channels are all occupied.

The figure below is a schematic diagram of a reject queuing system.
Schematic diagram of a reject queuing system
At the beginning, there is no application in the system, all service channels are empty, and the system status is S 0 S_0S0. When there is an application to join, a service channel is occupied, and the system state changes from S 0 S_0S0becomes S 1 S_1S1,即 S 0 → S 1 S_0 \rightarrow S_1 S0S1, the intensity (or density) of this process is λ \lambdaλ , which can be understood as the addition of λ \lambda per unit timeλ applications. And so on, until allnnAll n channels are occupied. During the transition from low occupancy to high occupancy, the intensity of each state transition isλ \lambdal .

When the system is in S 1 S_1S1status, and when the application is completed, the system will change to S 0 S_0S0state, that is, S 1 → S 0 S_1 \rightarrow S_0S1S0. The intensity (or density) of this process is μ \muμ , can be understood asan occupied service channel can serve μ \mu in unit timeμ applications. It is worth noting that the intensity of the transition from high occupancy to low occupancy is not allμ \muμ , as shown in the figure,S k + 1 → S k S_{k+1} \rightarrow S_kSk+1SkThe intensity of the process is ( k + 1 ) μ \left( k+1 \right) \mu(k+1)m .

Using the Kolmogorov equation to describe the "input" and "output" of each state in the figure, the Kolmogorov equation of each state can be obtained. For example, for a certain state S k S_kSk, its "output" (that is, from the square S k S_k in the figureSkArrows issued) There are two squares, S k S_kSkλ \lambda on the upper rightλ and the lower leftk μ k \muk μ ; while the "input" (that is, the input boxS k S_kSkarrows) there are also 2, which are squares S k S_kSkλ \lambda on the upper leftλ and the lower right( k + 1 ) μ (k+1) \mu(k+1 ) μ . Then, stateS k S_kSkDetermine the default value
dpkdt = − ( λ + k µ ) pk + λ pk − 1 + ( k + 1 ) µ pk + 1 \frac{ {\rm d} p_k }{ {\rm d} t } = - . \left( \lambda + k \mu \right) p_k + \lambda p_{k-1} + (k+1) \mu p_{k+1}dtdpk=( l+k m )pk+p _k1+(k+1 ) μp _k+1The meaning of the above formula is:

  1. All squares S k S_kSkThe output of is negative, while the input is positive;
  2. There are 2 outputs: 1) λ \lambda on the upper rightλ fromS k S_kSkDeparture with probability pk p_kpk, so the term is − λ pk -\lambda p_kλ pk;2) k μ k \mu in the bottom leftk μ also fromS k S_kSkDeparture, its probability is also pk p_kpk, so the term is − k μ pk -k \mu p_kk μ pk
  3. There are 2 inputs: 1) ( k + 1 ) μ (k+1) \mu in the lower right(k+1 ) μ from the previous stateS k + 1 S_{k+1}Sk+1Starting, the probability corresponds to pk + 1 p_{k+1}pk+1, so the term is ( k + 1 ) μ pk + 1 (k+1) \mu p_{k+1}(k+1 ) μp _k+1;2) λ \lambda on the upper leftλ from the previous stateS k − 1 S_{k-1}Sk1Starting, the corresponding probability is pk − 1 p_{k-1}pk1, so this term is λ pk − 1 \lambda p_{k-1}p _k1
  4. Note: from which square S i S_iSiDeparture with probability pi p_ipiThe subscript of will correspond to the subscript of the square! Probability pi p_ipiDepends on where the arrow starts from, not where it points!

The resulting equation is the same as that of the inverse equation:
dp 0 dt = − λ p 0 + µ p 1 dp 1 dt = − ( λ + µ ) p 1 + λ p 0 + 2 µ p 1 ⋮ dpkdt = − ( . λ + k µ ) pk + λ pk − 1 + ( k + 1 ) µ pk + 1 ⋮ dpndt = − n µ pn + λ pn − 1 (1) \begin{aligned} \frac{ {\rm d} p_0 }{ {\rmd}t} &= - \lambda p_0 + \mu p_1 \\\frac{ {\rmd}p_1 }{ {\rmd}t } &= - \left( \lambda + \mu \right) p_1 + \lambda p_0 + 2\mu p_1 \\ \vdots \\ \frac{ {\rm d} p_k }{ {\rm d} t } &= - \left( \lambda + k\mu \ right) p_k + \lambda p_{k-1} + (k+1) \mu p_{k+1} \\ \vdots \\ \frac{ {\rm d} p_n }{ {\rm d} t } &= - n\mu p_n + \lambda p_{n-1} \\ \tag{1} \end{aligned}dtdp0dtdp1dtdpkdtdpn=λ p0+μ p1=( l+m )p1+p _0+2 p.m _1=( l+k m )pk+p _k1+(k+1 ) μp _k+1=nμpn+p _n1( 1 ) The above equation is calledthe Alamka equation. The initial condition is
p 0 ( 0 ) = 1 , p 1 ( 0 ) = p 2 ( 0 ) = ⋯ = pn ( 0 ) = 0 p_0 (0) = 1, \qquad p_1(0) = p_2(0) = \cdots = p_n(0) = 0p0(0)=1,p1(0)=p2(0)==pn(0)=0 The Elamka equation cannot be solved by hand, and needs to be solved by computer to obtain the resultpi ( t ) p_i(t)pi( t ) isthe probability of each state appearing.

In addition, in practical applications, the boundary probability of the state of interest is often used , which refers to the probability in the steady state mode of the system. Here the formula is given without derivation:
pk = λ k μ ⋅ 2 μ ⋯ k μ p 0 = ( λ / μ ) kk ! p 0 p 0 = 1 1 + λ / μ 1 ! + ( λ / μ ) 2 2 ! + ⋯ + ( λ / μ ) nn ! p_k = \frac{\lambda^k}{\mu \cdot 2\mu \cdots k\mu} p_0 = \frac{ \left( \lambda / \mu \ right)^k}{k!} p_0 \\ p_0 = \frac{1}{ 1 + \frac{\lambda / \mu}{1!} + \frac{ \left( \lambda / \mu \right) ^2}{2!} + \cdots + \frac{ \left( \lambda / \mu \right)^n}{n!} }pk=m2 mk mlkp0=k!( l / m )kp0p0=1+1!l / m+2!( l / m )2++n!( l / m )n1λ / μ = ρ \lambda / \mu = \rhol / m=ρ is calledthe conversion intensity, and its physical meaning is:the average number of incoming (new) requests within the average time of processing a request.

Then the above boundary probability formula can be rewritten as
pk = ρ kk ! p 0 p_k = \frac{\rho^k}{k!} p_0pk=k!rkp0p 0 = 1 1 + ρ 1 ! + p 2 2 ! + ⋯ + ρ nn ! (2) p_0 = \frac{1}{ 1 + \frac{\rho}{1!} + \frac{ \rho^2}{2!} + \cdots + \frac{ \rho^n}{n !} } \tag{2}p0=1+1!r+2!r2++n!rn1( 2 ) Equation (2) is also called Elamka equation.

Obviously, the probability that all channels are occupied is pn p_npn, then the probability of "new application can be processed" is
q = 1 − pnq = 1 - p_nq=1pnThen the absolute passability is
A = λ q = λ ( 1 − pn ) A = \lambda q = \lambda \left(1 - p_n \right)A=λq=l(1pn) then the average number of busy channelsk ˉ \bar kkˉ can be expressed as a weighted sum:
k ˉ = 0 ⋅ p 0 + 1 ⋅ p 1 + ⋯ + n ⋅ pn \bar k = 0 \cdot p_0 + 1 \cdot p_1 + \cdots + n \cdot p_nkˉ=0p0+1p1++npnis the mathematical expectation.
On the other hand, since absolute passability represents the average number of applications processed per unit time, and an occupied service channel can process μ \mu in unit timeμ applications, so the average number of busy channels can also be expressed as
k ˉ = A μ = λ ( 1 − pn ) μ = ρ ( 1 − pn ) \bar k = \frac{A}{\mu} = \ frac{ \lambda \left(1 - p_n \right) }{\mu} = \rho \left( 1 - p_n\right)kˉ=mA=ml(1pn)=r(1pn)

Guess you like

Origin blog.csdn.net/weixin_58399148/article/details/131945472