statistical integration of erlang’s equations

7
Statistical integration of Erlang’s equations Nebojsa Nikolic * Military Academy, Generala Pavla Jurisica Sturma 33, Belgrade, 11000, Serbia Available online 7 November 2006 Abstract Establishing analytical description of a queueing system is in the form of a system of first-order differential equations. That system can be very large, even unlimited. There are two commonly used methods of solving this system: analytical and numerical. Both are exact and reliable, but also very complicated. There is also the third solution method that can be realized by mathematical statistics. Statistical samples can be obtained by the Monte Carlo simulation, but well-known problems of accuracy and confidence of simulation results must be solved first. Motivation for this study comes from lim- itations of the classical queueing theory applied to military queueing systems. Ó 2006 Elsevier B.V. All rights reserved. Keywords: Military; Queueing; Simulation; Stochastic processes 1. Introduction This paper aims to present a method by which it is possible to determine queueing systems’ state probabilities as time dependent variables. Impor- tance of this possibility is the fact that state proba- bilities are primary measures of performances of queueing systems. Knowing them, all other second- ary measures of performances can be calculated (queue length, waiting time, etc.). Classical queueing theory offers useable solutions for calculating state probabilities and other mea- sures but only for steady-state. That is the case when time tends to infinity (t !1). Main problem arises when the analyst is faced with the need to study behavior of queueing systems that work for a finite time (Nikolic, 2003). This is just the case with many real military systems, processes and situations, describable as queueing systems (Shephard et al., 1988). The observation of finite time engagements of such queueing systems comes from obvious fact that battles and wars are finite. If analyst wants to create a realistic high-fidelity model, then the time factor has to be considered. That is, the measures of performances of the studied queueing systems should be obtained as time dependent variables. Investigation is a product of synchronized use of some elementary concepts from a few different branches: Monte Carlo simulation modeling, queue- ing theory, probability theory, mathematics statis- tics, stochastic processes, computer programming, and military logistics. Interoperability of this inves- tigation comes from the default interoperability of the queueing theory. That means that real systems from different branches (military, telecommunica- tions, traffic, services, etc.) described as queueing systems are simply queueing systems. The achieve- 0377-2217/$ - see front matter Ó 2006 Elsevier B.V. All rights reserved. doi:10.1016/j.ejor.2006.09.027 * Tel.: +381 11 3470986. E-mail address: [email protected] Available online at www.sciencedirect.com European Journal of Operational Research 187 (2008) 1487–1493 www.elsevier.com/locate/ejor

Upload: nebojsa-nikolic

Post on 26-Jun-2016

219 views

Category:

Documents


4 download

TRANSCRIPT

Page 1: Statistical integration of Erlang’s equations

Available online at www.sciencedirect.com

European Journal of Operational Research 187 (2008) 1487–1493

www.elsevier.com/locate/ejor

Statistical integration of Erlang’s equations

Nebojsa Nikolic *

Military Academy, Generala Pavla Jurisica Sturma 33, Belgrade, 11000, Serbia

Available online 7 November 2006

Abstract

Establishing analytical description of a queueing system is in the form of a system of first-order differential equations.That system can be very large, even unlimited. There are two commonly used methods of solving this system: analyticaland numerical. Both are exact and reliable, but also very complicated. There is also the third solution method that can berealized by mathematical statistics. Statistical samples can be obtained by the Monte Carlo simulation, but well-knownproblems of accuracy and confidence of simulation results must be solved first. Motivation for this study comes from lim-itations of the classical queueing theory applied to military queueing systems.� 2006 Elsevier B.V. All rights reserved.

Keywords: Military; Queueing; Simulation; Stochastic processes

1. Introduction

This paper aims to present a method by which itis possible to determine queueing systems’ stateprobabilities as time dependent variables. Impor-tance of this possibility is the fact that state proba-bilities are primary measures of performances ofqueueing systems. Knowing them, all other second-ary measures of performances can be calculated(queue length, waiting time, etc.).

