In queueing theory, a discipline within the mathematical theory of probability, a fluid queue (fluid model, fluid flow model or stochastic fluid model) is a mathematical model used to describe the fluid level in a reservoir subject to randomly determined periods of filling and emptying. The term dam theory was used in earlier literature for these models. The model has been used to approximate discrete models, model the spread of wildfires, in ruin theory and to model high speed data networks. The model applies the leaky bucket algorithm to a stochastic source.

The model was first introduced by Pat Moran in 1954 where a discrete-time model was considered. Fluid queues allow arrivals to be continuous rather than discrete, as in models like the M/M/1 and M/G/1 queues.

Fluid queues have been used to model the performance of a network switch, a router, the IEEE 802.11 protocol, Asynchronous Transfer Mode (the intended technology for B-ISDN), peer-to-peer file sharing, optical burst switching, and has applications in civil engineering when designing dams. The process is closely connected to quasi-birth–death processes, for which efficient solution methods are known.

## Model description

A fluid queue can be viewed as a large tank, typically assumed to be of infinite capacity, connected to a series of pipes that pour fluid in to the tank and a series of pumps which remove fluid from the tank. An operator controls the pipes and pumps controlling the rate at which fluid pours in to the buffer and the rate at which fluid leaves. When the operator puts the system in to state i we write ri for the net fluid arrival rate in this state (input less output). When the buffer contains fluid, if we write X(t) for the fluid level at time t,

${\frac {\mathrm {d} X(t)}{\mathrm {d} t))={\begin{cases}r_{i}&{\text{ if ))X(t)>0\\\max(r_{i},0)&{\text{ if ))X(t)=0.\end{cases))$ The operator is a continuous time Markov chain and is usually called the environment process, background process or driving process. As the process X represents the level of fluid in the buffer it can only take non-negative values.

The model is a particular type of piecewise deterministic Markov process and can also be viewed as a Markov reward model with boundary conditions.

## Stationary distribution

The stationary distribution is a phase-type distribution as first shown by Asmussen and can be computed using matrix-analytic methods.

The additive decomposition method is numerically stable and separates the eigenvalues necessary for computation using Schur decomposition.

### On/off model

For a simple system where service has a constant rate μ and arrival fluctuate between rates λ and 0 (in states 1 and 2 respectively) according to a continuous time Markov chain with generator matrix

$Q={\begin{pmatrix}-\alpha &\alpha \\\beta &-\beta \end{pmatrix))$ the stationary distribution can be computed explicitly and is given by

$F(x,1)={\frac {\beta }{\alpha +\beta ))\left(1-e^{\left({\frac {\beta }{\mu ))-{\frac {\alpha }{\lambda -\mu ))\right)x}\right)$ $F(x,2)={\frac {\alpha }{\alpha +\beta ))-{\frac {\beta \left(\lambda -\mu \right)}{\alpha +\beta ))e^{\left({\frac {\beta }{\mu ))-{\frac {\alpha }{\lambda -\mu ))\right)x)$ and average fluid level

${\frac {(\lambda -\mu )\beta }{(\mu (\alpha +\beta )-\beta \lambda )(\alpha +\beta )))(\mu ,\lambda -\mu ).$ ## Busy period

The busy period is the period of time measured from the instant that fluid first arrives in the buffer (X(t) becomes non-zero) until the buffer is again empty (X(t) returns to zero). In earlier literature it is sometimes referred to as the wet period (of the dam). The Laplace–Stieltjes transform of the busy period distribution is known for the fluid queue with infinite buffer and the expected busy period in the case of a finite buffer and arrivals as instantaneous jumps.

For an infinite buffer with constant service rate μ and arrivals at rates λ and 0, modulated by a continuous time Markov chain with parameters

$Q={\begin{pmatrix}-\alpha &\alpha \\\beta &-\beta \end{pmatrix))$ write W*(s) for the Laplace–Stieltjes transform of the busy period distribution, then

$W^{\ast }(s)={\frac {\beta \lambda +s\lambda -\beta \mu +\alpha \mu -{\sqrt {4\beta \alpha \mu (\mu -\lambda )+(s\lambda +\beta (\lambda -\mu )+\alpha \mu )^{2)))){2\beta (\lambda -\mu )))$ which gives the mean busy period

$\mathbb {E} (W)={\frac {\lambda }{\alpha \mu +\beta (\lambda -\mu ))).$ In this case, of a single on/off source, the busy period distribution is known to be a decreasing failure rate function which means that the longer a busy period has lasted the longer it is likely to last.

