用户:Alexander Misel/沙盒

排队网络是一种由多个单独队列通过路由网络互连形成的复杂系统。在相关示意图中,我们用圆形符号表示服务台,用连续的矩形表示队列,用箭头标示路由网络。虽然排队网络研究的主要目标是确定网络的平衡分布状态,但在实际应用中,对系统瞬态特性的研究往往更具有基础性意义。

排队论(英语:Queueing theory)是一门研究等待现象的数学理论。[1] 它通过建立数学模型来预测排队长度和等待时间。[1] 由于其研究成果对服务资源配置的决策具有重要指导意义,排队论已成为运筹学中的重要分支学科。

这门学科可以追溯到阿格纳·克拉鲁普·厄兰英语Agner Krarup Erlang的开创性研究。他最初为解决哥本哈根电话交换公司的来电问题建立了理论模型。[1] 这些理论不仅为电信流量工程奠定了基础,还逐步拓展到电信、交通、计算机[2]项目管理等众多领域。目前,排队论在工业工程领域应用尤为广泛,已成为工厂、商店、办公室和医院等场所规划设计的重要工具。[3][4]

描述

排队论是管理科学领域中的重要研究方向之一。管理科学为企业提供了多种科学和数学方法来解决各类问题。[5] 排队分析主要研究等待队列的概率特性,因此其分析结果(即运行特征)具有概率性而非确定性。这些运行特征包括:系统内顾客数量的概率分布、系统内平均顾客数、队列中平均等待人数、顾客在系统内的平均停留时间、顾客的平均等待时间,以及服务台忙碌或空闲的概率等。[5] 排队分析的核心目标是通过计算现有系统的这些特征,并测试各种可能的改进方案。通过对比当前系统与替代方案的运行特征,管理者可以清晰地评估每个方案的利弊得失。这些分析能够帮助管理者做出最终决策,实现成本节约、缩短等待时间、提升效率等目标。常用的排队模型主要包括单服务台和多服务台两种基本类型,具体会在后文详细讨论。这些模型还可以根据服务时间是否固定、队列长度是否受限、源群体是否有限等因素进行细分。[5]

单排队节点

排队系统可以简单理解为一个近似的黑盒模型任务(在不同场景中也称为顾客请求)进入系统后,可能需要等待,接受处理,最后离开系统。

 
A black box. Jobs arrive to, and depart from, the queue.

不过,这个系统并不是一个完全的黑盒,因为我们需要了解它的一些内部运作机制。系统中设有一个或多个服务窗口(server),每个窗口都可以受理一个新到达的任务。当某个任务处理完毕离开后,对应的服务窗口就能继续接待下一个任务。

 
A queueing node with 3 servers. Server a is idle, and thus an arrival is given to it to process. Server b is currently busy and will take some time before it can complete service of its job. Server c has just completed service of a job and thus will be next to receive an arriving job.

举个常见的例子:超市收银台就是一个典型的排队系统(虽然还有其他例子,但这个是文献中最常用的)。顾客来到超市,在收银台办理结账,然后离开。由于每个收银员同一时间只能服务一位顾客,所以这是一个单服务窗口的排队系统。如果规定顾客看到收银员正忙就直接离开,这种情况就是无等待空间的排队系统;如果设置了可容纳 n 位顾客的等候区,则称为具有 n 个等待空间的排队系统。

出生-死亡过程

单个队列(也称为排队节点)的行为可以用出生-死亡过程来描述。该过程刻画了队列中任务的到达和离开动态,以及系统中实时的任务数量。如果用 k 表示系统中的任务数量(包括正在处理的和在缓冲区等待的),那么每当有新任务到达时 k 值加1,任务完成离开时 k 值减1。

系统通过“出生”和“死亡”两种事件在不同的 k 值之间转换。对于每个任务 ,这些转换分别以到达率 和离开率 发生。在队列系统中,这些速率通常被认为是稳定的,不会随队列中任务数量的变化而改变,因此我们可以采用单位时间内的平均到达率和离开率。基于这一假设,该过程的平均到达率 ,平均离开率 

 
A birth–death process. The values in the circles represent the state of the system, which evolves based on arrival rates λi and departure rates μi.
 