Classical queueing theory offers useable solutionsfor calculating state probabilities and other mea-sures but only for steady-state. That is the case whentime tends to infinity (t!1). Main problem ariseswhen the analyst is faced with the need to studybehavior of queueing systems that work for a finitetime (Nikolic, 2003). This is just the case with many

0377-2217/$ - see front matter � 2006 Elsevier B.V. All rights reserved

doi:10.1016/j.ejor.2006.09.027

* Tel.: +381 11 3470986.E-mail address: [email protected]

real military systems, processes and situations,describable as queueing systems (Shephard et al.,1988). The observation of finite time engagementsof such queueing systems comes from obvious factthat battles and wars are finite. If analyst wants tocreate a realistic high-fidelity model, then the timefactor has to be considered. That is, the measuresof performances of the studied queueing systemsshould be obtained as time dependent variables.

Investigation is a product of synchronized use ofsome elementary concepts from a few differentbranches: Monte Carlo simulation modeling, queue-ing theory, probability theory, mathematics statis-tics, stochastic processes, computer programming,and military logistics. Interoperability of this inves-tigation comes from the default interoperability ofthe queueing theory. That means that real systemsfrom different branches (military, telecommunica-tions, traffic, services, etc.) described as queueingsystems are simply queueing systems. The achieve-

.

Page 2: Statistical integration of Erlang’s equations

1488 N. Nikolic / European Journal of Operational Research 187 (2008) 1487–1493

ments in studying of some particular system fromany branch can be useful for studying similar sys-tems from some other branch.

2. About ‘‘statistical integration’’

When studying a real system, abstraction leads tosome type of a queueing model (or conceptualmodel – in terms of simulation modeling). From thispoint, there are two directions (Fig. 1):

• The first one is to use classical queueing theoryand to establish the system of differential equa-tions for possible states of a queueing system(Erlang’s equations). To solve this system, thereare also two possibilities: using classic methodsof integration (known as analytical methods)and using numerical methods. The analyticalmethod’s ‘‘output’’ is some formula that shouldbe used to calculate concrete values, and finallyto display them in a table and/or a graphicalform.

• The second one is to use Monte Carlo simulationmodeling (MCSM) to create simulation model of

Real system (Si

The genesis of a term "STATIS

Abstractio

Queueing model (Conc

Erlang's equations

Classical Queueing Theory

Analytical methods Numerical m

Final solutions shoulconcrete numerical values, presented

t p (t) pn(t)p0(t) ...1

Fig. 1. The genesis of sta

a studied queueing system, then to run the model,then to display simulation results in a table and agraphical form. Final solutions should be thesame for all three methods: analytical, numericaland statistical. This logical analysis is presentedin Fig. 1.

Two facts explain the use of the term ‘‘Statistical

Integration’’, rather than ‘‘Monte Carlo Integration’’(even though the latter one is a proper term, too).Firstly, Monte Carlo methods are in their essence sta-tistical methods (Mihram, 1972), but Monte Carlosimulation modeling is usually recognized as a non-exact method. This work suggests how to use basicstatistical postulates to establish control over accu-racy of simulation results. Secondly, there is a simpleanalogy with analytical and numerical integration.

3. Why statistical integration?

Analytical methods (analytical integration) areexact, but at the same time very hard, impracticaland often impossible to perform. Queueing theorymainly concerns analytical methods. Detailed anal-

muland)

TICAL INTEGRATION"

n

Simulation model

eptual model)

Monte Carlo Simulation Modeling

ethods Statistical methods

d be the same: in a table or graphical form:

p0 (t)

p1(t)

pi(t)

pn(t)

0t

1

tistical integration.

Page 3: Statistical integration of Erlang’s equations

N. Nikolic / European Journal of Operational Research 187 (2008) 1487–1493 1489

ysis of a queueing system’s behavior leads to ‘‘deepanalytical waters’’ even for the simplest queueingmodels (Kleinrock, 1975). Commonly used(steady-state) results are valid only for some limitedconditions, as it is presented in Fig. 2 (Nikolic,2004). This problematic state-of-the-art in queueingtheory got its legitimacy at the 50th anniversary ofOperations Research journal, when Stidham (2002)called it the Classical queueing theory.

