11 Estimation of Absolute Performance
Output analysis is the examination of data generated by a simulation. Its purpose is either to predic the performance ofa system or to compare the performance oftwo or more alternative system designs. This chapter deals with estimating absolute performance, by which we mean estimating the value of one or more system performance measures as opposed to the comparison of two or more systems, in other words relative performance.
The need for statistical output analysis is based on the observation that the output data from a simulation exhibits random variability when random-number generators are used to produce the values of the input variables—that is, two different streams or sequences of random numbers wil produce two sets ofoutputs, which (probably) will differ. Ifthe performance ofthe system is measured by a parameter the result ofa set ofsimulation experiments will be an estimator θ ofθ. The precision of the estimator can be measured by the standard error of -or by the width of a confidence interva - -for θ. The purpose of the statistical analysis is either to estimate this standard error or confidence interval or to figure out the number of observations required to achieve a standard error or confidence interval of a given size—or both.
Consider a typical output variable Y, the total cost per week of an inventory system; Y should be treated as a random variable with an unknown distribution. A simulation run of length 1 week provides a single sample observation from the population of all possible observations on Y. By increasing the run length, the sample size can be increased to n observations,, based on a run length of n weeks. However, these observations do not constitute a random sample, in the classic sense, because they are not statistically independent. In this case, the inventory on hand a the end of one week is the beginning inventory on hand for the next week, and so the value of has some influence on the value of . Thus, the sequence of random variables could be autocorrelated (i.e., correlated with itself). This autocorrelation, which is a measure of a lack of statistical independence, means that classic methods of statistics, which assume independence, are not directly applicable to the analysis of these output data. The methods must be properly modified and the simulation experiments properly designed for valid inferences to be made.
In addition to the autocorrelation present in most simulation output data, the specification o the initial conditions of the system at time 0 can pose a problem for the simulation analyst and could influence the output data. By “time we mean whatever point in time the beginning of the simulation run represents. For example, the inventory on hand and the number of backorders at time 0 (Monday morning) would most likely influence the value of , the total cost for week 1. Because of the autocorrelation, these initial conditions would also influence the costs for subsequent weeks. The specified initial conditions, if not chosen well, can have an effect on estimation of the steady-state (long-run) performance of a simulation model. For purposes of statistical analysis, the effect of the initial conditions is that the output observations might not be identically distributed and that the initial observations might not be representative of the steady-state behavior of the system.
Section 1 distinguishes between two types of simulation—transient versus steady state—and defines commonly used measures of system performance for each type of simulation. Section 2 illustrates by example the inherent variability in a stochastic (i.e., probabilistic) discrete-event simulation and thereby demonstrates the need for a statistical analysis of the output. Section 3 covers the statistical estimation of performance measures. Section 4 discusses the analysis of terminating simulations, and Section 5 the analysis of steady-state simulations. To support the calculations in this chapter a spreadsheet called SimulationTools.xls is provided at www.bcnn.net. SimulationTools.xls is a menu-driven application that allows the user to paste in their own data—generated by any simulation application—and perform statistical analyses on it. A detailed user guide is also available on the book web site, and SimulationTools.xls has integrated help.
1 Types of Simulations with Respect to Output Analysis
In analyzing simulation output data, a distinction is made between terminating or transient simulations and steady-state simulations.
A terminating simulation is one that runs for some duration of time , where E is a specified event (or set of events) that stops the simulation. Such a simulated system opens at time 0 under well-specified initial conditions and closes at the stopping time . The next four examples are terminating simulations.
Example 1
The Shady Grove Bank opens at 8:30 A.M. (time 0) with no customers present and 8 of the 11 tellers working (initial conditions) and closes at 4:30 P.M. (time minutes). Here, the event E is merely the fact that the bank has been open for 480 minutes. The simulation analyst is interested in modeling the interaction between customers and tellers over the entire day, including the effect of starting up and closing down at the end of the day.
Example 2
Consider the Shady Grove Bank of Example 1, but restricted to the period from 11:30 A.M. (time 0) to 1:30 P.M., when it is especially busy. The simulation run length is minutes. The initial conditions at time 0 (11:30 A.M.) could be specified in essentially two ways: (a) the real system could be observed at 11:30 on a number of different days and a distribution of number of customers in system (at 11:30 A.M.) could be estimated, then these data could be used to load the simulation model with customers at time 0; or (b) the model could be simulated from 8:30 A.M. to 11:30 A.M. without collecting output statistics, and the ending conditions at 11:30 A.M. used as initial conditions for the 11:30 A.M. to 1:30 P.M. simulation.
Example 3
A communications system consists of several components plus several backup components. It is represented schematically in Figure 1. Consider the system over a period of time , until the system fails. The stopping event E is defined by fails, or D fails, or (B and C both fail) . Initia conditions are that all components are new at time 0.
Figure 1 Example of a communications system.
Notice that, in the bank model of Example 1, the stopping time minutes is known, but in Example 3, the stopping time is generally unpredictable in advance; in fact, is probably the output variable of interest, as it represents the total time until the system breaks down. One goal o the simulation might be to estimate , the mean time to system failure.
Example 4
A manufacturing process runs continuously from Monday mornings until Saturday mornings. The first shift of each work week is used to load inventory buffers and chemical tanks with the components
and catalysts needed to make the final product. These components and catalysts are made continually throughout the week, except for the last shift Friday night, which is used for cleanup and maintenance. Thus, most inventory buffers are near empty at the end of the week. During the first shift on Monday, a buffer stock is built up to cover the eventuality of breakdown in some part of the process. It is desired to simulate this system during the first shift (time 0 to time hours) to study various scheduling policies for loading inventory buffers.
In the simulating of a terminating system, the initial conditions of the system at time 0 must be specified, and the stopping time , alternatively, the stopping event E—must be well defined. Although it is certainly true that the Shady Grove Bank in Example 1 will open again the next day, the simulation analyst has chosen to consider it a terminating system because the object of interest is one day’s operation, including start up and close down. On the other hand, if the simulation analys were interested in some other aspect of the bank’s operations, such as the flow of money or operation of automated teller machines, then the system might be considered as a nonterminating one. Similar comments apply to the communications system of Example 3. If the failed component were replaced and the system continued to operate, and, most important, if the simulation analyst were interested in studying its long-run behavior, it might be considered as a nonterminating system. In Example 3, however, interest is in its short-run behavior, from time 0 until the first system failure at time Therefore whether a simulation is considered to be terminating depends on both the obiectives of the simulation study and the nature of the system.
Example 4 is a terminating system, too. It is also an example of a transient (or nonstationary) simulation: the variables of interest are the in-process inventory levels, which are increasing from zero or near zero (at time 0) to full or near full (at time 8 hours).
A nonterminating system is a system that runs continuously, or at least over a very long period of time. Examples include assembly lines that shut down infrequently, continuous production systems of many different types, telephone and other communications systems such as the Internet, hospita emergency rooms, police dispatching and patrolling operations, fire departments, and continuously operating computer networks.
A simulation of a nonterminating system starts at simulation time 0 under initial conditions defined by the analyst and runs for some analyst-specified period of time . (Significant problems arise concerning the specification of these initial and stopping conditions, problems that we discuss later.) Usually, the analyst wants to study steady-state, or long-run, properties of the system—tha is, properties that are not influenced by the initial conditions of the model at time 0. A steadystate simulation is a simulation whose objective is to study long-run, or steady-state, behavior of a nonterminating system.
The next two examples are steady-state simulations.
Example 5
Consider the manufacturing process ofExample 4, beginning with the second shift, when the complete production process is under way. It is desired to estimate long-run production levels and production efficiencies. For the relatively long period of 13 shifts, this may be considered as a steady-state simulation. To obtain sufficiently precise estimates of production efficiency and other response variables, the analyst could decide to simulate for any length of time,(even longer than 13 shifts). That is, is not determined by the nature of the problem (as it was in terminating simulations); rather, it is set by the analyst as one parameter in the design of the simulation experiment.
Example 6
HAL Inc., a large web-based order-processing company, has many customers worldwide. Thus, its large computer system with many servers, workstations, and peripherals runs continuously, 24 hours per day. To handle an increased work load, HAL is considering additional CPUs, memory, and storage devices in various configurations. Although the load on HAL’s computers varies throughou the day, management wants the system to be able to accommodate sustained periods of peak load. Furthermore, the time frame in which HAL’s business will change in any substantial way is unknown, so there is no fixed planning horizon. Thus, a steady-state simulation at peak-load conditions is appropriate. HAL systems staff develops a simulation model of the existing system with the current peak work load and then explores several possibilities for expanding capacity. HAL is interested in long-run average throughput and utilization of each computer. The stopping time is determined not by the nature of the problem, but rather by the simulation analyst, either arbitrarily or with a certain statistical precision in mind.
2 Stochastic Nature of Output Data
Consider one run of a simulation model over a period of time [0,. Since the model is an inputoutput transformation, and since some of the model input variables are random variables, it follows that the model output variables are random variables. Two examples are now given to illustrate the nature of the output data from stochastic simulations and to give a preliminary discussion of severa important properties of these data. Do not be concerned if some of these properties and the associated terminology are not entirely clear on a first reading. They will be explained carefully later in the chapter.
Example 7: Software Made Personal
Software Made Personal (SMP) customizes software products for clients in two areas: financia tracking and contact management. They have a customer support call center that handles questions for owners of their software from 8 A.M. to 4 P.M. Eastern Time. When a customer calls they use an automated system to select among the two product lines. Each product line has its own operators, and if an appropriate operator is available then the call is immediately routed to the operator; otherwise, the caller is placed in a hold queue. SMP is hoping to reduce the total number of operators they need by cross-training them so that they can answer calls for any product line. This is expected to increase the time to process a call by about 10%. Before considering reducing operators, however, SMP wants to know what their quality of service would be if they simply cross-train the operators they currently have. Using historical data, incoming calls have been modeled as a nonstationary Poisson arriva process and distributions have been fit for operator time to answer questions. Their quality of service measures are caller response time (time from initiating a call until speaking to an operator) and the number of callers on hold. Response-time differences of more than 30 seconds matter.
This is clearly a terminating simulation experiment with time 0 corresponding to 8 A.M. and corresponding to 4 P.M. (another way to terminate the simulation is when the last call that arrives before 4 P.M. is terminated, in which case is a random value). Table 1 shows the results from 4 replications of the SMP simulation; each row presents the average number of minutes callers spen on hold, and the average number of callers on hold, during the course of a simulated 8-hour day.
Table 1 Results of Four Independent Replications of the SMP Call Center
| Replication,r | Average Waiting Time,(minutes) | Average on Hold,(people) |
|---|---|---|
| 1 | 0.88 | 0.68 |
| 2 | 5.04 | 4.18 |
| 3 | 4.13 | 3.26 |
| 4 | 0.52 | 0.34 |
The table illustrates that there is significant variation in these averages from day to day, implying that a substantial number of replications may be required to precisely estimate, say, the mean values and . Even with a large number of replications there will still be some - -estimation error, which is why we want to report not just a single value (the point estimate), but also a measure of its error in the form of a confidence interval or standard error.
These questions are addressed in Section 4 for terminating simulations such as Example 7. Classic methods of statistics may be used because , and constitute a random sample—that is, they are independent and identically distributed. In addition, is the parameter being estimated, so each is an unbiased estimate of the true mean waiting time The analysis of Example 7 is considered in Example 10 of Section 4. A survey of statistical methods applicable to terminating simulations is given by Law [1980]. Additional guidance may be found in Alexopoulos and Seila [1998], Kleijnen [1987], Law [2007], and Nelson [2001].
The next example illustrates the effects of correlation and initial conditions on the estimation o long-run mean measures of performance of a system.
Example 8
Semiconductor wafer fabrication is an amazingly expensive process involving hundreds of millions of dollars in processing equipment, material handling, and human resources. FastChip, Inc. wants to use simulation to design a new “fab” by evaluating the steady-state mean cycle time (time from wafer release to completion) that they can expect under a particular loading of two distinct products, called C-chip and D-chip. The process of wafer fabrication consists of two basic steps, diffusion and lithography, each of which contains many substeps, and the fabrication process requires multiple passes through these steps. Product will be released in cassettes at the rate of 1 cassette/hour, 7 days a week, 24-hours a day, to achieve a desired throughput of 1 cassette/hour. The hope is that the curren design will achieve long-run average cycle times of less than 45 hours for the C-chip and 30 hours for the D-chip.
Figure 2 shows the first 30 Chip-C cycle times from one run of the simulation model of the fab. The goal is to estimate the long-run average cycle time as, conceptually, the number of cassettes produced goes to infinity. Notice that the first few cycle times seem lower than the ones that follow; this occurs because the simulation was started with the fab “empty and idle,” which is not representative of long-run or steady-state conditions. Also notice that when there is a low cycle time (say, around 40 hours), it tends to be followed by several additional low cycle times. Thus, the cycle time of successive cassettes may be correlated. These features suggest that the cycle-time data are not a random sample, so classic statistical methods may not apply. The analysis of Example 8 is considered in Section 5.
Figure 2 First 30 Chip-C cycle times from one simulation run.
3 Absolute Measures of Performance and Their Estimation
Consider the estimation of a performance parameter θ (or φ) of a simulated system. It is desired to have a point estimate and an interval estimate of θ (or φ). The length of the interval estimate is a measure of the error in the point estimate. The simulation output data are of the form for estimating we refer to such output data as discrete-time data, because the index n is discrete valued. The simulation output data are of the form for estimating φ; we refer to such output data as continuous-time data, because the index t is continuous valued. For example, might be the delay of customer i, or the total cost in week might be the queue length at time t, or the number of backlogged orders at time t. The parameter is an ordinary mean; will be referred to as a time-weighted mean. Whether we call the performance parameter or does not really matter; we use two different symbols here simply to provide a distinction between ordinary means and time-weighted means. To make the discussions more concrete, we consider output measures of queueing systems.
3.1 Point Estimation
The point estimator of θ, based on the data , is defined by
where is a sample mean based on a sample of size n. Computer simulation languages may refer to -this as a “discrete-time,” “collect,” “tally,” or “observational” statistic.
The point estimator θ is said to be unbiased for θ if its expected value is that if
In general, however,
and is called the bias in the point estimator It is desirable to have estimators that are -unbiased,-if this is not possible, to have a small bias relative to the magnitude of θ. Examples of estimators of the form of Equation (1) include and of equations and as , in which case is the time spent in the (sub)system by customer i. The point estimator of based on the data , where is the simulation run length, is defined by
and is called a time average of over . Simulation languages may refer to this as a “continuous-time,” “discrete-change,” or “time-persistent” statistic. In general,
and is said to be biased for φ. Again, we would like to obtain unbiased or low-bias estimators. -Examples of time averages include and of Equations as and as and of Equation (11.4)
Generally, θ and φ are regarded as mean measures of performance of the system being simulated. Other measures usually can be put into this common framework. For example, consider estimation o the proportion of days on which sales are lost through an out-of-stock situation. In the simulation, le
With n equal to the total number of days , as defined by Equation (1), is a point estimator of , the -proportion of out-of-stock days. For a second example, consider estimation of the proportion of time queue length is greater than 10 customers. If represents simulated queue length at time then (in the simulation) define
Then as defined by Equation (4), is a point estimator of , the proportion of time that the queue -length is greater than 10 customers. Thus, estimation of proportions or probabilities is a special case of the estimation of means.
A performance measure that does not fit this common framework is a quantile or percentile. Quantiles describe the level of performance that can be delivered with a given probability For instance, suppose that Y represents the delay in queue that a customer experiences in a service system, measured in minutes. Then the quantile of Y is the value θ such that
As a percentage, is the 100pth or 85th percentile of customer delay. Therefore, 85% of all customers will experience a delay of θ minutes or less. Stated differently, a customer has only a 0.15 probabilit of experiencing a delay of longer than θ minutes. A widely used performance measure is the median, which is the 0.5 quantile or 50th percentile.
The problem of estimating a quantile is the inverse of the problem of estimating a proportion or probability. In estimating a proportion, is given and the probability is to be estimated; however, in estimating a quantile, is given and θ is to be estimated.
The most intuitive method for estimating a quantile is to form a histogram of the observed values of Y, then find a value such that 100p% of the histogram is to the left of (smaller than) For instance, if we observe customer delays -, then an estimate of the 85th percentile of delay is a value such that of the observed values are less than or equal to -An obvious estimate is, therefore, to set equal to the 213th smallest value -in the sample (this requires sorting the data). When the output is a continuous-time process, such as the queue-length process , then a histogram gives the fraction of time tha the process spent at each possible level (queue length, in this example). However, the method for quantile estimation remains the same: Find a value such that 100p% of the histogram is to the left of .
3.2 Confidence-Interval Estimation
To understand confidence intervals fully, it is important to understand the difference between a measure of error and a measure of risk. One way to make the difference clear is to contrast a confidence interval with a prediction interval (which is another useful output-analysis tool).
Both confidence intervals and prediction intervals are based on the premise that the data being produced by the simulation is represented well by a probability model. Suppose that model is the normal distribution with mean θ and variance , both unknown. To make the example concrete, let be the average cycle time for parts produced on the ith replication (representing a day of production) of the simulation. Therefore, is the mathematical expectation of , and σ is represents the day-to-day variation of the average cycle time.
Suppose our goal is to estimate θ. If we are planning to be in business for a long time, producing parts day after day, then is a relevant parameter, because it is the long-run mean daily cycle time. Our average cycle time will vary from day to day, but over the long run the average of the averages will be close to θ.
The natural estimator for is the overall sample mean of n independent replications,. But is not θ, it is an estimate, based on a sample, and it has error. A confidence interva is a measure of that error. Let
be the sample variance across the R replications. The usual confidence interval, which assumes the are normally distributed, is
where is the quantile of the t distribution with degrees of freedom that cuts off the area of each tail. (See Table A.5 in the Appendix). We cannot know for certain exactly how far is from but the confidence interval attempts to bound that error. Unfortunately, the confidence interval itself may be wrong. A confidence level, such as 95%, tells us how much we can trust the interval to actually bound the error between Y¯ and θ. The more replications we make, the less error there is in and our confidence interval reflects that because will tend to get smaller as n increases, converging to 0 as n goes to infinity.
Now suppose we need to make a promise about what the average cycle time will be on a particular day. A good guess is our estimator , but it is unlikely to be exactly right. Even θ itself, which is the center of the distribution, is not likely to be the actual average cycle time on any particular day, because the daily average cycle time varies. A prediction interval, on the other hand, is designed to be wide enough to contain the actual average cycle time on any particular day, with high probability.
The normal-theory prediction interval is
The length of this interval will not go to 0 as n increases. In fact, in the limit it becomes
to reflect the fact that, no matter how much we simulate, our daily average cycle time still varies.
In summary, a prediction interval is a measure of risk, and a confidence interval is a measure of error. We can simulate away error by making more and more replications, but we can never simulate away risk, which is an inherent part of the system. We can, however, do a better job of evaluating risk by making more replications.
Example 9
Suppose that the overall average of the average cycle time on 120 replications of a manufacturing simulation is 5.80 hours, with a sample standard deviation of 1.60 hours. Since , a 95% confidence interval for the long-run expected daily average cycle time is or hours. Thus, our best guess of the long-run average of the daily average cycle times is 5.80 hours, but there could be as much as 0.29 hours error in this estimate.
On any particular day, we are 95% confident that the average cycle time for all parts produced on that day will be
or hours. The 3.18 hours reflects the inherent variability in the daily average cycle times and the fact that we want to be 95% confident of covering the actual average cycle time on a particular day, rather than simply covering the long-run average.
A caution: In neither case (prediction interval or confidence interval) can we make statements about the cycle time for individual products because we observed the daily average. To make valid statements about the cycle times of individual products, the analysis must be based on individua cycle times.
4 Output Analysis for Terminating Simulations
Consider a terminating simulation that runs over a simulated time interval and results in observations . The sample size n may be a fixed number, or it may be a random variable (say, the number of observations that occur during time . A common goal in simulation is to estimate
When the output data are of the form , the goal is to estimate
The method used in each case is the method of independent replications. The simulation is repeated a total of R times, each run using a different random number stream and independently chosen initia conditions (which includes the case that all runs have identical initial conditions). We now address this problem.
4.1 Statistical Background
Perhaps the most confusing aspect of simulation output analysis is distinguishing within-replication data from across-replication data, and understanding the properties and uses of each. The issue can be further confused by the fact that simulation languages often provide only summary measures, like sample means, sample variances, and confidence intervals, rather than all of the raw data. Sometimes these summary measures are all that the simulation language provides, without a lot of extra work.
To illustrate the key ideas, think in terms of the simulation of a manufacturing system and two performance measures of that system, the cycle time for parts (time from release into the factory until completion) and the work in process (WIP, the total number of parts in the factory at any time). In computer applications, these two measures could correspond to the response time and the length of the task queue at the CPU; in a service application, they could be the time to fulfill a customer’s request and the number of requests on the “to do” list; in a supply-chain application, they could be the order fill time and the inventory level. Similar measures appear in many systems.
Here is the usual set up for something like cycle time: Let be the cycle time for the jth part produced in the ith replication. If each replication represents two shifts of production, then the number of parts produced in each replication might differ. Table 2 shows, symbolically, the results of R replications.
Table 2 Within and Across-Replication Cycle-Time Data
| Within-Rep Data | Across-Rep Data | |||
|---|---|---|---|---|
The across-replication data are formed by summarizing within-replication data:^1 is the sample mean of the cycle times from the ith replication, is the sample variance of the same data, and
is a confidence-interval half-width based on this dataset.
From the across-replication data, we compute overall statistics, the average of the daily cycle time averages
the sample variance of the daily cycle time averages
and finally, the confidence-interval half-width
The quantity is the standard error, which is sometimes interpreted as the average error in as an estimator of θ. Notice that is not the average of the within-replication sample variances ; rather, it is the sample variance of the within-replication averages Table 3 Within and Across-Replication WIP Data
| Within-Rep Data | Across-Rep Data |
|---|---|
Within a replication, work in process is a continuous-time output, denoted . The stopping time for the ith replication could be a random variable, in general; in this example, it is the end of the second shift. Table 3 is an abstract representation of the data produced
The within-replication sample mean and variance are defined appropriately for continuous-time data:
and
A definition for is more problematic, but, to be concrete, take it to be
It is difficult to conceive of a situation in which is relevant, a topic we discuss later. Although the definitions of the within-replication data change for continuous-time data, the across-replication statistics are unchanged, and this is a critical observation.
Here are the key points that must be understood:
The overall sample average and the individual replication sample averages are always unbiased estimators of the expected daily average cycle time or daily average WIP.
Across-replication data are independent, since they are based on different random numbers; are identically distributed, since we are running the same model on each replication; and tend to be normally distributed, if they are averages of within-replication data, as they are here. This implies that the confidence interval is often pretty good.
Within-replication data, on the other hand, might have none of these properties. The individua cycle times may not be identically distributed, if the first few parts of the day find the system empty; they are almost certainly not independent, because one part follows another; and whether they are normally distributed is difficult to know in advance. For this reason, and , which are computed under the assumption of independent and identically distributed data, tend not to be useful, although there are exceptions.
There are situations in which Y¯ and are valid estimators of the expected cycle time for an individual part or the expected WIP at any point in time, rather than the daily average. (See Section 5 on steady-state simulations.) Even when this is the case, the confidence interva is valid, and is not. The difficulty occurs because is a reasonable estimator of the variance of the cycle time, but and are not good estimators of the more on this in Section 5.2.
Example 10: Software Made Personal (cont.)
Consider Example 7, the SMP call center problem, with the data for replications given in Table 1. The four number-on-hold estimates are time averages of the form of Equation (11), where -, the number of customers on hold at time t. Similarly, the four average system times are analogous to of Table 2, where is the actual time spent on hold by - -customer i on replication Suppose that the analyst desires a 95% confidence interval for the mean time spent on hold, Using Equation (8), compute an overall point estimator
Using Equation (9), compute its estimated variance:
Thus, the standard error of is estimated by . Obtain - -3.18 from Table A.5, and compute the 95% confidence interval half-width by Equation (10) as
giving minutes with 95% confidence. Clearly 4 replications are far too few to make any sort of useful estimate of , since a negative mean waiting time is impossible. Later in the chapter we return to this problem and determine how many replications are required to get a meaningfu estimate.
4.2 Confidence Intervals with Specified Precision
By Expression (10), the half-length H of a confidence interval for a mean θ, based on the t distribution, is given by
where is the sample variance and R is the number of replications. In simulation we seldom need to select R and just accept the confidence interval half-length that results. Instead, we can drive the number of replications to be large enough so that H is small enough to facilitate the decision that the simulation is supposed to support. The acceptable size of H depends on the problem at hand: i might be $5000 in a financial simulation, 6 minutes for product cycle time, or 1 customer on hold in a call center.
Suppose that an error criterion of is specified; in other words, it is desired to estimate θ by to within with high probability—say, at least 1 α. Thus, it is desired that a sufficiently large sample size R be taken to satisfy
When the sample size R is fixed, no guarantee can be given for the resulting error. But if the sample size can be increased, an error criterion (such as , 6 minutes, or 1 customer) can be specified.
Assume that an initial sample of size replications has been observed—that is, the simulation analyst initially makes independent replications. We must have , with 10 or more being desirable. The replications will be used to obtain an initial estimate of the population variance . To meet the half-length criterion, a sample size R must be chosen such that and
Solving for R in Inequality (14) shows that R is the smallest integer satisfying and
An initial estimate for R is given by
where is the percentage point of the standard normal distribution from Table A.3 in the Appendix. And since for large R, say,, the second inequality for R is adequate when R is large. After determining the final sample size R, collect additional observations (i.e., make additional replications, or start over and make R total replications) and form the 100(1 α)% confidence interval for θ by
where and are computed on the basis of all R replications, by Equation (8), and by Equation (9). The half-length of the confidence interval given by Inequality (17) should be approximately or smaller; however, with the additional observations, the variance estimator could differ somewhat from the initial estimate possibly causing the half-length to be greater than desired. If the confidence interval from Inequality (17) is too large, the procedure may be repeated, using Inequality (15), to determine an even larger sample size.
Example 11
Suppose that it is desired to estimate the mean waiting time in SMP’s hold queue in Example 7 to within 0.5 minutes with 95% confidence. We will illustrate this calculation using the “Get Sample utility of SimulationTools.xls. The input dialog box is shown in Figure 3 and the results are displayed in Figure 4. Notice that “Absolute Precision” means that we directly specify the half width of the confidence interval ( 0.5 minutes in this case); “Relative Precision” specifies the length of the half width as a fraction of the mean.
An initial sample of size is taken, and the program determines that is the smallest integer satisfying Inequality (16). Therefore, additional replications are needed. After obtaining the additional outputs, we would again need to compute the half-width H to ensure that it is as small as is desired. In this case the result—which can also be found at www.bcnn.net—was minutes
Figure 3 Input Dialog for the ‘‘Get Sample Size’’ utility of SimulationTools.xls
| Get Sample Size | Completed | Data Column | Minimum Sample Size | ||||
|---|---|---|---|---|---|---|---|
| 1 | 0.880897931 | 175 | |||||
| Number of Observations | 20 | 2 | 5.04340304 | ||||
| Alpha | 0.05 | 3 | 4.132638545 | ||||
| Precision Type | 1 | 4 | 0.517418075 | ||||
| Precision Value | 0.5 | 5 | 2.584490259 | ||||
| 6 | 0.860547939 | ||||||
| 7 | 1.544612493 | ||||||
| 8 | 1.762676832 | ||||||
| 9 | 6.925242515 | ||||||
| 10 | 2.201491896 | ||||||
| 11 | 2.915438392 | ||||||
| 12 | 0.486246064 | ||||||
| 13 | 1.792947434 | ||||||
| 14 | 1.244455641 | ||||||
| 15 | 4.278579049 | ||||||
| 16 | 13.91696167 | ||||||
| 17 | 0.235565331 | ||||||
| 18 | 0.685156864 | ||||||
| 19 | 1.577792626 | ||||||
| 20 | 1.070626537 |
Figure 4 Sample Size Calculation using ‘‘Get Sample Size’’ in SimulationTools.xl
4.3 Quantiles
To present the interval estimator for quantiles, it is helpful to review the interval estimator for a mean in the special case when the mean represents a proportion or probability In this book, we have chosen to treat a proportion or probability as just a special case of a mean. However, in many statistics texts, probabilities are treated separately.
When the number of independent replications is large enough that the confidence interval for a probability is often written as
where is the sample proportion (algebra shows that this formula for the half-width is precisely -equivalent to Equation (10) when used in estimating a proportion).
As mentioned in Section 3, the quantile-estimation problem is the inverse of the probabilityestimation problem: Find θ such that . Thus, to estimate the quantile, we find tha value such that 100p% of the data in a histogram of Y is to the left of , or, stated differently, the -npth smallest value of Extending this idea, an approximate confidence interval for can be obtained by finding two values: that cuts off % of the histogram and that cuts off of the
histogram, where
(Recall that we know In terms of sorted values, is the smallest value (rounded down) and is the smallest value (rounded up), of
Example 12
Suppose that we want to estimate the 0.75 quantile of average daily waiting time in the hold queue for SMP and form a 95% confidence interval for it, based on replications. The data may be found in the spreadsheet Quantile.xls at www.bcnn.net. The point estimator is minutes, because that is the -smallest value of the sorted data. The interpretation is that, over the long run, on 75% of the days the average time customers spend on hold will be less than or equal to 3.39 minutes.
To obtain the confidence interval, we first compute
The lower bound ofthe confidence interval is minutes (the 10th smallest value, -rounding down); the upper bound of the confidence interval is .98 minutes (the -240th smallest value, rounding up). Thus, with 95% confidence, the point estimate of 3.39 minutes is no more than max minutes off the true 0.75 quantile.
It is important to understand the 3.39 minutes is an estimate of the 0.75 quantile (75th percentile) of daily average customer delay, not an individual customer’s delay. Because the call center starts the day empty and idle, and the customer load on the system varies throughout the day, the 0.75 quantile of individual customer waiting time varies throughout the day and cannot be given by a single number.
4.4 Estimating Probabilities and Quantiles from Summary Data
Knowing the equation for the confidence interval half-width is important if all that the simulation software provides is Y¯ and H and you need to work out the number of replications required to get a prespecified precision, or if you need to estimate a probability or quantile. You know the number of replications, so the sample standard deviation can be extracted from H by using the formula
With this information, the method in Section 4.2 can be employed.
The more difficult problem is estimating a probability or quantile from summary data. When al we have available is the sample mean and confidence-interval halfwidth (which gives us the sample standard deviation), then one approach is to use a normal-theory approximation for the probabilities or quantiles we desire, specifically
and
The following example illustrates how this is done.
Example 13
From 25 replications of a manufacturing simulation, a 90% confidence interval for the daily average WIP is 218 32. What is the probability that the daily average WIP is less than 350? What is the 85th percentile of daily average WIP?
First, we extract the standard deviation:
Then, we use the normal approximations and Table A.3 to get
and
There are shortcomings to obtaining our probabilities and quantiles this way. The approximation depends heavily on whether the output variable of interest is normally distributed. If the outpu variable itself is not an average, then this approximation is suspect. Therefore, we expect the approximation to work well for statements about the average daily cycle time, for instance, but very poorly for the cycle time of an individual part.
5 Output Analysis for Steady-State Simulations
Consider a single run of a simulation model whose purpose is to estimate a steady-state, or long-run, characteristic of the system. Suppose that the single run produces observations , which, generally, are samples of an autocorrelated time series. The steady-state (or long-run) measure o performance, θ, is defined by
with probability 1, where the value of θ is independent of the initial conditions. (The phrase “with probability means that essentially all simulations of the model, using different random numbers, will produce a series . whose sample average converges to θ.) For example, if was the time customer i spent talking to an operator, then θ would be the long-run average time a customer spends talking to an operator; and, because θ is defined as a limit, it is independent of the call center’s conditions at time 0. Similarly, the steady-state performance for a continuous-time output measure , such as the number of customers in the call center’s hold queue, is defined as
with probability 1.
Of course, the simulation analyst could decide to stop the simulation after some number of observations, say, n, have been collected; or the simulation analyst could decide to simulate for some length of time that determines n (although n may vary from run to run). The sample size n (or is a design choice; it is not inherently determined by the nature of the problem. The simulation analyst will choose simulation run length (n or with several considerations in mind:
Any bias in the point estimator that is due to artificial or arbitrary initial conditions. (The bias can be severe if run length is too short, but generally it decreases as run length increases.)
The desired precision of the point estimator, as measured by the standard error or confidence interval half-width.
Budget constraints on the time available to execute the simulation.
The next subsection discusses initialization bias and the following subsections outline two methods of estimating point-estimator variability. For clarity of presentation, we discuss only estimation of θ from a discrete-time output process. Thus, when discussing one replication (or run), the notation
will be used; if several replications have been made, the output data for replication r will be denoted by
5.1 Initialization Bias in Steady-State Simulations
There are several methods of reducing the point-estimator bias caused by using artificial and unrealistic initial conditions in a steady-state simulation. The first method is to initialize the simulation in a state that is more representative of long-run conditions. This method is sometimes called intelligent initialization. Examples include
setting the inventory levels, number of backorders, and number of items on order and their arrival dates in an inventory simulation;
placing customers in queue and in service in a queueing simulation;
having some components fail or degrade in a reliability simulation.
There are at least two ways to specify the initial conditions intelligently. If the system exists, collect data on it and use these data to specify more nearly typical initial conditions. This method sometimes requires a large data-collection effort. In addition, if the system being modeled does no exist—for example, if it is a variant of an existing system—this method is impossible to implement. Nevertheless, it is recommended that simulation analysts use any available data on existing systems to help initialize the simulation, as this will usually be better than assuming the system to be “completely stocked,” “empty and idle,” or “brand new” at time 0.
A related idea is to obtain initial conditions from a second model of the system that has been simplified enough to make it mathematically solvable. The queueing models are very useful for this purpose. The simplified model can be solved to find long-run expected or most likely conditions— such as the expected number of customers in the queue—and these conditions can be used to initialize the simulation.
A second method to reduce the impact of initial conditions, possibly used in conjunction with the first, is to divide each simulation run into two phases: first, an initialization phase, from time 0 to time followed by a data-collection phase from time to the stopping time that is, the simulation begins at time 0 under specified initial conditions and runs for a specified period of time . Data collection on the response variables of interest does not begin until time and continues until time . The choice of is quite important, because the system state at time denoted by should be more nearly representative of steady-state behavior than are the origina initial conditions at time 0. In addition, the length of the data-collection phase should be long enough to guarantee sufficiently precise estimates of steady-state behavior. Notice that the system state I at time is a random variable and to say that the system has reached an approximate steady state is to say that the probability distribution of the system state at time is sufficiently close to the steady-state probability distribution as to make the bias in point estimates of response variables negligible. Figure 5 illustrates the two phases of a steady-state simulation. The effect of starting a simulation run of a queueing system in the empty and idle state, as well as a useful plot to aid the simulation analyst in choosing an appropriate value for , are given in the following example.
Figure 5 Initialization and data collection phases of a steady-state simulation run.
Consider the FastChip wafer fabrication problem discussed in Example 8. Suppose that a total of R 10 independent replications were made, each run long enough so that 250 cycle times were collected for each of Chip-C and Chip-D. We will focus on Chip-C.
Normally we average all data within each replication to obtain a replication average. However, our goal at this stage is to identify the trend in the data due to initialization bias and find out when i dissipates. To do this, we will average corresponding cycle times across replications and plot them (this idea is usually attributed to Welch [1983]). Such averages are known as ensemble averages. Specifically, let be the 250 Chip-C cycle times, in order of completion, from replication r. For the jth cycle time, define the ensemble average across all R replications to be
(R 10 here). The ensemble averages are plotted as the solid line in Figure 6 (the dashed lines will be discussed below). This plot was produced by the SimulationTools.xls spreadsheet, and we will refer to it as a mean plot.
Notice the gradual upward tread at the beginning. The simulation analyst may suspect that this is due to the downward bias in these estimators, which in turn is due to the fab being empty and idle at time 0. As time becomes larger (so the number of cycle times recorded increases), the effect of the initial conditions on later observations lessens and the observations appear to vary around a common mean. When the simulation analyst feels that this point has been reached, then the data-collection phase begins. Here approximately 120 Chip-C cycle times might be adequate.
Although we have determined a deletion amount of 120 cycle times, the initialization phase is almost always specified in terms of simulation time because we need to consider the initialization phase for each performance measure, and they may differ. In the FastChip example we would also
Figure 6 Mean Plot Across 10 Replications of 250 Product C Cycle Times
need to examine the cycle times for Chip-D. If we specified the initialization phase as a count for each output, then we would have to track these counts. When the initialization phase is specified by time, on the other hand, then a single event can be scheduled at time , and data only retained beyond that point.
To specify by time we have to convert the appropriate counts into approximate times and use the largest of these. For instance, for the FastChip simulation 120 Chip-C cycle times corresponds to approximately 200 hours of simulation time, since cassettes are released at 1 per hour and 60% o the releases are Chip-C: 120 cycle times/0.6 releases/hour 200 hours (we could also increase this somewhat to account for the time it takes the 120th Chip-C release to traverse the fab). This turns out to be larger than the initialization phase for Chip-D, so we set hours.
Plotting ensemble averages is extra work (although SimulationTools.xls makes it easier), so it might be tempting to take a shortcut. For instance, one might plot the output from only replication 1,, or the cumulative average from a replication 1
for . Figure 7 shows both. Notice that the raw data from a single replication can be too highly variable to detect the trend, while the cumulative plot is clearly biased low because it retains all of the data from the beginning of the run. Thus, these shortcuts should be avoided and the mean plot used instead.
Figure 7 Plot of 250 Product C Cycle Times from 1 Replication, Raw and Cumulative Average
Some additional factors to keep in mind when using the mean plot to determine the initialization phase:
When first starting to examine the initialization phase, a run length and number of replications will have to be guessed. Ensemble averages, such as Figure 6, will reveal a smoother and more precise trend as the number of replications R is increased, and it may have to be increased several times until the trend is clear. It is also possible that the run length guess is not long enough to get past the initialization phase (this would be indicated if the trend in the mean plot does not disappear), so the run length may have to be increased as well.
Ensemble averages can also be smoothed by plotting a moving average rather than the original ensemble averages. In a moving average, each plotted point is actually the average of severa adjacent ensemble averages. Specifically, the jth plot point would be
for some , rather than the original ensemble average . The value of m is typically chosen by trial and error until a smooth plot is obtained. The mean plot in Figure 6 was obtained with 3. Since each ensemble average (or moving average) is the sample mean of i.i.d. observations across R replications, a confidence interval based on the t distribution can be placed around each point, as shown by the dashed lines in Figure and these intervals can be used to judge whether or not the plot is precise enough to decide that bias has diminished. This is the preferred method to determine a deletion point.
- Cumulative averages, such as in Figure 7, become less variable as more data are averaged. Therefore, it is expected that the left side of the curve will always be less smooth than the righ side. Remember that cumulative averages tend to converge more slowly to long-run performance than do ensemble averages, because cumulative averages contain all observations, including the most biased ones from the beginning of the run. For this reason, cumulative averages should be used only if it is not feasible to compute ensemble averages, such as when only a single replication is possible.
There has been no shortage of solutions to the initialization-bias problem. Unfortunately, for every “solution” that works well in some situations, there are other situations in which either it is not applicable or it performs poorly. Important ideas include testing for bias (e.g., Kelton and Law [1983], Schruben [1980], Goldsman, Schruben, and Swain [1994]); modeling the bias (e.g., Snel and Schruben [1985]); and randomly sampling the initial conditions on multiple replications (e.g., Kelton [1989]).
5.2 Error Estimation for Steady-State Simulation
If are not statistically independent, then , given by Equation , is a biased estimator of the true variance . This is almost always the case when is a sequence of output observations from within a single replication. In this situation,. is an autocorrelated sequence, sometimes called a time series.
Suppose that our point estimator for θ is the sample mean general result^2 from mathematical statistics is that the variance of is
where cov . To construct a confidence interval for θ, an estimate of is required. But obtaining an estimate of Equation (22) is futile, because each term cov could be different, in general. Fortunately, systems that have a steady state will, if simulated long enough to pass the transient phase, produce an output process that is approximately covariance stationary. Intuitively, stationarity implies that depends on in the same manner as depends on . In particular, the covariance between two random variables in the time series depends only on the number o observations between them, called the For a covariance-stationary time series,, define the lag-k autocovariance by
which, by definition of covariance stationarity, is not a function of i. For , γ becomes the population variance that is,
The lag-k autocorrelation is the correlation between any two observations k apart. It is defined by
and has the property that
$$
- 1 \leq \rho_{k} \leq 1, \quad k = 1, 2, \dots $$
If a time series is covariance stationary, then Equation (22) can be simplified substantially. Algebra shows that
where is the lag-k autocorrelation given by Equation (25).
When for all k (or most k), the time series is said to be positively autocorrelated. In this case, large observations tend to be followed by large observations, small observations by smal ones. Such a series will tend to drift slowly above and then below its mean. Figure 8(a) is an example of a stationary time series exhibiting positive autocorrelation. The output data from most queueing simulations are positively autocorrelated.
(a)
(b)
(c)
Figure 8 (a) Stationary time series exhibiting positive autocorrelation; (b) stationary time series exhibiting negative autocorrelation; (c) nonstationary time series with an upward trend.
On the other hand, if some of the the series . will display the characteristics of negative autocorrelation. In this case, large observations tend to be followed by small observations, and vice versa. Figure 8(b) is an example of a stationary time series exhibiting negative autocorrelation. The output of certain inventory simulations might be negatively autocorrelated.
Figure 8(c) also shows an example of a time series with an upward trend. Such a time series is not stationary; the probability distribution of is changing with the index i.
Why does autocorrelation make it difficult to estimate Recall that the standard estimator for the variance of a sample mean is . By using Equation (26), it can be shown [Law, 1977] that the expected value of the variance estimator is
where
and c is the quantity in brackets in Equation (26). The effect of the autocorrelation on the estimator is derived by an examination of Equations (26) and (28). There are essentially three possibilities:
Case 1
If the are independent, then for . Therefore, and Equation (26) reduces to the familiar . Notice also that , so is an unbiased estimator of V(Y¯ ). The will always be independent when they are obtained from differen replications; that independence is the primary reason that we prefer experiment designs calling for multiple replications.
Case 2
If the autocorrelations are primarily positive, then , so that , and hence . Therefore, is biased low as an estimator of . If this correlation were ignored, the nominal confidence interval given by Expression (10) would be too short, and its true confidence coefficient would be less than . The practical effect would be that the simulation analyst would have unjustified confidence in the apparent precision of the poin estimator due to the shortness of the confidence interval. If the correlations are large, B could be quite small, implying a significant underestimation.
Case 3
If the autocorrelations are substantially negative, then , and it follows that and is biased high for . In other words, the true precision of the point estimator would be greater than what is indicated by its variance estimator , because
As a result, the nominal confidence interval of Expression (10) would have true confidence coefficient greater than . This error is less serious than Case 2, because we are unlikely to make incorrect decisions if our estimate is actually more precise than we think it is.
A simple example demonstrates why we are especially concerned about positive correlation: Suppose you want to know how students on a university campus will vote in an upcoming election. To estimate their preferences, you plan to solicit 100 responses. The standard experiment is to randomly select 100 students to poll; call this experiment A. An alternative is to randomly select 20 students and ask each of them to state their preference 5 times in the same day; call this experiment B. Both experiments obtain 100 responses, but clearly an estimate based on experiment B will be less precise (will have larger variance) than an estimate based on experiment A. Experiment A obtains 100 independent responses, whereas experiment B obtains only 20 independent responses and 80 dependent ones. The five opinions from any one student are perfectly positively correlated (assuming a student names the same candidate all five times). Although this is an extreme example, i illustrates that estimates based on positively correlated data are more variable than estimates based on independent data. Therefore, a confidence interval or other measure of error should account correctly for dependent data, but does not.
Two methods for eliminating or reducing the deleterious effects of autocorrelation upon estimation of a mean are given in the following sections. Unfortunately, some simulation languages either use or facilitate the use of as an estimator of ), the variance of the sample mean, in all situations. If used uncritically in a simulation with positively autocorrelated output data, the downward bias in and the resulting shortness of a confidence interval for θ will convey the impression of much greater precision than actually exists. When such positive autocorrelation is present in the output data, the true variance of the point estimator can be many times greater than is indicated by
5.3 Replication Method for Steady-State Simulations
If initialization bias in the point estimator has been reduced to a negligible level (through some combination of intelligent initialization and deletion), then the method of independent replications can be used to estimate point-estimator variability and to construct a confidence interval. The basic idea is simple: Make R replications, initializing and deleting from each one the same way.
If, however, significant bias remains in the point estimator and a large number of replications are used to reduce point-estimator variability, the resulting confidence interval can be misleading. This happens because bias is not affected by the number of replications R; it is affected only by deleting more data (i.e., increasing or extending the length of each run (i.e., increasing Thus, increasing the number of replications R could produce shorter confidence intervals around the “wrong point.” Therefore, it is important to do a thorough job of investigating the initial-condition bias.
If the simulation analyst decides to delete d observations of the total of n observations in a replication, then the point estimator of θ is
That is, the point estimator is the average of the remaining data. The basic raw output data are exhibited in Table 4. For instance, could be the delay of customer j in queue, or the response time of job j in a job shop, on replication r. The number d of deleted observations and the total number of observations n might vary from one replication to the next, in which case replace d by and n by . For simplicity, assume that d and n are constant over replications.
Table 4 Raw Output Data from a Steady-State Simulation
| Replication | Observations | Replication Averages | |||||
|---|---|---|---|---|---|---|---|
| 1 | d | n | |||||
| 1 | |||||||
| 2 | |||||||
| . | . | . | . | . | . | ||
| . | . | . | . | . | . | ||
| . | . | . | . | . | . | ||
| R | |||||||
When using the replication method, each replication is regarded as a single sample for the purpose of estimating θ. For replication define
as the sample mean of all (nondeleted) observations in replication r. Because all replications use different random-number streams and all are initialized at time 0 by the same set of initial conditions , the replication averages
are independent and identically distributed random variables; that is, they constitute a random sample from some underlying population having unknown mean
The overall point estimator, given in Equation (29), is also given by
as can be seen from Table 4 or from using Equation (21). Thus, it follows that
also. If d and n are chosen sufficiently large, then , and is an approximately unbiased estimator of θ. The bias in is For convenience, when the value of n and d are understood, abbreviate (the mean of the undeleted observations from the rth replication) and [the mean of by and , respectively. To estimate the standard error of , first compute the sample variance,
The standard error of is given by
A confidence interval for , based on the t distribution, is given by
where is the percentage point of a t distribution with degrees of freedom. This confidence interval is valid only if the bias of is approximately zero.
As a rough rule, the length of each replication, beyond the deletion point, should be at least ten times the amount of data deleted. In other words, should at least 10d (or more generally, should be at least . Given this run length, the number of replications should be as many as time permits, up to about 25 replications. Kelton [1986] established that there is little value in dividing the available time into more than 25 replications, so, if time permits making more than 25 replications of length , then make 25 replications of longer than , instead. Again, these are rough rules that need not be followed slavishly.
In this section we have presented results as if the run length is n observations and d of them are deleted. As discussed earlier, in practice we make a run of length time units and delete the first time units. In this case becomes the number of observations obtained up to time and is the number of observations recorded between times and , both random variables that typically differ from replication to replication. In the following example we will use instead of in the notation to make this point clear.
Example 15
Consider again the FastChip wafer fab simulation of Examples 8 and 14. Suppose that the simulation analyst decides to make replications, each of length hours, deleting the first hours before data collection, begins as determined in Example 14. Remember that the raw output data consist of cycle times for Chip-C cassettes, and the output from each replication is the average of all of the Chip-C cassettes that finish between times hours and hours (approximately cycle times per replication). The purpose of the simulation is to estimate the long-run average cycle time, denoted , and to measure the error of the estimate by a 95% confidence interval.
Table 5 Data Summary for FastChip Simulation by Replication
| Replication r | Sample Mean for Replication r |
|---|---|
| 1 | 46.86 |
| 2 | 46.09 |
| 3 | 47.64 |
| 4 | 47.43 |
| 5 | 46.94 |
| 6 | 46.43 |
| 7 | 47.11 |
| 8 | 46.56 |
| 9 | 46.73 |
| 10 | 46.80 |
| 46.86 | |
| S | 0.46 |
The replication averages , are shown in Table 5. The poin estimator is computed by Equation (32) as
Its standard error is given by Equation (34) as
and using and , the 95% confidence interval for long-run mean queue length is given by Inequality (35) a
or
The simulation analyst may conclude with a high degree of confidence that the long-run mean cycle time for Chip-C is between 46.52 and 47.20 hours. The confidence interval computed here as given by Inequality (35) should be used with caution, because a key assumption behind its validity is tha enough data have been deleted to remove any significant bias due to initial conditions—that is, that and are sufficiently large so that the bias is negligible.
5.4 Sample Size in Steady-State Simulations
Suppose it is desired to estimate a long-run performance measure θ within , with confidence . In a steady-state simulation, a specified precision may be achieved either by increasing the number of replications R or by increasing the run length . The first solution, controlling R, is carried out as given in Section 4.2 for terminating simulations.
Example 16
Consider the data in Table 5 for the FastChip wafer fab simulation as an initial sample of size The initial estimate of standard deviation is hours. Suppose that it is desired to estimate long-run mean cycle time of Chip-C, w, to within 1 hours (6 minutes) with 95% confidence. Using in Inequality (16) yields an initial estimate of
Thus, at least 82 replications will be needed.
An alternative to increasing R is to increase total run length within each replication. If the calculations in Section 4.2, as illustrated in Example 16, indicate tha additional replications are needed beyond the initial number , then an alternative is to increase run length in the same proportion to a new run length . Thus, additional data will be deleted, from time 0 to time , and more data will be used to compute the point estimates, as illustrated by Figure 9. However, the total amount of simulation effort is the same as if we had simply increased the number of replications but maintained the same run length. The advantage of increasing total run length per replication and deleting a fixed proportion of the tota run length is that any residual bias in the point estimator should be further reduced by the additiona deletion of data at the beginning of the run. A possible disadvantage of the method is that, in order to continue the simulation of all R replications [from time to time ], it is
Figure 9 Increasing run length to achieve specified accuracy.
necessary to have saved the state of the model at time and to be able to restart the mode and run it for the additional required time. Otherwise, the simulations would have to be rerun from time 0, which could be time consuming for a complex model. Some simulation languages have the capability to save enough information that a replication can be continued from time onward, rather than having to start over from time 0.
Example 17
In Example suppose that run length was to be increased to achieve the desired error 0.1 hours. Since , the run length should be hours. The data collected from time 0 to time hours would be deleted, and the data from time 1640 to time 18,040 used to compute new point estimates and confidence intervals.
5.5 Batch Means Method for Steady-State Simulations
One disadvantage of the replication method is that data must be deleted on each replication and, in one sense, deleted data are wasted data, or at least lost information. This suggests that there might be merit in using an experiment design that is based on a single, long replication. The disadvantage of a single-replication design arises when we try to compute the standard error of the sample mean. Since we only have data from within one replication, the data are dependent, and the usual estimator is biased.
The method of batch means attempts to solve this problem by dividing the output data from one replication (after appropriate deletion) into a few large batches and then treating the means of these batches as if they were independent. When the raw output data after deletion form a continuous-time process , such as the length of a queue or the level of inventory, then we form k batches of size and compute the batch means as
. In other words, thejth batch mean isjust the time-weighted average of the process over the time interval .
When the raw output data after deletion form a discrete-time process such as the customer delays in a queue or the cost per period of an inventory system, then we form k batches of size and compute the batch means as
for (assuming k divides evenly, otherwise round down to the nearest integer). That is the batch means are formed as shown here
Starting with either continuous-time or discrete-time data, the variance of the sample mean is estimated by
where is the overall sample mean of the data after deletion. The batch means are not independent; however, if the batch size is sufficiently large, successive batch means will be approximately independent, and the variance estimator will be approximately unbiased.
Unfortunately, there is no widely accepted and relatively simple method for choosing an acceptable batch size m (or equivalently, choosing a number of batches . But there are some genera guidelines that can be culled from the research literature:
a. Schmeiser [1982] found that, for a fixed total sample size, there is little benefit from dividing it into more than k 30 batches, even if we could do so and still retain independence between the batch means. Therefore, there is no reason to consider numbers of batches much greater than 30, no matter how much raw data are available. He also found that the performance of the confidence interval, in terms of its width and the variability of its width, is poor for fewer than 10 batches. Therefore, a number of batches between 10 and 30 should be used in mos applications.
b. Although there is typically autocorrelation between batch means at all lags, the lag-1 autocorrelation is usually studied to assess the dependence between batch means. When the lag-1 autocorrelation is nearly 0, then the batch means are treated as independent. This approach is based on the observation that the autocorrelation in many stochastic processes decreases as the lag increases. Therefore, all lag autocorrelations should be smaller, in absolute value, than the lag-1 autocorrelation.
c. The lag-1 autocorrelation between batch means can be estimated (see below). However, the autocorrelation should not be estimated from a small number of batch means (such as the recommended above); there is bias in the autocorrelation estimator. Law and Carson [1979] suggest estimating the lag-1 autocorrelation from a large number of batch means based on a smaller batch size, perhaps . When the autocorrelation between these batch means is approximately 0, then the autocorrelation will be even smaller if we rebatch the data to between 10 and 30 batch means based on a larger batch size. Hypothesis tests for 0 autocorrelation are available, as described next.
d. If the total sample size is to be chosen sequentially, say to attain a specified precision, then it is helpful to allow the batch size and number of batches to grow as the run length increases. I can be shown that a good strategy is to allow the number of batches to increase as the square root of the sample size after first finding a batch size at which the lag-1 autocorrelation is approximately 0. Although we will not discuss this point further, an algorithm based on it can be found in Fishman and Yarberry [1997]; see also Steiger and Wilson [2002] and Lada, Steiger, and Wilson [2006].
Given these insights, we recommend the following general strategy:
Obtain output data from a single replication and delete as appropriate. Recall our guideline: collecting at least 10 times as much data as are deleted.
Form up to batches (but at least 100 batches) with the retained data, and compute the batch means. Estimate the sample lag-1 autocorrelation of the batch means as
- Check the correlation to see whether it is sufficiently small.
(a) If , then rebatch the data into batches, and form a confidence -interval using degrees of freedom for the t distribution and Equation (36) to estimate the variance of .
(b) If , then extend the replication by 50% to 100% and go to Step 2. If it is -not possible to extend the replication, then rebatch the data into approximately batches, and form the confidence interval, using degrees of freedom for the t distribution and Equation (36) to estimate the variance of 4. As an additional check on the confidence interval, examine the batch means (at the larger or smaller batch size) for independence, using the following test. See, for instance, Alexopoulos and Seila [1998]. Compute the test statistic
If then accept the independence of the batch means, where is the Type I error level of the test, such as 0.1, 0.05, 0.01. Otherwise, extend the replication by 50% to 100% and go to Step 2. If it is not possible to extend the replication, then rebatch the data into approximately batches, and form the confidence interval, using degrees of freedom for the t distribution and Equation (36) to estimate the variance of Y.
This procedure, including the final check, is conservative in several respects. First, if the lag-1 autocorrelation is substantially negative then we proceed to form the confidence interval anyway. A dominant negative correlation tends to make the confidence interval wider than necessary, which is an error, but not one that will cause us to make incorrect decisions. The requirement that at -batches is pretty stringent and will tend to force us to get more data (and therefore create larger batches) if there is any hint of positive dependence. And finally, the hypothesis test at the end has a probability of of forcing us to get more data when none are really needed. But this conservatism is by design; the cost of an incorrect decision is typically much greater than the cos of some additional computer run time.
The batch-means approach to confidence-interval estimation is illustrated in the next example.
Example 18
Reconsider the FastChip wafer fab simulation of Example 8. Suppose that we want to estimate the steady-state mean cycle time for Chip-C, w, by a 95% confidence interval. To illustrate the method of batch means, assume that one run of the model has been made, simulating 5000 cycle times after the deletion point. We then form batch means from batches of size and estimate the lag-1 autocorrelation to be . Thus, we decide to extend the simulation to 10,000 customers after the deletion point, and again we estimate the lag-1 autocorrelation. This estimate, based on batches of size , is Having passed the correlation check, we rebatch the data into batches of size The point estimate is the overall mean
The variance of computed from the 40 batch means, is
Thus, a 95% confidence interval is given by
or
Thus, we assert with 95% confidence that true mean cycle time w is between 46.55 and 47.45 hours. If these results are not sufficiently precise, then the run length should be increased to achieve greater precision.
As a further check on the validity of the confidence interval, we can apply the correlation hypothesis test. To do so, we compute the test statistic from the batches of size used to form the confidence interval. This gives
which confirms the lack of correlation at the 0.05 significance level. Notice that, at this small number of batches, the estimated lag-1 autocorrelation appears to be slightly negative, illustrating our poin about the difficulty of estimating correlation with small numbers of observations.
5.6 Steady-State Quantiles
Constructing confidence intervals for quantile estimates in a steady-state simulation can be tricky, especially if the output process of interest is a continuous-time process, such as ), the number of customers in queue at time t. In this section, we outline the main issues.
Taking the easier case first, suppose that the output process from a single replication, after appropriate deletion of initial data, is . To be concrete, might be the delay in queue of the ith customer. Then the point estimate of the pth quantile can be obtained as before, either from the histogram of the data or from the sorted values. Of course, only the data after the deletion point are used. Suppose we make replications and let be the quantile estimate from the rth. Then the R quantile estimates,-, are independent and identically distributed. Their average is
It can be used as the point estimator of and an approximate confidence interval is
where is the usual sample variance of - -What if only a single replication is obtained? Then the same reasoning applies if we let be -the quantile estimate from within the ith batch of data. This requires sorting the data or forming a histogram within each batch. If the batches are large enough, then these within-batch quantile estimates will also be approximately i.i.d.
When we have a continuous-time output process, then, in principle, the same methods apply. However, we must be careful not to transform the data in a way that changes the problem. In particular, we cannot first form batch means, as we have done throughout this chapter, and then estimate the quantile from these batch means. The p quantile of the batch means of is not the same as the p quantile of itself. Thus, the quantile point estimate must be formed from the histogram of the raw data, either from each run, if we make replications, or within each batch, if we make a single replication.
6 Summary
This chapter emphasized the idea that a stochastic discrete-event simulation is a statistical experiment. Therefore, before sound conclusions can be drawn on the basis of the simulation-generated output data, a proper statistical analysis is required. The purpose of the simulation experiment is to obtain estimates of the performance measures of the system under study. The purpose of the statistica analysis is to acquire some assurance that these estimates are sufficiently precise for the proposed use of the model.
A distinction was made between terminating simulations and steady-state simulations. Steadystate simulation output data are more difficult to analyze, because the simulation analyst must address the problem of initial conditions and the choice of run length. Some suggestions were given regarding these problems, but unfortunately no simple, complete, and satisfactory solution exists. Nevertheless, simulation analysts should be aware of the potential problems, and of the possible solutions—namely, deletion of data and increasing of the run length. More advanced statistical techniques (not discussed in this text) are given in Alexopoulos and Seila [1998], Bratley, Fox, and Schrage [1996], and Law [2007].
The statistical precision of point estimators can be measured by a standard-error estimate or by a confidence interval. The method of independent replications was emphasized. With this method, the simulation analyst generates statistically independent observations, and thus standard statistical methods can be employed. For steady-state simulations, the method of batch means was also discussed.
The main point is that simulation output data contain some amount ofrandom variability; withou some assessment of its size, the point estimates cannot be used with any degree of reliability.
REFERENCES
ALEXOPOULOS, C.,ANDA. F. SEILA [1998], “Output DataAnalysis,” Chapter 7 in Handbook ofSimulation, J. Banks, ed., Wiley, New York.
BRATLEY, P., B. L. FOX, AND L. E. SCHRAGE [1996], A Guide to Simulation, 2d ed., Springer-Verlag, New York.
FISHMAN, G. S.,AND L. S.YARBERRY [1997], “An Implementation ofthe Batch Means Method,” INFORMS Journal on Computing, Vol. 9, pp. 296–310.
GOLDSMAN, D., L. SCHRUBEN, AND J. J. SWAIN [1994], “Tests for Transient Means in Simulated Time Series,” Naval Research Logistics, Vol. 41, pp. 171–187.
KELTON, W. D. [1986], “Replication Splitting and Variance for Simulating Discrete-Parameter Stochastic Processes,” Operations Research Letters, Vol. 4, pp. 275–279.
KELTON, W. D. [1989], “Random Initialization Methods in Simulation,” IIETransactions,Vol. 21, pp. 355–367.
KELTON, W. D., AND A. M. LAW [1983], “A New Approach for Dealing with the Startup Problem in Discrete Event Simulation,” Naval Research Logistics Quarterly, Vol. 30, pp. 641–658.
KLEIJNEN, J. P. C. [1987], Statistical Toolsfor Simulation Practitioners, Dekker, New York.
LADA, E. K., N. M. Steiger, AND J. R. WILSON [2006], “Performance Evaluation of Recent Procedures for Steady-state Simulation Analysis,” IIE Transactions, Vol. 38, pp. 711-–727.
LAW, A. M. [1977], “Confidence Intervals in Discrete Event Simulation: A Comparison of Replication and Batch Means,” Naval Research Logistics Quarterly, Vol. 24, pp. 667–78.
LAW, A. M. [1980], “Statistical Analysis of the Output Data from Terminating Simulations,” Naval Research Logistics Quarterly, Vol. 27, pp. 131–43.
LAW, A. M. [2007], Simulation Modeling and Analysis, 4th ed., McGraw-Hill, New York.
LAW,A. M.,AND J. S. CARSON [1979], “A Sequential Procedure for Determining the Length of a Steady-State Simulation,” Operations Research, Vol. 27, pp. 1011–1025.
NELSON, B. L. [2001], “Statistical Analysis of Simulation Results,” Chapter 94 in Handbook of Industrial Engineering, 3d ed., G. Salvendy, ed., Wiley, New York.
SCHMEISER, B. [1982], “Batch Size Effects in the Analysis of Simulation Output,” Operations Research, Vol. 30, pp. 556–568.
SCHRUBEN, L. [1982], “Detecting Initialization Bias in Simulation Output,” Operations Research, Vol. 30, pp. 569–590.
SNELL, M., AND L. SCHRUBEN [1985], “Weighting Simulation Data to Reduce Initialization Effects,” IIE Transactions, Vol. 17, pp. 354–363
STEIGER, N. M., AND J. R. Wilson [2002], “An Improved Batch Means Procedure for Simulation Output Analysis,” Management Science, Vol. 48, pp. 1569–1586.
WELCH, P. D. [1983], “The StatisticalAnalysis ofSimulation Results,” in The Computer Performance Modeling Handbook, S. Lavenberg, ed., Academic Press, New York, pp. 268–328.
Estimation of Absolute Performance
EXERCISES
- For each of the systems described below, under what circumstances would it be appropriate to use a terminating simulation versus a steady-state simulation to analyze this system?
(a) A walk-in medical clinic simulated to determine staffing levels.
(b) A portfolio of stocks, bonds, and derivative securities simulated to estimate long-run return.
(c) A fuel injector assembly plant that runs two shifts per day simulated to estimate throughput.
(d) The United States air traffic control system simulated to evaluate safety.
- Suppose that the output process from a queueing simulation is , the total number in queue at time t. A continuous-time output process can be converted into the sort of discretetime process . described in this chapter by first forming batch means of size m time units:
for . Ensemble averages of these batch means can be plotted to check for initialcondition bias.
(a) Show algebraically that the batch mean over 2m time units can be obtained by averaging two adjacent batch means over m time units. [Hint: This implies that we can start with batch means over rather small time intervals m and build up batch means over longer intervals without reanalyzing all of the data.]
(b) Simulate an queue with and for a run length of 4000 time units, computing batch means of the total number in queue with batch size time units. Make replications and use a mean plot to determine an appropriate number of batches to delete. Convert this number of batches to delete into a deletion time.
Using the results of Exercise 2 above, design and execute an experiment to estimate the steadystate expected number in this queue, L, to within customers with 95% confidence. Check your estimate against the true value of ).
In Example 7, suppose that management desired a 95% confidence interval on the estimate of mean cycle time and that the error allowed was hours (3 minutes). Using the same initial data given in Table 5, estimate the required total sample size. Although we cut the error in half, by how much did the required sample size increase?
Again, simulate an queue with and , this time recording customer time in system (from arrival to departure) as the performance measure for 4000 customers. Make replications and use a mean plot to determine an appropriate number of customers to delete when starting the system empty, with 4 customers initially in the system, and with 8 customers initially in the system. How does the warmup period change with these different initial conditions? What does this suggest about how to initialize simulations?
Consider an (M, L) inventory system, in which the procurement quantity Q is defined by
where I is the level of inventory on hand plus on order at the end of a month, M is the maximum inventory level, and L is the reorder point. M and L are under management control, so the pair (M, L) is called the inventory policy. Under certain conditions, the analytical solution of such a model is possible, but not always. Use simulation to investigate an inventory system with the following properties: The inventory status is checked at the end of each month. Backordering is allowed at a cost of $4 per item short per month. When an order arrives, it will first be used to relieve the backorder. The lead time is given by a uniform distribution on the interval [0.25, 1.25] months. Let the beginning inventory level stand at 50 units, with no orders outstanding. Let the holding cost be $1 per unit in inventory per month. Assume that the inventory position is reviewed each month. If an order is placed, its cost is $60 $5Q, where $60 is the ordering cos and $5 is the cost of each item. The time between demands is exponentially distributed with a mean of 1/15 month. The sizes of the demands follow this distribution:
| Demand | Probability |
|---|---|
| 1 | 1/2 |
| 2 | 1/4 |
| 3 | 1/8 |
| 4 | 1/8 |
(a) Make ten independent replications, each of run length 100 months preceded by a 12-month initialization period, for the (M, L) (50, 30) policy. Estimate long-run mean monthly cos with a 90% confidence interval.
(b) Using the results of part (a). estimate the total number of replications needed to estimate mean monthly cost within $5.
- Reconsider Exercise 6, except that, if the inventory level at a monthly review is zero or negative, a rush order for units is placed. The cost for a rush order is , where $120 is the ordering cost and $12 is the cost of each item. The lead time for a rush order is given by a uniform distribution on the interval [0.10, 0.25] months.
(a) Make ten independent replications for the (M, L) policy, and estimate long-run mean monthly cost with a 90% confidence interval.
(b) Using the results of part (a). estimate the total number of replications needed to estimate mean monthly cost within $5.
- Suppose that the items in Exercise 6 are perishable, with a selling price given by the following data:
| On the Shelf (months) | Selling Price |
|---|---|
| 0-1 | $10 |
| 1-2 | 5 |
| >2 | 0 |
Thus, any item that has been on the shelf more than 2 months cannot be sold. The age is measured at the time the demand occurs. If an item is outdated, it is discarded, and the next item is brough forward. Simulate the system for 100 months.
(a) Make ten independent replications for the (M, L) (50, 30) policy, and estimate long-run mean monthly cost with a 90% confidence interval.
(b) Using the results of part (a), estimate the total number of replications needed to estimate mean monthly cost within $5.
At first, assume that all the items in the beginning inventory are fresh. Is this a good assumption? What effect does this “all-fresh” assumption have on the estimates of long-run mean monthly cost? What can be done to improve these estimates? Carry out a complete analysis.
- Consider the following inventory system:
(a) Whenever the inventory level falls to or below 10 units, an order is placed. Only one order can be outstanding at a time.
(b) The size of each order is Q. Maintaining an inventory costs $0.50 per day per item in inventory. Placing an order incurs a fixed cost of $10.00.
(c) Lead time is distributed in accordance with a discrete uniform distribution between zero and 5 days.
(d) If a demand occurs during a period when the inventory level is zero, the sale is lost at a cost of $2.00 per unit.
(e) The number of customers each day is given by the following distribution:
| Number of Customers per Day | Probability |
|---|---|
| 1 | 0.23 |
| 2 | 0.41 |
| 3 | 0.22 |
| 4 | 0.14 |
(f) The demand on the part of each customer is Poisson distributed with a mean of 3 units.
(g) For simplicity, assume that all demands occur at noon and that all orders are placed immediately thereafter.
Assume further that orders are received at 5:00 P.M., or after the demand that occurred on tha day. Consider the policy having Q 20. Make ten independent replications, each of length 100
days, and compute a 90% confidence interval for long-run mean daily cost. Investigate the effect of initial inventory level and existence of an outstanding order on the estimate of mean daily cost. Begin with an initial inventory of Q 10 and no outstanding orders.
- A store selling Mother’s Day cards must decide 6 months in advance on the number of cards to stock. Reordering is not allowed. Cards cost $0.45 and sell for $1.25. Any cards not sold by Mother’s Day go on sale for $0.50 for 2 weeks. However, sales of the remaining cards is probabilistic in nature according to the following distribution:
32% of the time, all cards remaining get sold.
40% of the time, 80% of all cards remaining are sold.
28% of the time, 60% of all cards remaining are sold.
Any cards left after 2 weeks are sold for $0.25. The card-shop owner is not sure how many cards can be sold, but thinks it is somewhere (i.e., uniformly distributed) between 200 and 400. Suppose that the card-shop owner decides to order 300 cards. Estimate the expected total profit with an error of at most $5.00. [Hint: Make ten initial replications. Use these data to estimate the total sample size needed. Each replication consists of one Mother’s Day.]
- A very large mining operation has decided to control the inventory of high-pressure piping by a “periodic review, order up to M” policy, where M is a target level. The annual demand for this piping is normally distributed, with mean 600 and variance 800. This demand occurs fairly uniformly over the year. The lead time for resupply is Erlang distributed of order k 2 with its mean at 2 months. The cost of each unit is $400. The inventory carrying charge, as a proportion of item cost on an annual basis, is expected to fluctuate normally about the mean 0.25 (simple interest), with a standard deviation of 0.01. The cost of making a review and placing an order is $200, and the cost of a backorder is estimated to be $100 per unit backordered. Suppose that the inventory level is reviewed every 2 months, and let M 337.
(a) Make ten independent replications, each of run length 100 months, to estimate long-run mean monthly cost by means of a 90% confidence interval.
(b) Investigate the effects of initial conditions. Calculate an appropriate number of monthly observations to delete, in order to reduce initialization bias to a negligible level.
- Consider some number, say N, ofM/M/1 queues in series. The M/M/1 queue has Poisson arrivals at some rate λ customers per hour, exponentially distributed service times with mean 1/µ, and a single server. (Recall that “Poisson arrivals” means that interarrival times are exponentially distributed.) By M/M/1 queues in series, it is meant that, upon completion of service at a given server, a customer joins a waiting line for the next server. The system can be shown as follows:

All service times are exponentially distributed with mean , and the capacity of each waiting line is assumed to be unlimited. Assume that λ 8 customers per hour and 1 hour. The measure of performance is response time, which is defined to be the total time a customer is in the system.
(a) By making appropriate simulation runs, compare the initialization bias for N 1 (i.e., one M/M/1 queue) to , two M/M/1 queues in series). Start each system with all servers idle and no customers present. The purpose of the simulation is to estimate mean response time.
(b) Investigate the initialization bias as a function of for , and 5.
(c) Draw some general conclusions concerning initialization bias for “large” queueing systems when at time 0 the system is assumed to be empty and idle.
- Jobs enter a job shop in random fashion according to a Poisson process at a stationary overal rate, two every 8-hour day. The jobs are of four types. They flow from work station to work station in a fixed order, depending on type, as shown below. The proportions of each type are also shown.
| Type | Flow through Stations | Proportion |
|---|---|---|
| 1 | 1, 2, 3, 4 | 0.4 |
| 2 | 1, 3, 4 | 0.3 |
| 3 | 2, 4, 3 | 0.2 |
| 4 | 1, 4 | 0.1 |
Processing times perjob at each station depend on type, but all times are, approximately, normally distributed with mean and s.d. in hours as follows:
| Type | Station | |||
|---|---|---|---|---|
| 1 | 2 | 3 | 4 | |
| 1 | (20, 3) | (30, 5) | (75, 4) | (20, 3) |
| 2 | (18, 2) | (60, 5) | (10, 1) | |
| 3 | (20, 2) | (50, 8) | (10, 1) | |
| 4 | (30, 5) | (15, 2) |
Station i will have workers,4. Each job occupies one worker at a station for the duration of a processing time. All jobs are processed on a first-in–first-out basis, and all queues for waiting jobs are assumed to have unlimited capacity. Simulate the system for 800 hours, preceded by a 200-hour initialization period. Assume that Based on replications, compute a 95% confidence interval for average worker utilization at each of the four stations. Also, compute a 95% confidence interval for mean total response time for each job type, where a total response time is the total time that a job spends in the shop.
Change Exercise 13 to give priority at each station to the jobs by type. Type I jobs have priority over type II, type II over type III, and type III over type IV. Use 800 hours as run length, 200 hours as initialization period, and replications. Compute four 95% confidence intervals for mean total response time by type. Also, run the model without priorities and compute the same confidence intervals. Discuss the trade-offs when using first-in-first-out versus a priority system.
Consider a single-server queue with Poisson arrivals at rate per minute and normally distributed service times with mean 5.1 seconds and variance 0.98 seconds^2. It is desired to estimate the mean time in the system for a customer who, upon arrival, finds i other customers in the system; that is, to estimate
where W is a typical system time and N is the number of customers found by an arrival. For example, is the mean system time for those customers who find the system empty, is the mean system time for those customers who find one other customer present upon arrival, and so on. The estimate of will be a sample mean of system times taken over all arrivals who -find i in the system. Plot vs i. Hypothesize and attempt to verify a relation between and i.
-(a) Simulate for a 10-hour period with empty and idle initial conditions.
(b) Simulate for a 10-hour period after an initialization of one hour. Are there observable differences in the results of (a) and (c) Repeat parts (a) and (b) with service times exponentially distributed with mean 5.1 seconds.
(d) Repeat parts (a) and (b) with deterministic service times equal to 5.1 seconds.
(e) Find the number of replications needed to estimate w_0, with a standard error for each of at most 3 seconds. Repeat parts (a)–(d), but using this number of replications.
- At Smalltown U., there is one specialized graphics workstation for student use located across campus from the computer center. At 2:00 A.M. one day, six students arrive at the workstation to complete an assignment. A student uses the workstation for 108 minutes, then leaves to go to the computer center to pick up their graphics output. There is a 25% chance that the run wil be OK and the student will go to sleep. If it is not OK, the student returns to the workstation and waits until it becomes free. The round trip from workstation to computer center and back takes minutes. The computer becomes inaccessible at 5:00 A.M. Estimate the probability p that at least five of the six students will finish their assignment in the 3-hour period. First, make replications, and compute a 95% confidence interval for Next, work out the number of replications needed to estimate within .02, and make this number of replications. Recompute the 95% confidence interval for 17. Four workers are spaced evenly along a conveyor belt. Items needing processing arrive according to a Poisson process at the rate of 2 per minute. Processing time is exponentially distributed, with mean 1.6 minutes. If a worker becomes idle, then he or she takes the first item to come by on the conveyor. If a worker is busy when an item comes by, that item moves down the conveyor to the next worker, taking 20 seconds between two successive workers. When a worker
finishes processing an item, the item leaves the system. If an item passes by the last worker, i is recirculated on a loop conveyor and will return to the first worker after 5 minutes.
Management is interested in having a balanced workload—that is, management would like worker utilizations to be equal. Let be the long-run utilization of worker i, and let be the average utilization of all workers. Thus,. According to queueing theory, ρ can be estimated by , where arrivals per minute, servers, and minutes is the mean service time. Thus, so, on the average, a worker will be busy 80% of the time.
(a) Make 10 independent replications, each of run length 40 hours preceded by a one-hour initialization period. Compute 95% confidence intervals for and . Draw conclusions concerning workload balance.
(b) Based on the same 10 replications, test the hypothesis at a level of significance . If a difference of .05 is important to detect, determine the probability that such a deviation is detected. In addition, if it is desired to detect such a deviation with probability at least 0.9, figure out the sample size needed to do so. [Hint: See any basic statistics textbook for guidance on hypothesis testing.]
(c) Repeat (b) for (d) From the results of (a)–(c), draw conclusions for management about the balancing of workloads.
- At a small rock quarry, a single power shovel dumps a scoop full of rocks at the loading area approximately every 10 minutes, with the actual time between scoops modeled well as being exponentially distributed, with mean 10 minutes. Three scoops of rocks make a pile; whenever one pile of rocks is completed, the shovel starts a new pile.
The quarry has a single truck that can carry one pile (3 scoops) at a time. It takes approximately 27 minutes for a pile of rocks to be loaded into the truck and for the truck to drive to the processing plant, unload, and return to the loading area. The actual time to do these things altogether is modeled well as being normally distributed, with mean 27 minutes and standard deviation 12 minutes.
When the truck returns to the loading area, it will load and transport another pile if one is waiting to be loaded; otherwise, it stays idle until another pile is ready. For safety reasons, no loading of the truck occurs until a complete pile is waiting.
The quarry operates in this manner for an 8-hour day. We are interested in estimating the utilization of the trucks and the expected number of piles waiting to be transported if an additiona truck is purchased.
- Big Bruin, Inc. plans to open a small grocery store in Juneberry, NC. They expect to have two checkout lanes, with one lane being reserved for customers paying with cash. The question they want to answer is: How many grocery carts do they need?
During business hours (6 A.M.–8 P.M.), cash-paying customers are expected to arrive at 8 per hour. All other customers are expected to arrive at 9 per hour. The time between arrivals of each type can be modeled as exponentially distributed random variables.
The time spent shopping is modeled as normally distributed, with mean 40 minutes and standard deviation 10 minutes. The time required to check out after shopping can be modeled as lognormally distributed, with (a) mean 4 minutes and standard deviation 1 minute for cash-paying customers; (b) mean 6 minutes and standard deviation 1 minute for all other customers.
We will assume that every customer uses a shopping cart and that a customer who finishes shopping leaves the cart in the store so that it is available immediately for another customer. We will also assume that any customer who cannot obtain a cart immediately leaves the store, disgusted.
The primary performance measures of interest to Big Bruin are the expected number of shopping carts in use and the expected number of customers lost per day. Recommend a number of carts for the store, remembering that carts are expensive, but so are lost customers.
- Develop a simulation model of the total time in the system for an M/M/1 queue with service rate therefore, the traffic intensity is , the arrival rate. Use the simulation, in conjunction with the technique of plotting ensemble averages, to study the effect of traffic intensity on initialization bias when the queue starts empty. Specifically, see how the initialization phase changes for 21. Many simulation-software tools come with built-in support for output analysis. Use the web to research the features of one of these products.
List of Materials Available on www.bcnn.net
SimulationTools.xls