[Queuing theory | Common models for mathematical modeling]

Basic concepts of queuing theory

statement of problem

If more service equipment is added, investment will be increased or idle waste may occur; if there are too few service equipment, the queuing phenomenon will be serious, which will have adverse effects on customers and even society. Therefore, managers must consider how to strike a balance between the two
in order to improve service quality and reduce costs.

Queuing Theory Research Content*

Queuing theory (queuing theory), also known as random service system theory , is for researching and solving problems withcrowdingIt is a branch of applied mathematics developed from the problem of the problem, and its research content includes three parts:

  1. Sexual issues : the study of variousProbabilistic regularity of queuing systems, mainly to study the distribution of team members , distribution of waiting time and distribution of busy periods , including two situations of transient and steady state.
  2. optimization problem
    static optimal>>Optimal design
    dynamic optimal>> Optimal operation
  3. Statistical Inference Problem : Determining the Type of Queuing System

① General indication

image-20220124133043479

  • Each customer starts from the customer source (overall), waits in line before arriving at the service agency (service desk, waiter) to receive the service, and leaves after the service is completed.
  • The queuing structure refers to the number and arrangement of the queues , and the queuing rules and service rules describe the rules and order in which customers receive services in the queuing system.

A queuing system consists of

  • How many customers arrive on average in a certain period of time?
  • Arrive according to what law (what distribution does the input process obey)?
  • According to what rules are customers entering the system lined up?
  • How many service facilities does the service organization set up? Arrangement form?
  • What distribution does the service time follow?

Service Organization*

image-20220124134025812 image-20220124134047414 image-20220124134104726 image-20220124134136416 image-20220124134200988 uTools_1643002966641

(Three major) composition and characteristics of queuing system*

input process

  • Overall Customers: Limited, Unlimited.
  • Customer arrival method: single, batch.
  • Customer arrival interval time: determined, random.
  • Independence of customer arrival: independent, not independent.
  • Stationarity of the input process: time-independent (stationary), time-dependent (non-stationary).

Queuing and queuing rules

  • Immediate system (loss system)
  • waiting system
    • First come first served: FCFS
    • Last come first served: LCFS
    • Random service: SIRO
    • Priority service: PR
  • Team capacity: limited, unlimited; tangible, intangible.
  • Number of queues: single-column, multi-column.

service organization

  • Number of servers: none, single, multiple.
  • Combination of Queue and Service Desk
  • Service mode: single customer, batch customer.
  • Service time: determined, random. At least one of the service time and the inter-arrival time is random.
  • The service time distribution is stationary.

Basic distribution of queuing theory

Common distributions in queuing theory: Poisson distribution, exponential distribution and Erlang distribution_Norstc's blog-CSDN blog_erlang distribution

Classification of queuing systems*

image-20220124144618359

Operations Research - Queuing Theory (Study Notes) - Know (zhihu.com)

Generally, 6 features can be used to represent a queuing model, namely X / Y / Z / A / B / CX/Y/Z/A/B/CX / Y / Z / A / B / C
indicator

X : X: X: The distribution of the interval between successive arrivals, generally a negative exponential distribution

And: And:Y: The distribution of service time, generally negative exponential distribution or deterministic

Z : Z: Z: The number of service desks, one or more

A : A: A: The limit on the number of customers in the system, whether there is a limit on the maximum number of customers in the system

B : B: B: The number of customer sources, whether the customer sources are limited

C : C: C: Service rules, first come first served or last come first served, etc.

Note: In this section only first come first served is considered, so the last feature service rule is omitted

The commonly used symbols are:

M : M: M: negative exponential distribution

D : D: D: deterministic

E k : k E_k:k Ek:Erlang distribution of order k

G: G:G: General service time distribution

Such as standard M / M / 1 / ∞ / ∞ M/M/1/\infty/\inftyM / M / 1 / / model means: the input process obeys the Poisson distribution, the service time obeys the negative exponential distribution, the system capacity is unlimited and the customer source is infinite

Common Indicators*

  • Captain: L s LsL s : Length of System refers to the number of customers in the system

  • Queue length: L q LqL q : length of qeuen refers to the number of customers in the queue

  • The number of customers in the system (L s ) = the number of customers in line ( L q ) + the number of customers being served The number of customers in the system (Ls) = the number of customers in line (Lq) + the number of customers being servedNumber of customers in the system ( L s )=Number of customers in line ( L q )+Number of customers being served _

  • Length of stay: W s WsW s : Staying time refers to the average stay time of customers in the queuing service system from entering to leaving after the service is completed, and the expected value is recorded asW s WsWs

  • Waiting time: W q W qW q : Waiting time refers to the average waiting time of customers waiting in line for service, and the expected value is denoted asW q WqWq

  • Busy period: the length of time from when a customer arrives at an idle service agency to when the service agency becomes idle again, that is, the length of time that the service agency is continuously busy, which is related to the work intensity of the waiter. Both the busy period and the average number of customers served in a busy period are indicators to measure the efficiency of a service organization.

  • loss rate

  • service intensity

