Transient Behavior of Queueing Networks - Semantic Scholar

0 downloads 0 Views 419KB Size Report
Ong and Taaffe (1989), Zhang and Coyle (1991), Eick et al. (1993) ...... Ria˜no, G., S. H. Ng, R. Serfozo, S. Hackman, Lai Peng Chan, Peter Lendermann. 2003.
Submitted to Operations Research manuscript OPRE-2006-07-294

Transient Behavior of Queueing Networks Germ´an Ria˜ no COPA – Centro de Optimizaci´ on y Probabilidad Aplicada, Universidad de los Andes, Bogot´ a, Colombia, [email protected],

Richard F. Serfozo, Steven T. Hackman School of Industrial and Systems Engineering, Georgia Institute of Technology, Atlanta, GA 30332, [email protected],[email protected],

We present algorithms for approximating time-varying performance parameters for a Gt /G/c queuing system and for networks of such stations. The key ingredient is a formula for computing approximate sojourn time distributions for a Gt /G/c queuing system with time-varying arrivals and phase-type service times. The formula is based on transient Little laws expressing expected queue lengths and outputs as integrals of “nonstationary” Palm distributions of sojourn times. The algorithms were designed for use in optimizing inputs to production and computer systems. Numerical examples show their accuracy. Subject classifications : queues: nonstationary networks approximations, sojourn times, output process; probability: non-stationary Palm probabilities; production: planning. Area of review : Stochastic Models History :

1

2

Ria˜ no, Serfozo, Hackman: Transient Behavior of Queueing Networks Article submitted to Operations Research; manuscript no. OPRE-2006-07-294

1. Introduction This study addresses the issue of describing the transient or time-varying behavior of sojourn times, outputs and queue lengths in queueing systems. The motivation came from the production planning models in Billington et al. (1986), and Hackman and Leachman (1989), Leachman and Raar (1994), and Leachman et al. (1996) and our research on stochastic material requirements planning (MRP); Ria˜ no (2002), Ria˜ no et al. (2003). The aim of production planning or stochastic MRP is to determine when to release products into production in order to meet forecasted requirements with a desired probability at a minimum cost. In Ria˜ no et al. (2003), we developed a model to solve this problem for time-varying Mt /Gt /∞ production systems, where the production output is a Poisson process whose rate is a function of the time-varying service times. The output processes we study here are not Poisson processes. Production planning differs from traditional machine scheduling that chooses which job in the queue to process, assuming the input process is predetermined (not subject to control). Production planning considers the reverse situation of controlling the input process, assuming the production scheduling rules or protocols are predetermined. As opposed to long-run averages, transient information about outputs and Work-In-Process (WIP) is critical for production planning, since it involves time-varying demands and inputs over a time horizon as short as several weeks using time periods as short as one day. In such settings, an important problem, which we address herein, is to describe the transient output process of finished products as a function of a time-varying input process and the products’ sojourn times (total time in the system). Such times are sometimes called lead times or cycle times. In production parlance, we seek to more accurately estimate the (time-varying) lead times as a function of the system load, a well-known but challenging problem due to the aforementioned transient behavior. There are other systems, besides production planning, where describing the stochastic transient behavior is very important. For example in call centers the rate of arrivals, and the available number of agents to handle them, change during the day. For a review on call center modeling see Gans et al. (2003). Sojourn times are complicated because they typically depend on the load in the system. The literature on load-dependent lead times in deterministic production planning models is nicely reviewed in Pahl et al. (2005). Our main motivation, however, has been in stochastic planning, where the main goal is to meet a production schedule with a desired probability. For a production system with queueing that is not in equilibrium, the main technical difficulty concerning sojourn times is that they are described by “non-stationary” Palm probabilities conditioned on their arrival times. Non-stationary Palm probabilities, which are not as familiar as stationary Palm probabilities, were introduced by Ryll-Nardzewski (1961) and discussed in Kallenberg (1983). Their only application to queueing that we found is Rolski (1989), who studied periodic queues. The gist of the present study is to develop algorithms for computing information about sojourn times and output processes for queueing systems. The development consists of the following tasks. • For a general input-output system, derive transient Little laws that express the expected output in terms of Palm distributions of sojourn times. • Derive a formula for approximating distributions of sojourn times in a Gt /G/c system. • Use the formula and properties of phase-type distributions to develop an algorithm for computing output and the sojourn-time information. • Develop a procedure for analyzing queueing networks. The algorithms are designed for applications involving optimizing input processes for production and computer systems. We will discuss such optimization models in follow-on papers. Our procedure for analyzing transient queueing networks is similar in spirit to the “Queueing Network Analyzer” (QNA) developed by Whitt (1983) for analyzing stationary networks. However,

Ria˜ no, Serfozo, Hackman: Transient Behavior of Queueing Networks Article submitted to Operations Research; manuscript no. OPRE-2006-07-294

3

there is a major difference. While both procedures shed light on the performance of queueing networks, they are designed for different time regimes. Whitt approximates departure and arrival processes by renewal process based on moments of service and inter-arrival times and routing probabilities, and uses limit theorems for consistency conditions. We stress time-varying arrivals as input data, and focus on the resulting time-varying structure of output processes and sojourn times, using transient Little laws and phase-type algorithmic techniques. Other approches to transient behavior analysis can be seen, for eaxmple, in Taaffe and Ong (1987.), Ong and Taaffe (1989), Zhang and Coyle (1991), Eick et al. (1993), Jennings et al. (1996), Choudhury et al. (1997), Wang (1999), Kumar (2001), Wang (2003). The rest of this study is organized as follows. Section 2 covers transient Little laws for a general input-output system. Section 3 contains a formula for approximating the non-stationary Palm distribution of a sojourn time in a Gt /G/1 system. Section 4 shows how to compute parameters for phase-type sojourn times. Section 5 contains our algorithm for computing performance parameters for a Gt /G/1 system, which is generalized to multiple servers and multiclass customers in Sections 6 and 7. Our procedure for computing performance parameters for networks is in Section 8. Section 9 contains numerical results showing the accuracy of our algorithms, and, finally, Section 10 gives concluding remarks.