There are two main approaches to solving for the busy period in general, using either spectral decomposition or an iterative recurrent method. A quadratically convergent algorithm for computing points of the transform was published by Ahn and Ramaswami.

### Example

For example, if a fluid queue with service rate μ = 2 is fed by an on/off source with parameters α = 2, β = 1 and λ =  3 then the fluid queue has busy period with mean 1 and variance 5/3.

### Loss rate

In a finite buffer the rate at which fluid is lost (rejected from the system due to a full buffer) can be computed using Laplace-Stieltjes transforms.

### Mountain process

The term mountain process has been coined to describe the maximum buffer content process value achieved during a busy period and can be computed using results from a G/M/1 queue.

## Networks of fluid queues

The stationary distribution of two tandem fluid queues has been computed and shown not to exhibit a product form stationary distribution in nontrivial cases.

## Feedback fluid queues

A feedback fluid queue is a model where the model parameters (transition rate matrix and drift vector) are allowed to some extent to depend on the buffer content. Typically the buffer content is partitioned and the parameters depend on which partition the buffer content process is in. The ordered Schur factorization can be used to efficiently compute the stationary distribution of such a model.

## Second order fluid queues

Second order fluid queues (sometimes called Markov modulated diffusion processes or fluid queues with Brownian noise) consider a reflected Brownian motion with parameters controlled by a Markov process. Two different types of boundary conditions are commonly considered: absorbing and reflecting.