A queue with 1 server, arrival rate λ and departure rate μ

Balance equations

The steady state equations for the birth-and-death process, known as the balance equations, are as follows. Here   denotes the steady state probability to be in state n.

 
 
 

The first two equations imply

 

and

 .

By mathematical induction,

 .

The condition   leads to

 

which, together with the equation for    , fully describes the required steady state probabilities.

Kendall's notation

Single queueing nodes are usually described using Kendall's notation in the form A/S/c where A describes the distribution of durations between each arrival to the queue, S the distribution of service times for jobs, and c the number of servers at the node.[6][7] For an example of the notation, the M/M/1 queue is a simple model where a single server serves jobs that arrive according to a Poisson process (where inter-arrival durations are exponentially distributed) and have exponentially distributed service times (the M denotes a Markov process). In an M/G/1 queue, the G stands for "general" and indicates an arbitrary probability distribution for service times.

Example analysis of an M/M/1 queue

Consider a queue with one server and the following characteristics:

  •  : the arrival rate (the reciprocal of the expected time between each customer arriving, e.g. 10 customers per second)
  •  : the reciprocal of the mean service time (the expected number of consecutive service completions per the same unit time, e.g. per 30 seconds)
  • n: the parameter characterizing the number of customers in the system
  •  : the probability of there being n customers in the system in steady state

Further, let   represent the number of times the system enters state n, and   represent the number of times the system leaves state n. Then   for all n. That is, the number of times the system leaves a state differs by at most 1 from the number of times it enters that state, since it will either return into that state at some time in the future ( ) or not ( ).

When the system arrives at a steady state, the arrival rate should be equal to the departure rate.

Thus the balance equations

 
 
 

imply

 

The fact that   leads to the geometric distribution formula

 

where  .

Simple two-equation queue

A common basic queueing system is attributed to Erlang and is a modification of Little's Law. Given an arrival rate λ, a dropout rate σ, and a departure rate μ, length of the queue L is defined as:

 .

Assuming an exponential distribution for the rates, the waiting time W can be defined as the proportion of arrivals that are served. This is equal to the exponential survival rate of those who do not drop out over the waiting period, giving:

 

The second equation is commonly rewritten as:

 

The two-stage one-box model is common in epidemiology.[8]

History

In 1909, Agner Krarup Erlang, a Danish engineer who worked for the Copenhagen Telephone Exchange, published the first paper on what would now be called queueing theory.[9][10][11] He modeled the number of telephone calls arriving at an exchange by a Poisson process and solved the M/D/1 queue in 1917 and M/D/k queueing model in 1920.[12] In Kendall's notation:

  • M stands for "Markov" or "memoryless", and means arrivals occur according to a Poisson process
  • D stands for "deterministic", and means jobs arriving at the queue require a fixed amount of service
  • k describes the number of servers at the queueing node (k = 1, 2, 3, ...)

If the node has more jobs than servers, then jobs will queue and wait for service.

The M/G/1 queue was solved by Felix Pollaczek in 1930,[13] a solution later recast in probabilistic terms by Aleksandr Khinchin and now known as the Pollaczek–Khinchine formula.[12][14]

After the 1940s, queueing theory became an area of research interest to mathematicians.[14] In 1953, David George Kendall solved the GI/M/k queue[15] and introduced the modern notation for queues, now known as Kendall's notation. In 1957, Pollaczek studied the GI/G/1 using an integral equation.[16] John Kingman gave a formula for the mean waiting time in a G/G/1 queue, now known as Kingman's formula.[17]

Leonard Kleinrock worked on the application of queueing theory to message switching in the early 1960s and packet switching in the early 1970s. His initial contribution to this field was his doctoral thesis at the Massachusetts Institute of Technology in 1962, published in book form in 1964. His theoretical work published in the early 1970s underpinned the use of packet switching in the ARPANET, a forerunner to the Internet.