Although numerical methods (numerical integra-tion) have a deterministic error, they are practicallyexact. However, they are limited by the dimensionof the system; it is not suitable (or even possible)to deal with a system of a few hundred or moreequations. According to Odoni and Ruth (1983),Bernard Koopman had been the first one who gotthe idea to solve Erlang’s equations by numericalmethods. Searching for methods other than analyt-ical ones in queueing analyses indirectly confirmsthe situation in Fig. 2, which is the need for break-ing through the limits of the Classical queueing the-ory and covering a larger scope of real worldqueueing systems.

For both analytical and numerical integration,the system of state equations needs to be estab-lished. This fact is a crucial difference between thosetwo approaches on one hand, and statistical integra-

REAL

WORLD

QUEUEIN

SYSTEM

Traffic intensity

Time of queueing system's engageme

Finite time

CORRELATION BETWEEN THEORY AND REAL QU

low

er th

an 1

grea

ter

than

11

Fig. 2. Classical queueing theory

tion on the other hand. This ‘‘diferentia specifica’’means that we can get time-dependent state proba-bilities (their concrete values in a table and graphi-cal form) by use of the statistical integration andwithout established state equations (Erlang’s equa-tions) in analytical form. Doing so we can analyzemore complex queueing models and networksavoiding hard analytics but retaining high and con-trolled accuracy of simulation results.

Statistical samples needed for the use of statisti-cal methods are obtained by Monte Carlo simula-tion modeling. Practically, this is the main reasonfor the wide and growing use of MCSM in consider-ing various types of queueing models and queueingnetworks.

Principally, the above situation should be known,as well as the following main problems of MCSM(which are at the same time problems of the thirdmethod – statistical integration):

• The first problem is how to obtain simulationresults of high accuracy, and at the same timeof controlled and desired accuracy. As a matterof fact, this is a famous and still ongoing problemin simulation modeling of queueing systems: Gaf-arian et al. (1978), Cooper (1981), Gaither (1990),Pawlikowski et al. (2002).

G

S

Infinite time

nt (busy-cycle duration)

CLASSICAL QUEUEINGEUEING SYSTEMS

high

Complexity

low

med

ium

CLASSICALQUEUEING

THEORY

and real queueing systems.

Page 4: Statistical integration of Erlang’s equations

1490 N. Nikolic / European Journal of Operational Research 187 (2008) 1487–1493

• The second problem is how to get simulationresults for state probabilities as time-dependentvariables. This problem has not been wellexploited in simulation modeling, if we excludethe work of authors like Raatikainen (1995), eventhough state probabilities are the primary mea-sures of performance.

• And the third problem is how to do it in a simpleand cost-effective manner. Those are some of thecriteria suggested by Gafarian et al. (1978). Wealready have two complex and cumbersome meth-ods, which are the analytical and the numerical.

4. Doing statistical integration

Exactly and concisely, this simulation method is‘‘Automated Independent Replications with Gath-ering Statistics of Stochastic Processes’’, and willbe used further as AIRGSSP.

4.1. Mathematical base of the method

• Firstly, according to the law of large numbers (J.Bernoulli; first-limit theorem), relative frequen-cies in the much replicated experiment are seenas probabilities. Consequently, these experimentsmust be numerous and with the same initialconditions.

• Secondly, according to a group of central limittheorems, differences between relative frequencyand corresponding probability will be approxi-mately Normally distributed. Consequently,interval estimation of probabilities (proportions)should be used.

• Thirdly, the behavior of a queueing system is seenas a stochastic process. Simulation model thatpresents a queueing system should obtain the sta-tistics of a stochastic process. That is, it should beable to scan the model throughout time or tomake cross-sections in any particular moment ofstochastic process. Consequently, the simulationmodel has to be created to obtain numerous, inde-pendent realizations of a stochastic process and toobtain cross-sections at any time moment, for allthe studied measures of performances.

4.2. Algorithm of the method