image-20220124151654750

Probability distribution of system state*

image-20220124150421679

at time ttt , the system state isnnThe probability of n can be expressed asP n ( t ) P_n(t)Pn(t)

image-20220124150847747

image-20220124151203854

example

M/M/1 model

There is only one repair worker in a repair shop. The number of arrivals of customers who come to repair obeys the Poisson distribution, with an average of 3 people per hour. The repair time obeys a negative exponential distribution, and the average time required is 10m minutes. Find

  1. Repair shop free time probability
  2. The probability that there are four customers in the store
  3. The probability that there is at least one customer in the store
  4. Average number of customers in the store
  5. Average number of customers waiting to be served
  6. Average length of stay in store
  7. Average waiting time for repair

If the number of arrivals obeys the Poission distribution, then the interarrival time obeys a negative exponential distribution

Negative exponential distribution (the density function is λ e − λ t \lambda e^{-\lambda t}λeλ t ) is equivalent to the Poisson distribution of the input process

M (negative exponential distribution, with no memory)

λ \lambdaλ : The average number of arriving customers per unit time

1 λ \frac{1}{\lambda}l1​: Average time of arrival of consecutive customers

μ \muμ ​: Average number of customers served per unit time

vvv ​: service time, that is, the interval between two customers who leave the system one after another

ρ = λ μ \rho=\frac{\lambda}{\mu}r=ml ρ \rho ρ stands for service strength

1.Determine the voltage rangeλ
= 3 µ = 60 / 10 = 6 ρ = λ µ = 3 6 = 1 2 P 0 = 1 − ρ = 1 2 \lambda=3 \\ \mu=60/10=6 \\\rho=\frac{\lambda}{\mu}=\frac{3}{6}=\frac{1}{2}\\P_0=1-\rho=\frac{1}{2}l=3m=60/10=6r=ml=63=21P0=1r=21
2. The probability of having four customers in the store
P 4 = ( 1 − ρ ) ρ 4 = 1 32 P_4=(1-\rho){\rho}^4=\frac{1}{32}P4=(1r ) r4=321
3. The probability of having at least one customer in the store
P ( n ≥ 1 ) = 1 − P 0 = 1 2 P(n \ge 1)=1-P_0=\frac{1}{2}P(n1)=1P0=21
4. 在店内安客全线数
L s = ∑ n = 0 ∞ n ⋅ P n = ∑ n = 0 ∞ n ( 1 − ρ ) ρ n = ( 1 − ρ ) ρ + 2 ( 1 − ρ ) ρ 2 + 3 ( 1 − ρ ) ρ 3 + 4 ( 1 − ρ ) ρ 4 + . . . = ( ρ − ρ 2 ) + ( 2 ρ 2 − 2 ρ 3 ) + ( 3 ρ 3 − 3 ρ 4 ) + ( 4 ρ 4 − 4 ρ 5 ) + . . . = ρ + ρ 2 + ρ 3 + ρ 4 = ρ 1 − ρ \begin{array}{l} Ls = \sum_{n = 0}^{\infty } n \cdot P_n \\= \sum_{n = 0}^{\infty }n (1-\rho){\rho}^n \\= (1-\rho){\rho}+2(1-\rho){\rho}^2+3( 1-\rho){\rho}^3+4(1-\rho){\rho}^4+... \\=({\rho}-{\rho}^2)+(2{\ rho}^2-2{\rho}^3)+(3{\rho}^3-3{\rho}^4)+(4{\rho}^4-4{\rho}^5)+ ... \\={\rho}+{\rho}^2+{\rho}^3+{\rho}^4 \\=\frac{\rho}{1-\rho} \end{array }Ls=n=0nPn=n=0n(1r ) rn=(1r ) r+2(1r ) r2+3(1r ) r3+4(1r ) r4+...=( rr2)+( 2 p22 p3)+( 3 p33 p4)+( 4 p44 p5)+...=r+r2+r3+r4=1 pr

L s = ρ 1 − ρ = 1 2 1 − 1 2 = 1 Ls=\frac{\rho}{1-\rho}=\frac{\frac{1}{2}}{1-\frac{1}{2}}=1 Ls=1rr=12121=1