The matrix geometric method and matrix analytic methods have allowed queues with phase-type distributed inter-arrival and service time distributions to be considered.[18]

Systems with coupled orbits are an important part in queueing theory in the application to wireless networks and signal processing.[19]

Modern day application of queueing theory concerns among other things product development where (material) products have a spatiotemporal existence, in the sense that products have a certain volume and a certain duration.[20]

Problems such as performance metrics for the M/G/k queue remain an open problem.[12][14]

Service disciplines

Various scheduling policies can be used at queueing nodes:

First in, first out
 
First in first out (FIFO) queue example
Also called first-come, first-served (FCFS),[21] this principle states that customers are served one at a time and that the customer that has been waiting the longest is served first.[22]
Last in, first out
This principle also serves customers one at a time, but the customer with the shortest waiting time will be served first.[22] Also known as a stack.
Processor sharing
Service capacity is shared equally between customers.[22]
Priority
Customers with high priority are served first.[22] Priority queues can be of two types: non-preemptive (where a job in service cannot be interrupted) and preemptive (where a job in service can be interrupted by a higher-priority job). No work is lost in either model.[23]
Shortest job first
The next job to be served is the one with the smallest size.[24]
Preemptive shortest job first
The next job to be served is the one with the smallest original size.[25]
Shortest remaining processing time
The next job to serve is the one with the smallest remaining processing requirement.[26]
Service facility
  • Single server: customers line up and there is only one server
  • Several parallel servers (single queue): customers line up and there are several servers
  • Several parallel servers (several queues): there are many counters and customers can decide for which to queue
Unreliable server

Server failures occur according to a stochastic (random) process (usually Poisson) and are followed by setup periods during which the server is unavailable. The interrupted customer remains in the service area until server is fixed.[27]

Customer waiting behavior
  • Balking: customers decide not to join the queue if it is too long
  • Jockeying: customers switch between queues if they think they will get served faster by doing so
  • Reneging: customers leave the queue if they have waited too long for service

Arriving customers not served (either due to the queue having no buffer, or due to balking or reneging by the customer) are also known as dropouts. The average rate of dropouts is a significant parameter describing a queue.

排队网络

Queue networks are systems in which multiple queues are connected by customer routing. When a customer is serviced at one node, it can join another node and queue for service, or leave the network.

For networks of m nodes, the state of the system can be described by an m–dimensional vector (x1, x2, ..., xm) where xi represents the number of customers at each node.

The simplest non-trivial networks of queues are called tandem queues.[28] The first significant results in this area were Jackson networks,[29][30] for which an efficient product-form stationary distribution exists and the mean value analysis[31] (which allows average metrics such as throughput and sojourn times) can be computed.[32] If the total number of customers in the network remains constant, the network is called a closed network and has been shown to also have a product–form stationary distribution by the Gordon–Newell theorem.[33] This result was extended to the BCMP network,[34] where a network with very general service time, regimes, and customer routing is shown to also exhibit a product–form stationary distribution. The normalizing constant can be calculated with the Buzen's algorithm, proposed in 1973.[35]

Networks of customers have also been investigated, such as Kelly networks, where customers of different classes experience different priority levels at different service nodes.[36] Another type of network are G-networks, first proposed by Erol Gelenbe in 1993:[37] these networks do not assume exponential time distributions like the classic Jackson network.

Routing algorithms

In discrete-time networks where there is a constraint on which service nodes can be active at any time, the max-weight scheduling algorithm chooses a service policy to give optimal throughput in the case that each job visits only a single-person service node.[21] In the more general case where jobs can visit more than one node, backpressure routing gives optimal throughput. A network scheduler must choose a queueing algorithm, which affects the characteristics of the larger network.[38]

Mean-field limits

Mean-field models consider the limiting behaviour of the empirical measure (proportion of queues in different states) as the number of queues m approaches infinity. The impact of other queues on any given queue in the network is approximated by a differential equation. The deterministic model converges to the same stationary distribution as the original model.[39]

