Analyzing Systems Having Poisson Arrivals

Một phần của tài liệu Sheldon m ross (eds ) simulation academic press (2012) (Trang 191 - 195)

Consider a system in which arrivals occur according to a Poisson process and suppose we are interested in using simulation to computeE[D], where the value of D depends on the arrival process only through those arrivals before timet.

For instance, D might be the sum of the delays of all arrivals by time t in a parallel multiserver queueing system. We suggest the following approach to using simulation to estimateE[D]. First, withN(t)equal to the number of arrivals by timet, note that for any specified integral valuem

E[D]= m

j=0

E[D|N(t)= j]eλt(λt)j/j!+E[D|N(t) >m]

×

1− m

j=0

eλt(λt)j/j!

(9.9) Let us suppose that E[D|N(t)=0] can be easily computed and also thatDcan be determined by knowing the arrival times along with the service time of each arrival.

Each run of our suggested simulation procedure will generate an independent estimate ofE[D]. Moreover, each run will consist ofm+1 stages, with stagej producing an unbiased estimator ofE[D|N(t)= j], for j =1, . . . ,m, and with stagem+1 producing an unbiased estimator ofE[D|N(t) >m]. Each succeeding

stage will make use of data from the previous stage along with any additionally needed data, which in stages 2, . . . ,mwill be another arrival time and another service time. To keep track of the current arrival times, each stage will have a set S whose elements are arranged in increasing value and which represents the set of arrival times. To go from one stage to the next, we make use of the fact that conditional on there being a total ofjarrivals by timet, the set ofjarrival times are distributed asjindependent uniform(0,t)random variables. Thus, the set of arrival times conditional on j+1 events by timetis distributed as the set of arrival times conditional onjevents by timetalong with a new independent uniform(0,t) random variable.

A run is as follows:

step1: LetN =1. Generate a random numberU1, and letS= {tU1}.

step2: Suppose N(t)= 1, with the arrival occurring at timetU1. Generate the service time of this arrival, and compute the resulting value ofD. Call this valueD1.

step3: LetN =N+1.

step4: Generate a random numberUN, and addtUN in its appropriate place to the setSso that the elements inSare in increasing order.

step5: SupposeN(t)= N, withS specifying theN arrival times; generate the service time of the arrival at timetUN and, using the previously generated service times of the other arrivals, compute the resulting value ofD. Call this valueDN.

step6: If N < m return to Step 3. If N = m, use the inverse transform method to generate the value of N(t) conditional on it exceeding m. If the generated value is m +k, generate k additional random numbers, multiply each by t, and add these k numbers to the set S. Generate the service times of these k arrivals and, using the previously generated service times, compute D. Call this valueD>m.

WithD0=E[D|N(t)=0], the estimate from this run is E=

m j=0

Djeλt(λt)j/j!+D>m

1− m

j=0

eλt(λt)j/j!

(9.10) Because the set of unordered arrival times, given thatN(t)= j, is distributed as a set ofjindependent uniform(0,t)random variables, it follows that

E[Dj]=E[D|N(t)= j], E[D>m]=E[D|N(t) >m]

thus showing thatE is an unbiased estimator ofE[D]. Generating multiple runs and taking the average value of the resulting estimates yields the final simulation estimator.

194 9 Variance Reduction Techniques

Remarks

1. It should be noted that the variance of our estimatorm

j=0Djeλt(λt)j/j!+ D>m(1 − m

j=0eλt(λt)j/j!) is, because of the positive correlations introduced by reusing the same data, larger than it would be if the Dj were independent estimators. However, the increased speed of the simulation should more than make up for this increased variance.

2. When computingDj+1, we can make use of quantities used in computingDj. For instance, suppose Di,j was the delay of arrivaliwhenN(t)= j. If the new arrival timetUj+1is thekt hsmallest of the new setS, thenDi,j+1=Di,j fori <k.

3. Other variance reduction ideas can be used in conjunction with our approach.

For instance, we can improve the estimator by using a linear combination of

the service times as a control variable.

It remains to determine an appropriate value ofm. A reasonable approach might be to choosemto make

E[D|N(t) >m]P{N(t) >m} =E[D|N(t) >m]

1−

m j=0

eλt(λt)j/j!

sufficiently small. Because Var(N(t))=λt, a reasonable choice would be of the form

m=λt+kλt for some positive numberk.

To determine the appropriate value ofk, we can try to boundE[D|N(t) >m] and then use this bound to determine the appropriate value ofk(andm). For instance, supposeDis the sum of the delays of all arrivals by timetin a single server system with mean service time 1. Then because this quantity will be maximized when all arrivals come simultaneously, we see that

E[D|N(t)]⩽

N(t)−1

i=1

i

Because the conditional distribution ofN(t)given that it exceedsmwill, whenm is at least 5 standard deviations greater thanE[N(t)], put most of its weight near m+1, we see from the preceding that one can reasonably assume that, fork⩾5,

E[D|N(t) >m]⩽(m+1)2/2

Using that, for a standard normal random variableZ(see Sec. 4.3 of Ross, S., and E. Pekoz,A Second Course in Probability, 2007)

P(Z >x)(1−1/x2+3/x4)ex2/2 x

2π, x>0

we see, upon using the normal approximation to the Poisson, that fork⩾5 and m=λt+k

λt, we can reasonably assume that

E[D|N(t) >m]P{N(t) >m}⩽(m+1)2 ek2/2 2k

2π

For instance, withλt=103andk=6, the preceding upper bound is about .0008.

We will end this subsection by proving that the estimatorEhas a smaller variance than does the raw simulation estimatorD.

Theorem

Var(E)Var(D)

Proof We will prove the result by showing that E can be expressed as a conditional expectation ofDgiven some random vector. To show this, we will utilize the following approach for simulatingD:

step1: Generate the value ofN, a random variable whose distribution is the same as that ofN(t)conditioned to exceedm. That is,

P{N=k} = (λt)k/k!

k=m+1(λt)k/k!, k>m

step2: Generate the values of A1, . . . ,AN, independent uniform(0,t)random variables.

step3. Generate the values of S1, . . . ,SN, independent service time random variables.

step4. Generate the value ofN(t), a Poisson random variable with meanλt.

step5. IfN(t)= jm, use the arrival timesA1, . . . ,Ajalong with their service timesS1, . . . ,Sj to compute the value ofD=Dj.

step6. IfN(t) >m, use the arrival times A1, . . . ,AN along with their service timesS1, . . . ,SN to compute the value ofD=D>m.

Nothing that,

E[D|N,A1, . . . ,AN,S1, . . . ,SN]

=

j

E[D|N,A1, . . . ,AN,S1, . . . ,SN,N(t)= j]

×P{N(t)= j|N,A1, . . . ,AN,S1, . . . ,SN}

=

j

E[D|N,A1, . . . ,AN,S1, . . . ,SN,N(t)= j]P{N(t)= j}

= m

j=0

DjP{N(t)= j} +

j>m

D>mP{N(t)= j}

=E

196 9 Variance Reduction Techniques

we see thatE is the conditional expectation ofDgiven some data. Consequently, the result follows from the conditional variance formula.

Một phần của tài liệu Sheldon m ross (eds ) simulation academic press (2012) (Trang 191 - 195)

Tải bản đầy đủ (PDF)

(315 trang)