Phase 1 – Creating one AIRGSSP simulationmodel:

• Make a conceptual model. Describe the real sys-tem as a queueing model (define clients, serversand connections). Note: It is very useful to followknown instructions of simulation modeling likethose of Defence Modeling and Simulation Office(1997).

• Create a base simulation model (BSM). Notes:

This step completely follows well- known proce-dures of simulation study, like Law and Kelton(1982). In a BSM there is nothing new. In theexample used in Section 5 (queueing system oftype: M/M/1/n), the BSM consists of only about10 programming commands in GPSS simulationlanguage. But real programming challenges are innext two steps.

• Create and add programming modules for gener-ating and gathering statistics of stochastic pro-cesses to a BSM. Note: This is the first upgradeof a BSM; with regard to the number of desiredmeasures of performances for which statisticsshould be gathered, this module can be much lar-ger than a BSM.

• Create and add programming modules for auto-mated and independent replications of simula-tion experiments to a BSM. Notes: This is thesecond upgrade of a BSM and it provides: firstly,the same initial conditions in a BSM for everysingle independent replication; secondly, chang-ing the seed of used random number generatorsfor every single independent replication; andthirdly, doing this automatically as many timesas desired.

• Verify the simulation model (computer program).

Phase 2 – Preparing values for statistical frame ofsimulation experiment:

• Choose the least numerical value of state proba-bility (p). Notes: There are three possibilities.Firstly, if the steady-state solutions are available,they can be used. Secondly, the preliminary sim-ulation run can be done with arbitrarily chosennumber of replications (for example, a hundredor a thousand), to see the order of the magnitudeof the least state probability. Thirdly, the referentvalue for probability can be arbitrarily chosen(for example, 0.2, or 0.1, or 0.01, or 0.001).

• Choose a tolerance, that is, specify maximal sta-tistical error (e) in percents, for studied stateprobability. Note: Expressing error in percentsis not necessary, but it is very suitable for engi-neering purposes.

Page 5: Statistical integration of Erlang’s equations

N. Nikolic / European Journal of Operational Research 187 (2008) 1487–1493 1491

• Choose a confidence level which is desired for theresults, and express it with confidence coefficient(zc) for the Normal distribution.

• Calculate sample size, using the following for-mula (obtained from the well-known intervalestimation for probability (Spiegel, 1961)):

n ¼ qp

100

e

� �2

z2c ð1Þ

where n is the sample size; p is the probability(proportion) to be estimated; q is the complementto proportion (q = 1 � p); e is the maximal errorof estimation, expressed in percents; and zc isthe confidence coefficient for Normaldistribution.

• Use the calculated sample size directly as thenumber of independent replications of simulationexperiment.

• Specify time interval for cross-sections of thestates of the system (snapshots interval).

Phase 3 – Make simulation experiments:

• Run the AIRGSSP simulation model.• Display simulation results. Arrange relative fre-

quencies for chosen system states, as time depen-dent values, and display them in table and/orgraphical form.

5. Verifying statistical integration

Now, the method explained above will be demon-strated and tested. Testing will be done by compar-ing simulation results with the other ones, obtainedby some ‘‘stronger’’ method – a numerical methodimplemented in standard software package MAT-

LAB. This simple idea is principally known; Cooper(1981) called it ‘‘optimal situation’’.

One of the referential (mostly studied) queueingmodels, M/M/1/n, will be used with followingconditions:

• there are seven places in a queue (n = 7);• time engagement of a queueing system is 6000

time units;• average service time is 100 time units, exponen-

tially distributed; and• average time between arrival of clients in input

stream is 120 time units, exponentiallydistributed.

Basic mathematical description of this system arestate equations known as Erlang’s equations, andthose are:

_p0ðtÞ ¼ �kp0ðtÞ þ lp1ðtÞ_p1ðtÞ ¼ kp0ðtÞ � ðkþ lÞp1ðtÞ þ lp2ðtÞ. . .

_p7ðtÞ ¼ kp6ðtÞ � ðkþ lÞp7ðtÞ þ lp8ðtÞ_p8ðtÞ ¼ kp7ðtÞ � lp8ðtÞ