Heavy traffic/diffusion approximations

In a system with high occupancy rates (utilisation near 1), a heavy traffic approximation can be used to approximate the queueing length process by a reflected Brownian motion,[40] Ornstein–Uhlenbeck process, or more general diffusion process.[41] The number of dimensions of the Brownian process is equal to the number of queueing nodes, with the diffusion restricted to the non-negative orthant.

Fluid limits

Fluid models are continuous deterministic analogs of queueing networks obtained by taking the limit when the process is scaled in time and space, allowing heterogeneous objects. This scaled trajectory converges to a deterministic equation which allows the stability of the system to be proven. It is known that a queueing network can be stable but have an unstable fluid limit.[42]

Queueing Applications

Queueing theory finds widespread application in computer science and information technology. In networking, for instance, queues are integral to routers and switches, where packets queue up for transmission. By applying queueing theory principles, designers can optimize these systems, ensuring responsive performance and efficient resource utilization. Beyond the technological realm, queueing theory is relevant to everyday experiences. Whether waiting in line at a supermarket or for public transportation, understanding the principles of queueing theory provides valuable insights into optimizing these systems for enhanced user satisfaction. At some point, everyone will be involved in an aspect of queuing. What some may view to be an inconvenience could possibly be the most effective method. Queueing theory, a discipline rooted in applied mathematics and computer science, is a field dedicated to the study and analysis of queues, or waiting lines, and their implications across a diverse range of applications. This theoretical framework has proven instrumental in understanding and optimizing the efficiency of systems characterized by the presence of queues. The study of queues is essential in contexts such as traffic systems, computer networks, telecommunications, and service operations. Queueing theory delves into various foundational concepts, with the arrival process and service process being central. The arrival process describes the manner in which entities join the queue over time, often modeled using stochastic processes like Poisson processes. The efficiency of queueing systems is gauged through key performance metrics. These include the average queue length, average wait time, and system throughput. These metrics provide insights into the system's functionality, guiding decisions aimed at enhancing performance and reducing wait times. References: Gross, D., & Harris, C. M. (1998). Fundamentals of Queueing Theory. John Wiley & Sons. Kleinrock, L. (1976). Queueing Systems: Volume I - Theory. Wiley. Cooper, B. F., & Mitrani, I. (1985). Queueing Networks: A Fundamental Approach. John Wiley & Sons

See also