2. Transient Little Laws In this section, we formulate the time-dependent queue length and cumulative output processes of a general input-output system as integrals of the input process and the sojourn times of items in the system. The expectations of these queue length and output processes are what we call “Transient Little Laws.” These laws, which are of interest by themselves, are the framework for our subsequent analysis. We will use the following notation throughout this study. Consider a general input-output or processing system, where items arrive at times 0 < T1 < T2 < . . . such that Tn → ∞ w.p. 1. The number of arrivals in the time interval [0, t] is N (t) =

∞ X

1(Tn ≤ t),

t ≥ 0.

n=1

We assume EN (t) exists and, for simplicity, it has the form Z

EN (t) =

t

λ(s) ds. 0

where λ(t) denotes the input rate at time t. Example 1. Renewal Input Process. Suppose N (t) is a renewal process whose inter-renewal times have a density f (t). A well-known fact of renewal theory is that EN (t) =

Z tX ∞

f n? (s)ds.

0 n=1

P∞ Therefore, the arrival rate is λ(t) = n=1 f n? (t). Here ? denotes convolution, and f n? (t) is the nth-fold convolution of f . An important property of renewal processes is that the process N (t) is determined completely by the rate function λ(t) (which is the derivative of the renewal function), i.e., λ(t) uniquely determines the finite-dimensional distributions of N (t).

Ria˜ no, Serfozo, Hackman: Transient Behavior of Queueing Networks Article submitted to Operations Research; manuscript no. OPRE-2006-07-294

4

Let X(t) denote the quantity of items in the system (or queue length) at time t. We assume the arrivals and processing of items are such that the expected queue length L(t) ≡ E[X(t)] exists for each t. Then, assuming X(0) = 0, the expected number of departures in (0, t] is Z t λ(s) ds − L(t). (1) D(t) = E[N (t) − X(t)] = 0

Another performance parameter of the system is the sojourn time Wn of the nth arrival at time Tn : the total time the item spends in the system, including its queueing time. Then W (t) ≡ WN (t) is the sojourn time of the last arrival at or prior to t. We let Ft (x) denote the distribution of the sojourn time W (t) “conditioned” that there is an arrival at time t (i.e., N (t) = N (t−) + 1). Since the probability of an arrival at any instant may be 0 (which is the case for a Poisson arrival process), the distribution Ft (x) is not defined by conventional conditional probabilities. In many contexts (e.g., for non-stationary Markov jump processes), Ft (x) is the limit of conditional probabilities Ft (x) = lim P {W (t) ≤ x|N (t) − N (s) ≥ 1}. s↑t

The conditioning ensures there is an arrival in the interval (s, t], where s ↑ t. In general, Ft (x) is defined as a certain Radon-Nikodym derivative and is called the ”non-stationary” Palm probability of the sojourn time conditioned that an arrival occurs at time t; see Ryll-Nardzewski (1961) and Kallenberg (1983). Further details on non-stationary Palm probabilities are not needed, since our analysis can be understood without knowledge of this subject. The following are expressions for the mean queue lengths and outputs as functions of the input rate λ(t) and the sojourn time distributions Ft (x). Theorem 1. (Transient Little Laws) For the system described above, Z t L(t) = F s (t − s)λ(s) ds, Z0 t D(t) = Fs (t − s)λ(s) ds, t ≥ 0,

(2) (3)

0

where F t (·) = 1 − Ft (·). Proof. The n-th item that arrives at time Tn is still in the system if its departure time Tn + Wn exceeds t. Therefore, ∞ X X(t) = 1(Tn + Wn > t). n=1

We can write this sum as the integral Z

t

1(W (s) > t − s)dN (s).

X(t) =

(4)

0

Our aim is to show the expectation of this quantity satisfies (2). We first note that, for any function f : [0, ∞) → [0, ∞), hZ t i Z t f (s)λ(s)ds. E f (s)dN (s) = 0

0

This is a standard property, which follows by proving it when f is an indicator function, a linear combination of indicator functions, and then a limit of such linear combinations. An analogous formula for a nonnegative stochastic process {Z(t) : t ≥ 0} is hZ t i Z t E Z(s)dN (s) = Es [Z(s)]λ(s)ds, (5) 0

0

Ria˜ no, Serfozo, Hackman: Transient Behavior of Queueing Networks Article submitted to Operations Research; manuscript no. OPRE-2006-07-294

5

provided the integral exists. Here Es is the expectation associated with the non-stationary Palm probability that an arrival occurs at time s. Now, taking the expectation of (4) and using (5), we have Z t Z t E[X(t)] = Es [1(W (s) > t − s)]λ(s) ds = F s (t − s)λ(s) ds. 0

0