5. ប្រ្រ្រ្រ្រ្រ្រ្រ្រ្រ្រ្រក្
L q = ∑ n = 1 ∞ ( n − 1 ) ⋅ P n = p 2 + 2 p 3 + 3 p 4 + 4 p 5 + ⋯ = ( 1 − ρ ) ρ 2 + 2 ( 1 − ρ ) ρ 3 + 3 ( 1 − ρ ) ρ 4 + 4 ( 1 − ρ ) ρ 5 + ⋯ = ρ 2 − ρ 3 + 2 ρ 3 − 2 ρ 4 + 3 ρ 4 − 3 ρ 5 + 4 ρ 5 − 4 ρ 6 + ⋯ = ρ 2 + ρ 3 + ρ 4 + ρ 5 + . . . = ρ 2 1 − ρ \begin{array}{l} Lq=\sum_{n=1}^{\infty}(n-1) \cdot P_{n} \\=p_{2}+2 p_{ 3}+3 p_{4}+4 p_{5}+\cdots \\=(1-\rho) {\rho}^{2}+2(1-\rho) \rho^{3}+3 (1-\rho) \rho^{4}+4(1-\rho) \rho^{5}+\cdots \\=\rho^{2}-\rho^{3}+2 \rho^ {3}-2 \rho^{4}+3 \rho^{4}-3 \rho^{5}+4 \rho^{5}-4 \rho^{6}+\cdots \\={ \rho}^2+{\rho}^3+{\rho}^4+{\rho}^5+... \\=\frac{\rho^2}{1-\rho} \end{ array}Lq=n=1(n1)Pn=p2+2p3+3p4+4p5+=(1r ) r2+2(1r ) r3+3(1r ) r4+4(1r ) r5+=r2r3+2 p32 p4+3 p43 p5+4 p54 p6+=r2+r3+r4+r5+...=1 pr2

L q = ρ 2 1 − ρ = ( 1 2 ) 2 1 − 1 2 = 1 2 Lq=\frac{\rho^2}{1-\rho}=\frac{(\frac{1}{2} )^2}{1-\frac{1}{2}}=\frac{1}{2}Lq=1rr2=121(21)2=21

6. Average length of stay in the store

Assuming that there are already n customers when the customer arrives, according to the first-come-first-served rule, the customer’s stay time in the system
W n = T 1 ′ + T 2 + ⋯ + T n + T n + 1 W_{n} =T_{1}^{\prime}+T_{2}+\cdots+T_{n}+T_{n+1}Wn=T1+T2++Tn+Tn+1
T 1 ′ T_{1}^{\prime} T1The service time required for the first customer being served;

T i ( i − 2 , . . . , n + 1 ) T_i(i-2,...,n+1) Ti(i2,...,n+1 ) Independent and identically distributed, both parameters areμ \muThe negative exponential distribution of μ ,T 1 ′ T_{1}^{\prime}T1Due to no memory, it also obeys the parameter μ \muThe negative exponential distribution of μ , so that W n W_nWnobey ( n + 1 ) (n+1)(n+1 ) Order Erlang distribution
f W n ( t ) = μ ( μ t ) nn ! e − μ tt ⩾ 0 f_{W_{n}(t)}=\frac{\mu(\mu t)^{ n}}{n !} e^{-\mu t} \quad t \geqslant 0fWn(t)=n!μ(μt)neμ tt0

F ( t ) = p ( W ⩽ t ∣ n ) = ∑ n = 0 ∞ p n ⋅ p ( W ⩽ t ∣ n ) = ∑ n = 0 ∞ ( 1 − e ) e n ⋅ ∫ 0 t μ ( μ t ) n n ! e − μ t d t = 1 − e − ( μ − λ ) t t ≥ 0 \begin{array}{l} F(t)=p(W \leqslant t | n) & \\=\sum_{n=0}^{\infty} p_{n} \cdot p(W \leqslant t \mid n) \\=\sum_{n=0}^{\infty}(1-e) e^{n} \cdot \int_{0}^{t} \frac{\mu(\mu t)^{n}}{n !} e^{-\mu t} d t \\=1-e^{-(\mu-\lambda) t} \quad t \ge 0 \end{array} F(t)=p(Wtn)=n=0pnp(Wtn)=n=0(1and ) andn0tn!μ(μt)neμtdt=1e( μ λ ) tt0

So WWW obeys the parameterμ \muNegative exponential distribution of μ
f ( t ) = ( μ − λ ) e − ( μ − λ ) t ≥ 0 f(t)=(\mu - \lambda)e^{-(\mu - \lambda)t} \quad \ge 0f(t)=( ml ) e( μ λ ) t0

W s = average stay time = 1 μ − λ = 1 6 − 3 = 1 3 hours = 20 minutes \begin{array}{l} Ws=average stay time\\=\frac{1}{\mu - \lambda } \\=\frac{1}{6-3} \\=\frac{1}{3} hours\\=20 minutes\end{array}Ws=average length of stay=m l1=631=31hour=20 minutes _

7. Average waiting time for repair
W q = W s − EV = W s − 1 μ = 1 6 − 3 − 1 6 = 1 6 hours \begin{aligned} W_{q} &=W_{s}-EV \\ &=W_{s}-\frac{1}{\mu} \\ &=\frac{1}{6-3}-\frac{1}{6} \\ &=\frac{1}{6 }hour\end{aligned}Wq=WsEV=Wsm1=63161=61hour

Guess you like

Origin blog.csdn.net/weixin_46421722/article/details/122797783