References

  1. ^ 1.0 1.1 1.2 Sundarapandian, V. 7. Queueing Theory. Probability, Statistics and Queueing Theory. PHI Learning. 2009. ISBN 978-81-203-3844-9. 
  2. ^ Lawrence W. Dowdy, Virgilio A.F. Almeida, Daniel A. Menasce. Performance by Design: Computer Capacity Planning by Example. [2009-07-08]. (原始内容存档于2016-05-06). 
  3. ^ Schlechter, Kira. Hershey Medical Center to open redesigned emergency room. The Patriot-News. March 2, 2009 [March 12, 2009]. (原始内容存档于June 29, 2016). 
  4. ^ Mayhew, Les; Smith, David. Using queuing theory to analyse completion times in accident and emergency departments in the light of the Government 4-hour target. Cass Business School. December 2006 [2008-05-20]. ISBN 978-1-905752-06-5. (原始内容存档于September 7, 2021). 
  5. ^ 5.0 5.1 5.2 Taylor, Bernard W. Introduction to management science 13th. New York: Pearson. 2019. ISBN 978-0-13-473066-0. 
  6. ^ Tijms, H.C, Algorithmic Analysis of Queues, Chapter 9 in A First Course in Stochastic Models, Wiley, Chichester, 2003
  7. ^ Kendall, D. G. Stochastic Processes Occurring in the Theory of Queues and their Analysis by the Method of the Imbedded Markov Chain. The Annals of Mathematical Statistics. 1953, 24 (3): 338–354. JSTOR 2236285. doi:10.1214/aoms/1177728975 . 
  8. ^ Hernández-Suarez, Carlos. An application of queuing theory to SIS and SEIS epidemic models. Math. Biosci. 2010, 7 (4): 809–823. PMID 21077709. doi:10.3934/mbe.2010.7.809 . 
  9. ^ Agner Krarup Erlang (1878-1929) | plus.maths.org. Pass.maths.org.uk. 1997-04-30 [2013-04-22]. (原始内容存档于2008-10-07). 
  10. ^ Asmussen, S. R.; Boxma, O. J. Editorial introduction. Queueing Systems. 2009, 63 (1–4): 1–2. S2CID 45664707. doi:10.1007/s11134-009-9151-8. 
  11. ^ Erlang, Agner Krarup. The theory of probabilities and telephone conversations (PDF). Nyt Tidsskrift for Matematik B. 1909, 20: 33–39. (原始内容 (PDF)存档于2011-10-01). 
  12. ^ 12.0 12.1 12.2 Kingman, J. F. C. The first Erlang century—and the next. Queueing Systems. 2009, 63 (1–4): 3–4. S2CID 38588726. doi:10.1007/s11134-009-9147-4. 
  13. ^ Pollaczek, F., Ueber eine Aufgabe der Wahrscheinlichkeitstheorie, Math. Z. 1930
  14. ^ 14.0 14.1 14.2 Whittle, P. Applied Probability in Great Britain. Operations Research. 2002, 50 (1): 227–239. JSTOR 3088474. doi:10.1287/opre.50.1.227.17792 . 
  15. ^ Kendall, D.G.:Stochastic processes occurring in the theory of queues and their analysis by the method of the imbedded Markov chain, Ann. Math. Stat. 1953
  16. ^ Pollaczek, F., Problèmes Stochastiques posés par le phénomène de formation d'une queue
  17. ^ Kingman, J. F. C.; Atiyah. The single server queue in heavy traffic. Mathematical Proceedings of the Cambridge Philosophical Society. October 1961, 57 (4): 902. Bibcode:1961PCPS...57..902K. JSTOR 2984229. S2CID 62590290. doi:10.1017/S0305004100036094. 
  18. ^ Ramaswami, V. A stable recursion for the steady state vector in markov chains of m/g/1 type. Communications in Statistics. Stochastic Models. 1988, 4: 183–188. doi:10.1080/15326348808807077. 
  19. ^ Morozov, E. Stability analysis of a multiclass retrial system withcoupled orbit queues. Proceedings of 14th European Workshop. Lecture Notes in Computer Science 17. 2017: 85–98. ISBN 978-3-319-66582-5. doi:10.1007/978-3-319-66583-2_6 . 
  20. ^ Carlson, E.C.; Felder, R.M. Simulation and queueing network modeling of single-product production campaigns. Computers & Chemical Engineering. 1992, 16 (7): 707–718. doi:10.1016/0098-1354(92)80018-5. 
  21. ^ 21.0 21.1 Manuel, Laguna. Business Process Modeling, Simulation and Design. Pearson Education India. 2011: 178 [6 October 2017]. ISBN 978-81-317-6135-9 (英语). 
  22. ^ 22.0 22.1 22.2 22.3 Penttinen A., Chapter 8 – Queueing Systems, Lecture Notes: S-38.145 - Introduction to Teletraffic Theory.
  23. ^ Harchol-Balter, M. Scheduling: Non-Preemptive, Size-Based Policies. Performance Modeling and Design of Computer Systems. 2012: 499–507. ISBN 978-1-139-22642-4. doi:10.1017/CBO9781139226424.039. 
  24. ^ Andrew S. Tanenbaum; Herbert Bos. Modern Operating Systems. Pearson. 2015. ISBN 978-0-13-359162-0. 
  25. ^ Harchol-Balter, M. Scheduling: Preemptive, Size-Based Policies. Performance Modeling and Design of Computer Systems. 2012: 508–517. ISBN 978-1-139-22642-4. doi:10.1017/CBO9781139226424.040. 
  26. ^ Harchol-Balter, M. Scheduling: SRPT and Fairness. Performance Modeling and Design of Computer Systems. 2012: 518–530. ISBN 978-1-139-22642-4. doi:10.1017/CBO9781139226424.041. 
  27. ^ Dimitriou, I. A Multiclass Retrial System With Coupled Orbits And Service Interruptions: Verification of Stability Conditions. Proceedings of FRUCT 24. 2019, 7: 75–82. 
  28. ^ Archived copy (PDF). [2018-08-02]. (原始内容存档 (PDF)于2017-03-29). 
  29. ^ Jackson, J. R. Networks of Waiting Lines. Operations Research. 1957, 5 (4): 518–521. JSTOR 167249. doi:10.1287/opre.5.4.518. 
  30. ^ Jackson, James R. Jobshop-like Queueing Systems. Management Science. Oct 1963, 10 (1): 131–142. JSTOR 2627213. doi:10.1287/mnsc.1040.0268. 
  31. ^ Reiser, M.; Lavenberg, S. S. Mean-Value Analysis of Closed Multichain Queuing Networks. Journal of the ACM. 1980, 27 (2): 313. S2CID 8694947. doi:10.1145/322186.322195 . 
  32. ^ Van Dijk, N. M. On the arrival theorem for communication networks. Computer Networks and ISDN Systems. 1993, 25 (10): 1135–2013 [2019-09-24]. S2CID 45218280. doi:10.1016/0169-7552(93)90073-D. (原始内容存档于2019-09-24). 
  33. ^ Gordon, W. J.; Newell, G. F. Closed Queuing Systems with Exponential Servers. Operations Research. 1967, 15 (2): 254. JSTOR 168557. doi:10.1287/opre.15.2.254. 
  34. ^ Baskett, F.; Chandy, K. Mani; Muntz, R.R.; Palacios, F.G. Open, closed and mixed networks of queues with different classes of customers. Journal of the ACM. 1975, 22 (2): 248–260. S2CID 15204199. doi:10.1145/321879.321887 . 
  35. ^ Buzen, J. P. Computational algorithms for closed queueing networks with exponential servers (PDF). Communications of the ACM. 1973, 16 (9): 527–531 [2015-09-01]. S2CID 10702. doi:10.1145/362342.362345. (原始内容存档 (PDF)于2016-05-13). 
  36. ^ Kelly, F. P. Networks of Queues with Customers of Different Types. Journal of Applied Probability. 1975, 12 (3): 542–554. JSTOR 3212869. S2CID 51917794. doi:10.2307/3212869. 
  37. ^ Gelenbe, Erol. G-Networks with Triggered Customer Movement. Journal of Applied Probability. Sep 1993, 30 (3): 742–748. JSTOR 3214781. S2CID 121673725. doi:10.2307/3214781. 
  38. ^ Newell, G. F. Applications of Queueing Theory. SpringerLink. 1982. ISBN 978-94-009-5972-9. doi:10.1007/978-94-009-5970-5 (英语). 
  39. ^ Bobbio, A.; Gribaudo, M.; Telek, M. S. Analysis of Large Scale Interacting Systems by Mean Field Method. 2008 Fifth International Conference on Quantitative Evaluation of Systems. 2008: 215. ISBN 978-0-7695-3360-5. S2CID 2714909. doi:10.1109/QEST.2008.47. 
  40. ^ Chen, H.; Whitt, W. Diffusion approximations for open queueing networks with service interruptions. Queueing Systems. 1993, 13 (4): 335. S2CID 1180930. doi:10.1007/BF01149260. 
  41. ^ Yamada, K. Diffusion Approximation for Open State-Dependent Queueing Networks in the Heavy Traffic Situation. The Annals of Applied Probability. 1995, 5 (4): 958–982. JSTOR 2245101. doi:10.1214/aoap/1177004602 . 
  42. ^ Bramson, M. A stable queueing network with unstable fluid model. The Annals of Applied Probability. 1999, 9 (3): 818–853. JSTOR 2667284. doi:10.1214/aoap/1029962815 . 

Further reading


Template:Queueing theory