1. ^ Mitra, D. (1988). "Stochastic Theory of a Fluid Model of Producers and Consumers Coupled by a Buffer". Advances in Applied Probability. 20 (3): 646–676. doi:10.2307/1427040. JSTOR 1427040.
2. ^ a b Ahn, S.; Ramaswami, V. (2003). "Fluid Flow Models and Queues—A Connection by Stochastic Coupling" (PDF). Stochastic Models. 19 (3): 325. doi:10.1081/STM-120023564. S2CID 6733796.
3. ^ Elwalid, A. I.; Mitra, D. (1991). "Analysis and design of rate-based congestion control of high speed networks, I: Stochastic fluid models, access regulation". Queueing Systems. 9 (1–2): 29–63. doi:10.1007/BF01158791. S2CID 19379411.
4. ^ Stanford, David A.; Latouche, Guy; Woolford, Douglas G.; Boychuk, Dennis; Hunchak, Alek (2005). "Erlangized Fluid Queues with Application to Uncontrolled Fire Perimeter". Stochastic Models. 21 (2–3): 631. doi:10.1081/STM-200056242. S2CID 123591340.
5. ^ Remiche, M. A. (2005). "Compliance of the Token-Bucket Model with Markovian Traffic". Stochastic Models. 21 (2–3): 615–630. doi:10.1081/STM-200057884. S2CID 121190780.
6. ^ a b c Kulkarni, Vidyadhar G. (1997). "Fluid models for single buffer systems" (PDF). Frontiers in Queueing: Models and Applications in Science and Engineering. pp. 321–338. ISBN 978-0-8493-8076-1.
7. ^ Moran, P. A. P. (1954). "A probability theory of dams and storage systems". Aust. J. Appl. Sci. 5: 116–124.
8. ^ Phatarfod, R. M. (1963). "Application of Methods in Sequential Analysis to Dam Theory". The Annals of Mathematical Statistics. 34 (4): 1588–1592. doi:10.1214/aoms/1177703892.
9. ^ Gani, J.; Prabhu, N. U. (1958). "Continuous Time Treatment of a Storage Problem". Nature. 182 (4627): 39. Bibcode:1958Natur.182...39G. doi:10.1038/182039a0. S2CID 42193342.
10. ^ a b Anick, D.; Mitra, D.; Sondhi, M. M. (1982). "Stochastic Theory of a Data-Handling System with Multiple Sources" (PDF). The Bell System Technical Journal. 61 (8): 1871–1894. doi:10.1002/j.1538-7305.1982.tb03089.x. S2CID 16836549.
11. ^ Hohn, N.; Veitch, D.; Papagiannaki, K.; Diot, C. (2004). "Bridging router performance and queuing theory". Proceedings of the joint international conference on Measurement and modeling of computer systems - SIGMETRICS 2004/PERFORMANCE 2004. p. 355. CiteSeerX 10.1.1.1.3208. doi:10.1145/1005686.1005728. ISBN 978-1581138733. S2CID 14416842.
12. ^ Arunachalam, V.; Gupta, V.; Dharmaraja, S. (2010). "A fluid queue modulated by two independent birth–death processes". Computers & Mathematics with Applications. 60 (8): 2433–2444. doi:10.1016/j.camwa.2010.08.039.
13. ^ Norros, I.; Roberts, J. W.; Simonian, A.; Virtamo, J. T. (1991). "The superposition of variable bit rate sources in an ATM multiplexer". IEEE Journal on Selected Areas in Communications. 9 (3): 378. doi:10.1109/49.76636.
14. ^ Rasmussen, C.; Sorensen, J. H.; Kvols, K. S.; Jacobsen, S. B. (1991). "Source-independent call acceptance procedures in ATM networks". IEEE Journal on Selected Areas in Communications. 9 (3): 351. doi:10.1109/49.76633.
15. ^ Gaeta, R.; Gribaudo, M.; Manini, D.; Sereno, M. (2006). "Analysis of resource transfers in peer-to-peer file sharing applications using fluid models". Performance Evaluation. 63 (3): 149. CiteSeerX 10.1.1.102.3905. doi:10.1016/j.peva.2005.01.001.
16. ^ Yazici, M. A.; Akar, N. (2013). "Analysis of continuous feedback Markov fluid queues and its applications to modeling Optical Burst Switching". Proceedings of the 2013 25th International Teletraffic Congress (ITC). pp. 1–8. doi:10.1109/ITC.2013.6662952. hdl:11693/28055. ISBN 978-0-9836283-7-8. S2CID 863180.
17. ^ Gani, J. (1969). "Recent Advances in Storage and Flooding Theory". Advances in Applied Probability. 1 (1): 90–110. doi:10.2307/1426410. JSTOR 1426410.
18. ^ Ramaswami, V. Smith, D.; Hey, P (eds.). "Matrix analytic methods for stochastic fluid flows". Teletraffic Engineering in a Competitive World (Proceedings of the 16th International Teletraffic Congress). Elsevier Science B.V.
19. ^ Govorun, M.; Latouche, G.; Remiche, M. A. (2013). "Stability for Fluid Queues: Characteristic Inequalities". Stochastic Models. 29: 64–88. doi:10.1080/15326349.2013.750533. S2CID 120102947.
20. ^ Rogers, L. C. G.; Shi, Z. (1994). "Computing the Invariant Law of a Fluid Model". Journal of Applied Probability. 31 (4): 885–896. doi:10.2307/3215314. JSTOR 3215314.
21. ^ Scheinhardt, W.; Van Foreest, N.; Mandjes, M. (2005). "Continuous feedback fluid queues". Operations Research Letters. 33 (6): 551. doi:10.1016/j.orl.2004.11.008.
22. ^ a b Asmussen, Søren (1995). "Stationary distributions for fluid flow models with or without brownian noise". Communications in Statistics. Stochastic Models. 11: 21–49. doi:10.1080/15326349508807330.
23. ^ Akar, N.; Sohraby, K. (2004). "Infinite- and finite-buffer Markov fluid queues: A unified analysis" (PDF). Journal of Applied Probability. 41 (2): 557. doi:10.1239/jap/1082999086. hdl:11693/24279. JSTOR 3216036.
24. ^ Telek, M. S.; Vécsei, M. S. (2013). "Analysis of Fluid Queues in Saturation with Additive Decomposition" (PDF). Modern Probabilistic Methods for Analysis of Telecommunication Networks. Communications in Computer and Information Science. Vol. 356. p. 167. doi:10.1007/978-3-642-35980-4_19. ISBN 978-3-642-35979-8.
25. ^ a b Field, A.; Harrison, P. (2007). "An approximate compositional approach to the analysis of fluid queue networks". Performance Evaluation. 64 (9–12): 1137. doi:10.1016/j.peva.2007.06.025.
26. ^ a b Lee, Eui Yong; Kinateder, Kimberly K. J. (2000). "The expected wet period of finite dam with exponential inputs". Stochastic Processes and Their Applications. 90: 175–180. doi:10.1016/S0304-4149(00)00034-X.
27. ^ Boxma, O. J.; Dumas, V. (1998). "The busy period in the fluid queue". ACM SIGMETRICS Performance Evaluation Review. 26: 100–110. doi:10.1145/277858.277881.
28. ^ Field, A. J.; Harrison, P. G. (2010). "Busy periods in fluid queues with multiple emptying input states". Journal of Applied Probability. 47 (2): 474. doi:10.1239/jap/1276784904.
29. ^ a b Asmussen, S. R. (1994). "Busy period analysis, rare events and transient behavior in fluid flow models" (PDF). Journal of Applied Mathematics and Stochastic Analysis. 7 (3): 269–299. doi:10.1155/S1048953394000262.
30. ^ a b Kroese, D. P.; Scheinhardt, W. R. W. (2001). "Joint Distributions for Interacting Fluid Queues". Queueing Systems. 37: 99–139. doi:10.1023/A:1011044217695. S2CID 3482641.
31. ^ Gautam, N.; Kulkarni, V. G.; Palmowski, Z.; Rolski, T. (1999). "Bounds for Fluid Models Driven by Semi-Markov Inputs" (PDF). Probability in the Engineering and Informational Sciences. 13 (4): 429. doi:10.1017/S026996489913403X.
32. ^ Badescu, Andrei L.; Landriault, David (2009). "Applications of fluid flow matrix analytic methods in ruin theory —a review" (PDF). RACSAM - Revista de la Real Academia de Ciencias Exactas, Fisicas y Naturales. Serie A. Matematicas. 103 (2): 353–372. doi:10.1007/BF03191912. S2CID 53498442.
33. ^ Ahn, S.; Ramaswami, V. (2005). "Efficient algorithms for transient analysis of stochastic fluid flow models" (PDF). Journal of Applied Probability. 42 (2): 531. doi:10.1239/jap/1118777186.
34. ^ O'Reilly, M. G. M.; Palmowski, Z. (2013). "Loss rates for stochastic fluid models". Performance Evaluation. 70 (9): 593. doi:10.1016/j.peva.2013.05.005.
35. ^ Boxma, O. J.; Perry, D.; Van Der Duyn Schouten, F. A. (1999). "Fluid Queues and Mountain Processes". Probability in the Engineering and Informational Sciences. 13 (4): 407–427. doi:10.1017/S0269964899134028.
36. ^ Boxma, O. J.; Perry, D. (2009). "On the Cycle Maximum of Mountains, Dams and Queues". Communications in Statistics - Theory and Methods. 38 (16–17): 2706. doi:10.1080/03610910902936232. S2CID 9973624.
37. ^ Kella, O. (1996). "Stability and nonproduct form of stochastic fluid networks with Lévy inputs". The Annals of Applied Probability. 6: 186–199. doi:10.1214/aoap/1034968070.
38. ^ Kella, O. (2000). "Non-product form of two-dimensional fluid networks with dependent Lévy inputs". Journal of Applied Probability. 37 (4): 1117–1122. doi:10.1239/jap/1014843090.
39. ^ Debicki, K.; Dieker, A. B.; Rolski, T. (2007). "Quasi-Product Forms for Levy-Driven Fluid Networks". Mathematics of Operations Research. 32 (3): 629. arXiv:math/0512119. doi:10.1287/moor.1070.0259. S2CID 16150704.
40. ^ Malhotra, R.; Mandjes, M. R. H.; Scheinhardt, W. R. W.; Berg, J. L. (2008). "A feedback fluid queue with two congestion control thresholds". Mathematical Methods of Operations Research. 70: 149–169. doi:10.1007/s00186-008-0235-8.
41. ^ Kankaya, H. E.; Akar, N. (2008). "Solving Multi-Regime Feedback Fluid Queues". Stochastic Models. 24 (3): 425. doi:10.1080/15326340802232285. hdl:11693/23071. S2CID 53363967.
42. ^ Ivanovs, J. (2010). "Markov-modulated Brownian motion with two reflecting barriers". Journal of Applied Probability. 47 (4): 1034–1047. arXiv:1003.4107. doi:10.1239/jap/1294170517. S2CID 19329962.
43. ^ Karandikar, R. L.; Kulkarni, V. G. (1995). "Second-Order Fluid Flow Models: Reflected Brownian Motion in a Random Environment". Operations Research. 43: 77–88. doi:10.1287/opre.43.1.77.
44. ^ Gribaudo, M.; Manini, D.; Sericola, B.; Telek, M. (2007). "Second order fluid models with general boundary behaviour". Annals of Operations Research. 160: 69–82. CiteSeerX 10.1.1.484.6192. doi:10.1007/s10479-007-0297-7. S2CID 1735120.