This proves (2). In addition, (3) follows from (1) and (2).  Some insight on Theorem 1 is given by the following familiar model (e.g., see Serfozo 1999). Example 2. Mt /Gt /∞ System. Suppose that items arrive accordingly to a time-dependent Poisson process with rate λ(t) to an infinite number of servers and the service time of an arrival at time t has the distribution Gt , independent of everything else. Since there is no queueing, the sojourn time is simply the service time, and so Ft = Gt . It is well known that the number of items X(t) in the system at time t is a Poisson random variable with mean (2), because X(t) is a “thinning” of the Poisson arrivals. Furthermore, the departure process is a Poisson process with mean function (3), because the departures times are the Poisson arrival times “translated” independently by the service times. Although these results are based on non-stationary Palm probabilities they are never mentioned because the quantities of interest are simply transformations of Poisson processes. The next example relates transient Little laws to stationary laws. Example 3. Stationary Little Laws Suppose the system is stationary with arrival rate λ, and items are served on a first-come-first-served basis. The stationarity implies the arrival process is stationary with mean EN (t) = λt, where λ = EN (1). Another implication is that the sojourn time distributions are all the same; namely Ft (·) = F (·), for each t, where F is the distribution of the sojourn time W of an arrival at time 0, assuming the system has been operating since time −∞. Then considering all the arrivals in the time interval (−∞, t], expression (2) is Z ∞ Z t F (t − s)λ ds = λ F (u) du. L(t) = −∞

0

Note that this is independent of t, and the last integral is the mean sojourn time E[W ], where E is the expectation of the Palm probability that an arrival occurs at time 0. Therefore, the preceding is L = λE[W ], which is a classical Little Law (e.g. see Baccelli and Br´emaud 1994, Serfozo 1999). We will use the integral equations in Theorem 1 for computing L(t) and D(t) as a function of the input rate λ(t). This, of course, requires knowledge of the sojourn time distribution Fs for an arrival at each time s ≤ t. Even with additional assumptions on the queueing discipline, these sojourn time distributions would generally be intractable, since they depend on transient system behavior. For practical applications, however, discrete-time versions of the integral equations are natural vehicles for approximating Ft as well as L(t) and D(t). We develop such an approximation in the next four sections for certain Gt /G/c systems. Then we use this approximation for modeling networks of such stations.

3. Sojourn Times in a Gt /G/1 System We will consider a special case of the system described in the preceding section, called a Gt /G/1 system, which has the following properties. It is a first-come-first-served system with a single server, and the service times are independent continuous random variables with a distribution G that has a mean m and variance σ 2 . The arrival process has a time-varying rate λ(t) which is known, and the probability of having an arrival at any instant of time is 0. In this section, we derive a formula for approximating the Palm distribution Ft of the sojourn time of an arrival at time t.

Ria˜ no, Serfozo, Hackman: Transient Behavior of Queueing Networks Article submitted to Operations Research; manuscript no. OPRE-2006-07-294

6

The starting point for our analysis is the following classical formula for the sojourn time distribution for a M/G/1 queueing system in equilibrium. Consistent with the notation above, λ is the arrival rate, and G is the service time distribution with mean m and variance σ 2 . We will also use the equilibrium distribution associated with G, which is Z 1 t Ge (x) = [1 − G(s)] ds. m 0 The mean of Ge is

m [1 + (σ/m)2 ]. 2 As in Example 3, let F denote the distribution of the sojourn time W for a typical arrival to this system in equilibrium. (The F is with respect to the stationary Palm probability of the system conditioned on an arrival at time 0.) The well-known Pollazek-Khintchine formulas for F and its mean are (e.g., see Gross and Harris 1985) me =

F (x) = G ? (1 − ρ)

∞ X

ρn Gn? e (x)

(6)

n=0

EW = m +

ρ me , 1−ρ

(7)

where ρ = λm < 1 is the traffic intensity. We will now consider the Gt /G/1 system. For an arrival at time t let W (t) denote its sojourn time with (non-stationary Palm) distribution Ft (x). We will approximate Ft (x) based on the following assumptions. Approximation Assumptions. A1. The distribution Ft (x) has the form (6), where ρ is replaced by a time-dependent ρ(t) ∈ (0, 1). The ρ(t) will be determined by equating two expressions for E[W (t)] based on the next approximating assumptions. A2. At the time of an arrival, the mean residual service time of a customer in service is the mean me of the equilibrium service time distribution Ge . A3. The rate of change in L(t) is the input rate minus the service rate L0 (t) = λ(t) − (1/m)p(t),

t > 0,

where p(t) denotes the probability that the arrival has to wait in queue before being served. This formula is exact for the Mt /M/1 system. Approximation 2. For the Gt /G/1 system, the distribution of the sojourn time W (t) of an arrival at time t is approximately Ft (x) = G ? [1 − ρ(t)]

∞ X

ρ(t)n Gn? e (x),

(8)

n=0

where me , p(t)(me − m) + mL(t) p(t) = m[λ(t) − L0 (t)].

ρ(t)−1 = 1 +

(9) (10)

The mean of the distribution (8) is E[W (t)] = m + me

ρ(t) . 1 − ρ(t)

(11)

Ria˜ no, Serfozo, Hackman: Transient Behavior of Queueing Networks Article submitted to Operations Research; manuscript no. OPRE-2006-07-294

7

Justification. The general approximation (8) and its mean in (11) are based on assumption (A1) and the Pollazek-Khintchine formulas (6) and (7). To determine ρ(t), let us consider the mean waiting time of an arrival at time t, which is E[W (t)] = m + E[ξ1 | X(t) ≥ 1]P {X(t) ≥ 1} ∞ X + E[ξj | X(t) ≥ j]P {X(t) ≥ j }.

(12)

j=2