ð2Þ

These are the normalization condition (3) and theinitial conditions (4):

X8

i¼0

piðtÞ ¼ 1 ð3Þ

p0ð0Þ ¼ 1; p1ð0Þ ¼ p2ð0Þ ¼ . . . ¼ p8ð0Þ ¼ 0 ð4Þ

Variables pi(t) present time-dependent probabilitiesof the queueing system’s states. Index i presentsthe number of clients in a system. The independentvariable is time (t).

Fig. 3 presents both solutions: by numericalmethods (smooth curves), and by AIRGSSP simula-tion model (rough curves). Of course, both groupsof results can be presented in a table, but graphsare certainly better. Simulation results are basedon arbitrary chosen 10,000 sample size. That is, somany independent replications of the whole process(QS which ‘‘is open for clients’’ for a period of 6000time units) have been done.

In Fig. 3, state probabilities p0(t), . . .,p8(t), aredisplayed from above (p0(t)), to below (p8(t)). Goodagreement of simulation results with other onesobtained by numerical methods is obvious. Usingstandard statistical tests, for example, v2-test (chi-square test), this agreement could be tested for everyparticular state probability. Simulation results pre-sented in Fig. 3 are a ‘‘rough’’ material, that is theoriginal simulation data without any fitting or cal-culating trends of original simulation curves.

Also, a conclusion that the considered QS work-ing for a finite time, most of that time works in aregime different from the steady-state regime cannotbe avoided. That is, QS in this example uses morethan a half of its time of engagement in transient(initial, non-stationary, warm-up, start-up) period.Knowing QS state probabilities as time dependentvariables, it is easy to determine the practical begin-ning of the steady-state (choose a point on a time-axes when probability curves become practicallyconstant). So, this long-lived problem, see for exam-ple Gafarian et al. (1978), can be effectively solved.

Page 6: Statistical integration of Erlang’s equations

Comparing numerical and simulation (sample size: 10,000)results for all pi(t) for QS M/M/1/7

0

0.1

0.2

0.3

0

500

1000

1500

2000

2500

3000

3500

4000

4500

5000

5500

6000

Time

Pro

bab

iliti

es

Fig. 3. Solutions for p0(t), . . .,p8(t) by numerical methods and by AIRGSSP simulation.

1492 N. Nikolic / European Journal of Operational Research 187 (2008) 1487–1493

To illustrate this better, in Fig. 4 only one stateprobability is presented, p0(t), which is calculatedby numerical methods and by three different AIR-GSSP simulations. Simulation results are based onthree different sample sizes: 30 (classical borderbetween small and large sample size); 1076; and10,000. Large differences for sample size of 30 inde-pendent replications are evident, but they are inagreement with results obtained by formula (1).For the least value of p0(t), which is 0.2067329,and for confidence coefficient 2.58 (corresponds to0.99012 value of confidence), and for sample sizeof 30 elements, there is an expected maximal errorof 92.3%.

This situation only confirms the need for a largesample size, that is for numerous independent repli-cations of a simulated stochastic process. And this isthe main reason for involving automation in obtain-ing numerous and independent simulation runs.

Finally, according to referential recommenda-tions in the field of simulation modeling, like Gai-ther (1990) and Pawlikowski et al. (2002), a fewwords about hardware and software environmentscan be added. AIRGSSP simulation model usedfor above results has been created in one school ver-sion of famous GPSS simulation language. Simula-tion output has been prepared and displayed usingthe standard MS Excel package. One typical per-sonal computer (P1 or P2) is enough as a hardware

platform. Time of running the AIRGSSP modeldepends on the PC processor’ speed and on thenumber of replications. That is, the simulationexperiment for above example (and 10,000 replica-tions), on PC P2 (233 MH), has a duration of about1 h.

6. Summary

Simulation modeling has inherent potential tocover more complex queueing models. There areno problems with changing the type of queueingsimulation model like the queue length (includingunlimited queues), intensities and types of inputand output client streams, the number of servers,queue disciplines, and so on. But, one of the crucialproblems in simulation is how to believe in the accu-racy of simulation results. One logical possibility ispresented here: comparing simulation results toavailable results obtainable by exact methods, ana-lytical as well as numerical methods. This is possibleonly for relatively simple queueing models. If highand controlled accuracy of simulation results forsimple models can be achieved, than such simula-tion method can be used in modeling and solvingmore complex queueing models. This is just the casewith the method stated here and marked as ‘‘Auto-mated Independent Replications with GatheringStatistics of Stochastic Processes’’ (AIRGSSP).

Page 7: Statistical integration of Erlang’s equations

Comparing numerical and three assemblies of simulation results (sample size: 30; 1,076; 10,000), for p0(t)

0

0.1

0.2

0.3

0.4

0

500

1000

1500

2000

2500

3000

3500

4000

4500

5000

5500

6000

Time

p0

(t)

Fig. 4. Comparison of numerical and three simulated p0(t).

N. Nikolic / European Journal of Operational Research 187 (2008) 1487–1493 1493

Initially, the whole research was motivated bystudying some battle engaged military logistics sys-tem, describable as the queueing system of finitetime engagement, with no limits on traffic intensity,and with general types of input and output clientstreams. Because of its complexity, simulation mod-eling has been a logical choice. Very soon, the ques-tions about the accuracy of simulation results hadarisen and the investigation started. The decisionto present statistical integration of Erlang’s equa-tions comes from the importance of the queueingsystem’ state probabilities, and the power of MonteCarlo simulation modeling with the solved (asauthor believes) problem of accuracy of simulationresults.

This effort tends to contribute to the simulationcommunity in the process of solving importantproblems and improving methods in simulationmodeling. Also, the investigation has been carriedout with the great help of corresponding simulationliterature, and the author is thankful to all thosewho made their papers available.

References

Cooper, B.R., 1981. Introduction to Queueing Theory. ElsevierNorth Holland, New York.

Defence Modeling and Simulation Office, 1997. DoD Modelingand simulation (M&S) Verification, Validation, and Accred-itation (VVA): Recommended practices guide. DMSO, Alex-andria, VA, USA www.dmso.mil/.

Gafarian, A.V., Ancker, C.J., Morisaku, T., 1978. Evaluation ofcommonly used rules for detecting ‘‘steady state’’ in computersimulation. Naval Research Logistics, 511–529.

Gaither, B., 1990. Empty empiricism. ACM Performance Eval-uation Review 18/2, 2–3.

Kleinrock, L., 1975. Queueing Systems – Volume I: Theory. JohnWiley & Sons, New York.

Law, A., Kelton, D., 1982. Simulation Modeling and Analysis.McGraw Hill, New York.

Mihram, G.A., 1972. Simulation: Statistical Foundations andMethodology. Academic Press, New York.

Nikolic, N. 2003. Limitations of theoretical and commonly usedsimulation approaches in considering military queueing sys-tems. In: Proceedings of the 15th European SimulationSymposium 2003, Delft, Holland, 602–607.

Nikolic, N. 2004. Fidelity in studying of military queueingsystems. European Simulation Interoperability Workshop2004; Edinburg. Available from: <http://www.sisostds.org>.

Odoni, A., Ruth, E., 1983. An empirical investigation of thetransient behavior of stationary queueing systems. OperationsResearch 31/3, 432–455.

Pawlikowski, K., Jeong, H.D.J., Ruth Lee, J.S., 2002. Oncredibility of simulation studies of telecommunication net-works. IEEE Communications Magazine 1, 132–139.

Raatikainen, K., 1995. Simulation-based estimation of propor-tions. Management Science 41/7, 1202–1223.

Shephard, R.W. et al., 1988. Applied Operations Research –Examples From Defense Assessment. Plenum Press, NewYork.

Spiegel, M.R., 1961. Theory and Problems of Statistics. Springer,New York.

Stidham, S., 2002. Analysis, design, and control of queueingsystems. Operations Research, 50/1.