Here X(t) is the number of items the arrival at time t sees in the system, m is the mean service time of the arriving item, and ξ1 , ξ2 , . . . are the service times of the items that may be in the system. Clearly P {X(t) ≥ 1} = p(t), and E[ξ1 |X(t) ≥ 1] = me by approximation assumption (A2). Also, E[ξj |X(t) ≥ j] = m, for each j ≥ 2, since the service time of an item in the queue is equal in distribution to a typical service time. Then the last sum in (12) equals m

∞ X

P {X(t) ≥ j } = m[E[X(t)] − p(t)].

j=2

The probability of an arrival at any instant of time is 0, under the Palm probability X(t) is equal in distribution to the quantity X(t) in the system, and so E[X(t)] = L(t). From the preceding observations, it follows that E[W (t)] = m + me p(t) + m[L(t) − p(t)]. Equating this mean to the approximate mean (11), we have ρ(t)/(1 − ρ(t)) = p(t) + mm−1 e [L(t) − p(t)]. Solving this for ρ(t) yields (9), where p(t) is given by (10), which follows from approximation assumption (A3).  Note that approximation (8) for the distribution Ft depends on the past and future of the system only through L(t), L0 (t) and the arrival rate λ(s), for s ≤ t. Our implementation below of (8) shows how to compute L(t), and L0 (t) recursively with Ft . Recall from Example 1 that all the probabilistic information of the arrival process is determined completely by the arrival rate when the arrival process is a Poisson or renewal process. For any other type of input process, one could use a renewal approximation for it as in Whitt (1983). Remark 1. Initial Sojourn Time. Approximation (8) for Ft applies for t = 0 when the initial queue is unknown. When the initial quantity is known, denoted by the mean L(0), a better approximation is ( G(x) if L(0) ≤ 1 F0 (x) ≈ (13) (L(0)−1)? Ge ? G (x) if L(0) > 1. This is based on approximation assumption (A2) (which is true for exponential service times). Remark 2. Sojourn Time for items in the system. The sojourn time distributions for items already in the system at time t = 0 have to be computed differently. This depends on what information is available to us. If the only information is that L(0) customers are in the system then along the lines of assumption (A2) above, the distribution for the one in service is Ge and for the k-th in line is Ge ? G(k−1)? . Later we will use the “average distribution” L(0)

Fˆ (t) =

1 X G ? G(k−1)? . L(0) k=1

(14)

Ria˜ no, Serfozo, Hackman: Transient Behavior of Queueing Networks Article submitted to Operations Research; manuscript no. OPRE-2006-07-294

8

4. Phase Type Sojourn Times To implement the formulas above for the sojourn time distribution Ft , it is natural to use phase type distributions. In this section, we prove that if the service time distribution G is phase type, then the formulas (8) and (13) for Ft are also phase type. This result allows us to compute the key parameter ρ(t) by elementary matrix operations. A phase type distribution (PhTD) with parameters α and A (e.g., see Neuts 1981, 1995, Latouche and Ramaswami 1999), can be expressed as F (x) = 1 − αeAx 1,

x > 0,

(15)

where α is a row vector of size n, 1 is a column vector of ones, Ax

e

=

∞ X (Ax)j j=0

j!

,

and A is an n × n matrix such that 

Q=

0 0 aA



is an infinitesimal generator matrix of a Markov process. Here a is a column vector of size n which, is uniquely determined as a = −A1. PhTD can be thought of as the time before absorption into state 0 in the aforementioned Markov Process. Phase type distributions are dense in the space of distributions, so any distribution can be, at least in principle, approximated by a phase type distribution; Asmussen et al. (1996) gives an algorithm to fit actual data to a PhTD. Consequently, assuming service times are phase type does not limit the applicability of our model. Also, phase type distributions are closed under several operations including convolutions, mixtures and minima. Here is the main property that we will need. Proposition 1. Suppose the service time distribution G is PhTD of order n. Then Ft (x) in equation (8) is PhTD of order (k + 1)n. Furthermore, F0 (x) in (13) and Fˆ (x) in (14) are also PhTD of order nL(0). Proof. Since G is a PhTD of order n, it is well-known that its equilibrium distribution Ge is also a PhTD of order n. Next, we note that (1 − ρ(t))

∞ X

ρi Gi∗ e (t)

i=0

PN corresponds to a geometric sum ( k=1 Xk ) of independent phase type random variables, which is known to be a PhTD of the same order. Finally, (8) is the convolution of two PhTD of order n, and hence is a PhTD of order 2n. Similar reasoning shows that the distribution in (13) and (14) are PhTD of order nL(0). 

5. Algorithm for Gt /G/1 System We will now present an algorithm for computing the sojourn-time distributions Ft and expected queue lengths and departures for the Gt /G/1 system described above with phase type service times. The algorithm is based on discrete-time versions of the transient Little laws in Theorem 1 evaluated recursively using approximation (8).

Ria˜ no, Serfozo, Hackman: Transient Behavior of Queueing Networks Article submitted to Operations Research; manuscript no. OPRE-2006-07-294

9

Consider the Gt /G/1 system and assume for now that it is empty at time 0. Then by the Little laws in Theorem 1, its expected queue length and departures at “discrete times” are t Z u X F s (t − s)λ(s) ds (16) L(t) = u−1 u

u=1

D(t) =

t Z X

Fs (t − s)λ(s) ds

t = 1, 2, . . . .

(17)

u−1

u=1

Approximation 3. When their time unit is small, equations (16), (17), are approximately L(t) =

t X

λ(u)[1 − w(u, t)],

D(t) =

u=1

t X

λ(u)w(u, t),

t ≥ 1,

(18)

u=1

where

Z

u

Fu−1 (t − s) ds,

w(u, t) =

u = 1, . . . , t.

(19)

u−1

In these weights, Fu is approximated by (8) with L0 (t) = L(t) − L(t − 1). If, in addition, the service distribution G is PhTD as in (15), then Fu (x) ≈ 1 − αu eAu x 1

(20)

where αu and Au are the parameters for the phase type distribution in (8) (or (13)) for approximating Fu . Furthermore, Au−1 (t−u) w(u, t) = 1 − αu−1 A−1 1 − eAu−1 (t−u+1) 1]. u−1 [e

(21)

Justification. The equations in (18) follow by substituting the piecewise-constant functions Ft (·) ≡ Fbtc (·) and λ(t) ≡ λ(dte) in equations (16) and (17). If G is a PhDT, then by Theorem 1, the distribution in (8) or (13) for approximating FRu is a PhDT, which justifies (20). Using this u representation for Fu , the integral in (19) equals u−1 αu−1 eAu−1 (t−s) 1 ds, which clearly equals expression (21).  Suppose the Gt /G/1 system begins at time 0 with L0 > 0 items. Then the equations in (18) are ˆ + L(t) = L(t)

t X

λ(u)[1 − w(u, t)],

ˆ + D(t) = L(t)

u=1

t X

λ(u)w(u, t),

(22)

u=1

where, using Fˆ from Remark 2, ˆ = L0 [1 − Fˆ (t)], L(t)

(23)

which is the expected number of the initial L0 customers that are still in the system at time t. Using Approximation 3, we have the following algorithm for computing the transient performance parameters of the Gt /G/1 system with phase type services. Algorithm 4. Computation of Ft , L(t) and D(t). Compute phase parameters α0 and A0 for F0 (·), using (13). ˆ Compute Fˆ (t) and L(t) for t = 1, . . . , T , using (14) and (23), respectively. for t = 1, . . . , T ,. do • Compute w(u, t) by (21) for u = 1, . . . , t, with the known phase parameters computed in previous iterations. • Then compute L(t) and D(t) by (22). • Compute ρ(t) by (9), with L0 (t) = L(t) − L(t − 1). • Compute the phase parameters αt , At for the distribution Ft (·) given by (8) using the previously computed ρ(t). end for

Ria˜ no, Serfozo, Hackman: Transient Behavior of Queueing Networks Article submitted to Operations Research; manuscript no. OPRE-2006-07-294

10

6. Model for Multiple servers In this section, we extend the model above to incorporate multiple servers. Analogous to the development above, we will consider a Gt /G/c queueing system with c independent servers. As above, the arrival rate is λ(t), and the services have a distribution G with mean m and variance σ 2 . Also Ge is the equilibrium distribution associated with G and its mean is me . We initially suppose the system is empty at time 0. In addition, we will use the distributions H(x) = 1 − Ge (x)c−1 G(x),

H1 (x) = 1 − Ge (x)c ,

and denote their means by µ and µ1 . Let He (x) denote the equilibrium distribution associated with H(x) and denote its mean by µe . The following approximation will use approximation assumptions similar to the one above for the Gt /G/1 system. Here are two of them, the rest will be mentioned when they are invoked. B1. The expected quantity of customers in the system satisfies the differential equation L0 (t) = λ(t) − (1/m)B(t),

(24)

where B(t) is the expected number of busy servers at time t. B2. The probability that an arrival has to wait in the queue for service is p(t) ≡ α(B(t)), where α(B) =

(25)

P (c; B) − P (c − 1; B) . P (c; B) − (B/c)P (c − 1; B)

(26)

The α(B) is the Erlang probability that a customer will be delayed in a M/M/c queue in equilibrium Pc where B = λm is the expected number of busy servers , and P (c; B) = n=0 e−B B n /n! (a Poisson probability). This form for α(B) is efficient for computations, e.g., see Grassmann (1988). Approximation 5. For the Gt /G/c system, the distribution of the sojourn time W (t) of an arrival at time t is approximately Ft (x) = G ? [1 − ρ(t)]

∞ X

ρ(t)n Hen? (x),

(27)

n=0

where µe , µ1 p(t) + µ(L(t) − B(t)) B(t) = m(λ(t) − L0 (t)).

ρ(t)−1 = 1 +

(28) (29)

The expectation of the distribution in (27) is E[W (t)] = m + µe p(t) + µ(L(t) − B(t)).

(30)

Justification. First note that the expectation of the distribution in (27) is E[W (t)] = m + µe (1 − ρ(t))

∞ X n=0

which in view of (28) equals (30).

nρn (t) = m +

ρ(t) µe , 1 − ρ(t)

(31)

Ria˜ no, Serfozo, Hackman: Transient Behavior of Queueing Networks Article submitted to Operations Research; manuscript no. OPRE-2006-07-294

11

Similarly to (8), we will approximate Ft (x) by (27), but now He takes the place of Ge , which we will now explain while deriving expression (29) for ρ(t). We can write W (t) = S + η1 1(X(t) ≥ c) +

∞ X

1(X(t) = n)

n=c+1

n−c+1 X

ηj ,

(32)

j=2

where S is the service time of an arriving item, X(t) is the number of items the arrival sees in the system, and η1 , η2 , . . . are the times between service completions of the items in the system. In case X(t) ≥ c, we can write η1 = min{Y1 , . . . , Yc }, where Y1 , . . . , Yc are the residual service times of the items at the c servers. If these times were independent and had the residual service time distribution Ge , then η1 would have the distribution H1 , and so E[η1 |X(t) ≥ c] = µ1 . We adopt this as an approximation. Then E[η1 1(X(t) ≥ c)] = µ1 p(t). Similarly, we adopt the approximation that E[ηj |X(t) = n] = µ, for 2 ≤ j ≤ c and n > c. This would be true for the mean of ηj = min{S, Y2j , . . . , Ycj }, if S, Y2j , . . . , Ycj were independent with distribution G for S, and the other random variables have distribution Ge . Here S is the complete service time of the item that just entered a server, while the other Ykj are residual service times at the other servers. Taking expectations in (32) and using the preceding two approximations along with E[X(t)] = L(t), we have E[W (t)] = m + µ1 p(t) + µ

∞ X

(n − c)P (X(t) = n)

n=c+1

= m + µ1 p(t) + µ[L(t) − B(t)], which is (30). Equating the last expression with (31), and solving for ρ(t), leads to (28), where (29) comes from (24). This ends our justification of the approximation.  Remarks 1 and 2 on the initial sojourn time and sojourn times of items in the system when L(0) is the exact initial number of items in the system. The equations in these remarks would be replaced by the following: ( F (t) if L(0) < c F0 (x) = (33) F ? H1 ? H (L(0)−c)? (x) if L(0) ≥ c. # " L(0) X 1 G ? H1 ? H (k−c)? (x) . (34) cGe (x) + Fˆ (x) = L(0) k=c+1 Remark 3. Phase Type Distributions. If F is a PhTD of order n, then Ft (x) in equation (27) is a PhTD of order (c + 1)n, and Fˆ (x) is also a PhTD. The proof is similar to Proposition 1, using the fact that H, He and H1 are PhTD. Remark 4. Computational Algorithm. Algorithm 4 readily extends to the Gt /G/c system based on the preceding approximation and remarks. The computation of the phase type parameter is a little more involved than before, but still is just a sequence of matrix manipulations. We end this section by showing that Approximation 5 is consistent with known results for equilibrium distributions. Proposition 2. If the input rate is constant λ(t) ≡ λ < 1/m, then the mean equilibrium queue length predicted by our approximation is Lq =

λµe α(B), 1 − λµ

where B = λm. This approximation is exact for the M/M/c and M/G/1 systems.

(35)

Ria˜ no, Serfozo, Hackman: Transient Behavior of Queueing Networks Article submitted to Operations Research; manuscript no. OPRE-2006-07-294

12

Proof. If the system is in equilibrium L0 (t) = 0, so the expected number of busy servers in (29) is given by B = λm. With this value, p(t) in (25) becomes the Erlang delay probability α(B). Notice that in (30) the first term is the service time so the rest is the queuing time, which, by Little’s law, is Lq /λ. We have therefore, from (30) and the previous comments, the equation Lq /λ = µe α(B) + µLq . Solving for Lq yields (35). Next, we show that the result is equivalent to ρ α(B) 1−ρ 1 + (σ/m)2 ρ2 Lq = 2 1−ρ Lq =

for the M/M/c and

(36)

for the M/G/1,

(37)

where ρ = B/k = (λm)/c, which are the known formulas for these systems. To see this, note that for the exponential service case Fe = F so both H and H1 are the distribution of the minimum of k independent exponentials, and therefore exponentials with mean m1 = µ = m/c. Plugging these in (35) we get (36). For the M/G/1 case µ = m and µe = µ(1 + (σ/m)2 )/2. Plugging these in (35) we get (37). 

7. Multiclass Networks The model above for computing performance parameters for Gt /G/c systems readily extends to multiclass systems involving processing of several classes or types of items. We will illustrate this idea for a FCFS service discipline. Assume that items of class i ∈ I arrive for processing at rate λi (t), and each of these items require processing with distribution Gi (t). The P approach is to use the same approximating formula (27) for the distribution Ft , but with L(t) = i∈I Li (t), and replacing the service distribution G by G(t) =

X Li (t) i∈I

L(t)

Gi (t).

(38)

This mixture of distributions is PhTD when each Fi is a PhTD. In this case, the algorithm developed above also applies.

8. Transient Behavior of Networks In this section, we describe a procedure for computing transient performance parameters for a queuing network. The procedure simply involves multiple iterations of the algorithms above. We will consider a network of Gt /G/c stations such as in Figure 1. The network is open and entering items move among the stations according to certain routing rules and then depart. Items at a station reside in one or more buffers, where each buffer contains items of the same class — their route, stage on the route and any auxiliary label are the same. The set of all buffers is denoted by B , and its subsets of input and output buffers are denoted by I and O. In Figure 1, B = {1, 2, . . . , 6}, I = {1, 2, 3} and O = {5, 6}. Additional buffers and stations may be needed to complete the accounting (e.g., station 4 with 0 delays and buffer 3 in Figure 1 are needed to differentiate items from buffer 4). The items in each buffer i ∈ B have independent service times with the same distribution Gi , which we assume is phase type, and they are served on a FCFS basis. For each buffer i, the expected queue lengths and cumulative outputs will be denoted as in the preceding sections by Li (t) and Di (t). In addition, we let Λi (t) denote the expected number of items that enter the buffer in (0, t].

Ria˜ no, Serfozo, Hackman: Transient Behavior of Queueing Networks Article submitted to Operations Research; manuscript no. OPRE-2006-07-294

Figure 1

13

Example of a Queuing Network. B1

B4

λ1(t)

D5(t)

λ2(t)

B2

B3

λ3(t)

B5

STATION 1

STATION 2

B6

D6(t) STATION 4

STATION 3

This Λi (t) is the expected input from outside when i ∈ I , and it is the expected input coming from all buffers when i ∈ B \ I . The routing of items among the buffers is such that the input P to buffer i ∈ B\I comes from units exiting from a prescribed set of buffers I (i). Then Λi (t) = j∈I(i) Dj (t). For instance, in Figure 1, I (4) = {1},

I (5) = {2},

I (6) = {3, 4}.

For this network, we have the following analogue of Algorithm 4 above (the subscript i on quantities such as Git refers to buffer i). The preliminary steps are: • Specify the input data: The initial Li (0), i ∈ B, and expected arrivals from outside λi (t) into i ∈ I , t = 1, . . . , T . • Compute phase parameters for F0i (·) given by (33). ˆ i (t), • Compute the expected number of the initial items that are in the system at time t, L which is given by (23) using (34), for i ∈ B . Algorithm 6. (Computation of Fti (·), Li (t) and Di (t), for t = 1, . . . , T.) for t = 1, . . . , T do • Compute wi (u, t) by (21), with the phase parameters from the preceding iterations, for u = 1, . . . , t. Then find Li (t), Di (t) and Λi (t) by solving the following system of linear equations (these quantities for u ≤ t − 1 have already been computed): Pt Li (t) = Pu=1 λi (u)wi (u, t) i ∈ B Λi (t) = j∈I(i) Dj (t) i ∈ B\I Λi (t) = Li (t) + Di (t) i∈B λi (t) = Λi (t) − Λi (t − 1) i ∈ B . • Compute ρi (t) by (28), for i ∈ B . • Compute the phase parameters αit , Ait for the distribution Fui (·) given by (27), for i ∈ B , using the modifications described in Section 7 to account for the multiple buffers that feed the station. end for

More complicated network structures can be used. For example output from a buffer can be split into several streams that are routed to different stations, and there may be merging of streams at some stations. For details see Ria˜ no (2002).

9. Numerical Experiments We now present numerical results from the algorithm described above.

Ria˜ no, Serfozo, Hackman: Transient Behavior of Queueing Networks Article submitted to Operations Research; manuscript no. OPRE-2006-07-294

14

9.1. Comparison with M/M/1 System For the M/M/1 system. We compared the mean L(t) from our model with the WIP (mean work in progress) from the exact formulas (see equation 2.110 in Gross and Harris (1985)). We did this for several values of ρ = λm, and for different initial conditions. Our experiments show that our values for L(t) are slightly above the exact values, especially for small ρ. See Figures 2–6. Figure 2 Exact and Model WIP for M/M/1 ρ = 0.25, L0 = 0 0.35 0.30

WIP

0.25 0.20 0.15 0.10 0.05 0.00 0.0

0.5

1.0

1.5

2.0

2.5

3.0

3.5

4.0

3.0

3.5

4.0

Time Exact

Model

Figure 3 Exact and Model WIP for M/M/1 ρ = 0.5, L0 = 0 1.20 1.00

WIP

0.80 0.60 0.40 0.20 0.00 0.0

0.5

1.0

1.5

2.0

2.5

Time Exact

Model

Figure 4 Exact and Model WIP for M/M/1 ρ = 0.9375, L0 = 0 12.00 10.00

WIP

8.00 6.00 4.00 2.00 0.00 0.0

5.0

10.0 Time Exact

Model

15.0

20.0

Ria˜ no, Serfozo, Hackman: Transient Behavior of Queueing Networks Article submitted to Operations Research; manuscript no. OPRE-2006-07-294

15

Figure 5 Exact and Model WIP for M/M/1 ρ = 0.25, L0 = 2 2.50

WIP

2.00 1.50 1.00 0.50 0.00 0.0

0.5

1.0

1.5

2.0

2.5

3.0

3.5

4.0

Time Exact

Model

Figure 6

WIP

Exact and Model WIP for M/M/1 ρ = 0.909, L0 = 9 10.00 9.00 8.00 7.00 6.00 5.00 4.00 3.00 2.00 1.00 0.00 0.0

5.0

10.0

15.0

20.0

Time Exact

Model

9.2. Comparison with Simulation Results We now describe how results from our model compare with those from simulations. We generated a sample of representative scenarios large enough to determine how well our approximation works and to determine those cases for which it might not work. The scenarios were based on several values of the following parameters: average traffic intensity, initial conditions, processing distribution, and type of input rate function (constant, decreasing, increasing, and a “rush hour”). In Appendix 10 we give a detailed explanation of the design of our experiments. A total of 108 scenarios were tested. For each of them we generated a graph of the WIP and Output as function of time as computed by the simulation and as predicted by our model. Due to limited space, we only include six illustrative examples. In Figures 7–9 we include the WIP for three examples where approximation works. We do not include the Output graph, since for all practical putposes they show an identical fit. In Figures 10–12 we show WIP and Output for three examples where it does not work too well. See Ria˜ no (2002) for the tables with all the results. From analysis of our experiments we conclude the following. • Overall the approximation performed well. • The errors in the output are always very small. • The approximation is good independently of the choice of processing time distribution. • Higher utilization values provided a slightly better approximation. • The approximation was better with constant input, which was not surprising since the approximation was based on an exact result for a stationary M/G/1 system. However it also tracked reasonably well for increasing input and “rush hour” functions.

Ria˜ no, Serfozo, Hackman: Transient Behavior of Queueing Networks Article submitted to Operations Research; manuscript no. OPRE-2006-07-294

16 Figure 7

WIP for Constant Input, with ρ = 0.5, SCV = 2 and L0 = 0. 1.2

1

WIP

0.8

0.6

0.4

0.2

0 0

2

4

6

8

10

12

100

120

Time Model Data

Figure 8

Simulation Data

WIP for Decresing Input, with ρ = 0.8, SCV = 2 and L0 = 0. 2.5

2

WIP

1.5

1

0.5

0 0

20

40

60

80

Time Model Data

Figure 9

Simulation Data

WIP for Rush Hour Input, with ρ = 0.9, SCV = 2 and L0 = 2L. 30

25

WIP

20

15

10

5

0 0

100

200

300

400

500

600

700

Time Model Data

Simulation Data

• The approximation performed less well for the decreasing input function when the system started empty. This is not surprising since it means a sudden change in the system state. • When the initial WIP was zero the approximation was excellent (except for decreasing input as noted above). When the initial WIP was not zero there were minor discrepancies at the beginning

Ria˜ no, Serfozo, Hackman: Transient Behavior of Queueing Networks Article submitted to Operations Research; manuscript no. OPRE-2006-07-294

Figure 10

17

WIP and Output for Constant Input, with ρ = 0.5, SCV = 0.5 and L0 = 2L. 1.2

1

WIP

0.8

0.6

0.4

0.2

0 0

0.5

1

1.5

2

2.5

3

3.5

4

4.5

3

3.5

4

4.5

Time Model Data

Simulation Data

2.5

2

Output

1.5

1

0.5

0 0

0.5

1

1.5

2

2.5 Time

Model Data

Simulation Data

of the planning period, but they eventually were corrected. Recall our approximation takes into ˆ which is an exact formula, account the initial WIP in two parts: first, when computing the L’s, and second, when computing the first few lead time distributions F0 (t), F1 (t), etc. Apparently the effect ofL0 in the first few time steps has to be taken into account in a slightly different way. Also, the fact that at t = 0 the system starts in a deterministic state, and our approximation is known to be accurate in steady state, i.e. when the system is more variable. In a real system this might be less of an issue, but the simulation did start in a deterministic state. • The execution time for the model was around 5–10 seconds, depending on the number of points, which was variable, as explained in the Appendix. The longest was 30 seconds for experiment 108. The simulations took around 400–600 seconds, depending on the number of replications, which was variable, and the number of items that moved through the system (roughly ρT for constant input, ρT /2 for increasing or decreasing input and ρT /1.5 for rush hour input.) So the approximation is substantially faster than the simulation model.

10. Conclusions In this paper, we have shown an effective way to obtain approximations of time-varying performance parameters for stochastic networks. The numerical results show that our predictions are close to results from exact formulas and simulation results.

Ria˜ no, Serfozo, Hackman: Transient Behavior of Queueing Networks Article submitted to Operations Research; manuscript no. OPRE-2006-07-294

18 Figure 11

WIP and Output for Decreasing Input, with ρ = 0.5, SCV = 0.5 and L0 = 2L. 1.2

1

WIP

0.8

0.6

0.4

0.2

0 0

1

2

3

4

5

6

7

5

6

7

Time Model Data

Simulation Data

3

2.5

Output

2

1.5

1

0.5

0 0

1

2

3

4 Time

Model Data

Simulation Data

Appendix. Detailed description of the Experiments For all the experiments we assume the mean processing time is 1, so all the input rates can be read as traffic intensities. • Traffic intensity. We used the following values. Low ρ = 0.5, Medium ρ = 0.8, High ρ = 0.9. • Processing Distributions. Our results are not dependent of the choice of an exponential distribution, as many analytical results are. Naturally there are many variations in shapes and types of distributions that can be tried, but we decided to limit the choice to only 3 phasetype distributions with low, high and medium variability, as measured by its square coefficient of variation of the service time, c2s (the variance divided by square of the mean): — High Variability(c2s < 1): Erlang Order 2 (so c2 = 0.5). — Medium Variability (c2s = 1): Exponential. — Low variability(c2s > 1): Hyper exponential. An hyper-exponential is a mixture of exponentials, and it is known that the squared coefficient of variation is always more than one. If we mix only two exponentials, say with probabilities p and 1 − p, then the density is given by f (t) = pλ1 e−λ1 t + (1 − p)λ2 e−λ2 t .

Ria˜ no, Serfozo, Hackman: Transient Behavior of Queueing Networks Article submitted to Operations Research; manuscript no. OPRE-2006-07-294

Figure 12

19

WIP and Output for Decreasing Input, with ρ = 0.9, SCV = 2 and L0 = 0. 6

5

WIP

4

3

2

1

0 0

50

100

150

200

250

300

350

400

450

500

400

450

500

Time Model Data

Simulation Data

250

200

Output

150

100

50

0 0

50

100

150

200

250

300

350

Time Model Data

Simulation Data

This density has three parameters. If we want to find an hyper-exponential with mean 1, and variance c2 , we can arbitrarily set p = 1/2, and then λ1 = 1+

1 q

c2 s −1 2

λ2 = 1−

1 q

c2 s −1 2

.

These formulas only work for 1 < c2s < 3. We used in our experiments c2s = 2. • Initial Conditions. We estimate the equilibrium queue level, L for an M/G/1 using P-K formula   2 1 + c2s ρ L=ρ+ , 2 1−ρ and then we set for L(0) to be the smallest integer closest L/2, L or 2L • Input Functions The input will be a non-homogeneous Poisson Process, with intensity given by a normalized Beta distribution  a−1  b−1 t t λ(s) = λK 1− , 0

Suggest Documents