7/27/2019 Arena Simulation Information Different Book_7
1/55
317
Simulation 7
I N T R O D U C T I O N
Banyon State University (BSU) operates a walk-in medical clinic to meet the
acute medical needs of its 13,000 students, 1,200 faculty and staff members, andcovered relatives. The clinic is staffed by one doctor and one nurse and operates8 hours a day, 5 days a week. The doctor and nurse do not take a lunch break,but rather, use gaps between patient arrivals to eat lunch and take other shortbreaks. Because patients often do not arrive right when the clinic opens and be-cause they must visit with a nurse before seeing the doctor, the doctors officialstart time is 45 minutes after the clinic opens. Patients arriving at the clinic areserved on a first-come, first-served basis.
As part of a new total quality management (TQM) initiative, BSU conducted anin-depth 4-month study of its current operations. A key component of the studywas a survey, distributed to all students, faculty, and staff. The purpose of thestudy was to identify and prioritize areas most in need of improvement. An im-
pressive 44 percent of the surveys were returned and deemed usable. Follow-upanalysis indicated that the respondents to the survey were representative of thepopulation served by the clinic. After the results were tabulated, it was deter-mined that the walk-in medical clinic was located at the bottom of the rankings, in-dicating a great deal of dissatisfaction with the clinic.
PHOTODISC,INC.
C7 8/10/01 1:35 PM Page 317
7/27/2019 Arena Simulation Information Different Book_7
2/55
Preliminary analysis of the respondents comments indicated that people were rea-sonably satisfied with the treatment they received at the clinic but were very dissatisfiedwith the amount of time they had to wait to see a care giver. To gain additional insightinto the problem, a team of students was asked to study the problem as part of a courseproject. In addition to determining the general issues, they were asked to determine the
desirability of a new, computerized patient record system (CPRS) to aid in reducing wait-ing times. The student team initially collected data on the pattern of arrivals at the clinicand the various service times (discussed in more detail later). The team determined thaton a typical day, interarrival times were uniformly distributed between 6 and 20 min-utes. After arriving at the clinic, patients complete a form that requests background in-formation and the reason for the visit. The staff collect these forms and retrieve the pa-tients records from the basement. The team determined that the time to retrievepatient records follows a normal distribution with a mean of 4 minutes and a standarddeviation of 0.75 minute. Retrieved patient records are placed in a pile for the clinicsnurse in the order that the patients arrived at the clinic.
When the nurse finishes with the current patient, the file of the next patient is se-lected and the patient is directed to the nurses station. Here the nurse further docu-ments the problem and takes some standard measurements such as temperature andblood pressure. Then the nurse places the patients file at the bottom of a stack of files
for the doctor. When the doctor finishes with a patient, the file on the top of the stack isselected and the next patient is called to the examining room. The team determined thatthe processing times of the nurse closely approximate a normal distribution with an aver-age of 10 minutes and standard deviation of 2.3 minutes. Likewise, it was determined thatthe time required for the doctor to examine and treat the patients also closely approxi-mates a normal distribution with a mean of 17 minutes and a standard deviation of 3.4minutes. The teams influence diagram for the clinic is shown in Exhibit 7.1.
It may have already occurred to you that the queuing models discussed in Chapter6 are not appropriate for this situation. For example, the pattern of arrivals to the clinicappear to follow a uniform distribution and not a Poisson distribution, as is assumed inthe queuing theory models discussed in Chapter 6. Similarly, the processing times in theclinic follow a normal distribution, not an exponential distribution. Therefore, a moreflexible tool is needed: simulation.
318 Chapter 7 Simulation
Quality oftreatment
Increasesatisfactionwith clinic
Patientwaiting
time
Patientservicetimes
Time toretrieve patient
records
AcquireCRPS
Rate ofpatientarrivals
Time withdoctor
Time withnurse
Time tocomplete background
form
EXHIBIT 7.1 Influence Diagram for BSUs Walk-in Medical Clinic
C7 8/10/01 1:35 PM Page 318
7/27/2019 Arena Simulation Information Different Book_7
3/55
As we demonstrate in this chapter, simulation is a versatile, yet powerful, modelingtechnique for decision-making situations. It is particularly appropriate in situationswhere one or more of the assumptions associated with an analytical model is violated.This is the case in theBSU example. It is also particularly appropriate in situations char-acterized by risk. For example, in our discussion of optimization in Chapter 4, it was as-
sumed that all the coefficients were known with certainty. If management is not com-fortable with this assumption, techniques that are able to incorporate this uncertaintyinto the model should be employed, such as simulation. We will return to the analysis ofBSUs walk-in clinic at the end of the chapter after we have had a chance to better ac-quaint you with the simulation methodology.
Chapter 7 Simulation 319
7.1 General Overview of Simulation
As was noted previously, applications of the quantitative modeling tools described in ear-
lier chapters are frequently limited to relatively straightforward managerial problems.
When managerial problems become complex, they often do not fit the standard problem
classifications that can be solved with previously described tools. Development of specialoptimization models to handle such problems may be too costly, take too long, or even be
impossible. For these cases, simulation models are useful.
Simulation has many meanings, depending on where it is being used. To simulate, ac-
cording to the dictionary, means to assume the appearance or characteristics of reality. In
quantitative modeling, it generally refers to a technique for conducting experiments with a
computer on a model of a management system over an extended period of simulated time.
Simulation does more than just represent reality through a model, it imitates it. In
practical terms, this means that there are generally fewer simplifications of reality in a
simulation than in other models. Also, simulation is a technique for conducting experi-
ments. Therefore, simulation involves the testing of specific values of the decision vari-
ables and observing the impact on the dependent variables.
Simulation is a descriptive rather than a prescriptive or normative tool; there is usu-
ally no automatic search for an optimal solution, although optimization models orprocesses may be a part of a simulation.1 In general, simulation describes or predicts the
characteristics of a given system under varying circumstances. Once these characteristics
are known, the best policy can be selected. However, the true optimal policy, if such even
exists, may not be considered at all in the simulation. The simulation process often con-
sists of the repetition of an experiment many, many times to obtain an estimate of the
overall effect of certain actions. It can be executed manually in some cases, but a com-
puter is usually needed for realistic situations.
In the main body of this chapter we employ Excel to illustrate the simulation
process. However, for larger, more realistic situations there are many specialized soft-
ware packages available, one of whichCrystal Ball 2000is illustrated in the appen-
dix to this chapter. Like Crystal Ball, @Risk 4.0 is an Excel add-in, and both are well
suited for performing a variety of financial analyses. There are also a number of pack-
ages that are particularly well suited for modeling manufacturing operations, including
APS Virtual Planning, Arena, Awesim, ProModel, Simscript II.5, and Taylor EnterpriseDynamics. In addition to being useful for modeling manufacturing operations, many of
these packages are well suited for modeling supply chains, business processes, and ser-
vice operations. However there are also specialized packages for modeling service oper-
ations (e.g., amusement parks, call centers, telecom and networking, and airlines), such
as Service Model. Many of the packages just listed include sophisticated statistical and
C7 8/10/01 1:35 PM Page 319
7/27/2019 Arena Simulation Information Different Book_7
4/55
animation capabilities. The interested reader is referred to the Web site of the Institute
for Operation Research and the Management Sciences (www.informs.org), where com-
puter simulation packages are regularly surveyed and compared on a variety of dimen-
sions (www.lionhrtpub.com/software-surveys.shtml).
Finally, simulation may be called for when the problem under investigation is too
complex to be treated by analytical models or by numerical optimization techniques.Complexity here means that the problem cannot be formulated mathematically (e.g., be-
cause the assumptions do not hold), there are too many interacting random events to pre-
dict, or the formulation is too involved for a practical or economic solution.
Types of Simulation
There are several types of simulation. We cover the major ones in this chapter:
Deterministic and probabilistic simulation
Time dependent and time independent simulation
Visual interactive simulation
Business games
Corporate and financial simulation
System dynamics
Deterministic and Probabilistic Simulation Deterministic simulation is used when a
process is very complex or consists of multiple stages with complicated (but known) pro-
cedural interactions between them. Formulating a mathematical model that finds the mea-
sures of performance of such a system would be extremely detailed and time consuming.
Formulating the process as a simulation with fixed procedures and interactions (an algo-
rithmic model) allows the determination of the outcome and measures of performance in
a much more straightforward way. Note that in such a simulation, there is no doubt about
when something will happen, or in what amounts or degrees. That is, there are no proba-
bilistic elements in the model.
In probabilistic simulation, one or more of the independent variables (e.g., the ar-
rival rate in a queuing situation) is probabilistic; that is, it follows a certain probability
distribution. Two subcategories exist: discrete distributions and continuous distributions(see Chapter 2).
1. Discrete Distributions These involve a situation with a limited number of events
or variables that can only take a finite number of values.
2. Continuous Distributions These refer to a situation involving variables with an
unlimited number of possible values that follow familiar density functions such as
the normal distribution.
Probabilistic simulation is conducted with the aid of a technique calledMonte Carlo,
described in detail in Section 7.2.
Time Dependent and Time Independent Simulation Time independent simulation
refers to a situation where it is not important to know exactly when the event occurred.
For example, we may know that the demand is three units per day, but we do not care
when during the day the item was demanded. On the other hand, in some situations, suchas waiting line problems, it is important to know the precise time of arrival (to know if
the customer will have to wait). Then we are dealing with a time dependent situation.
Visual Interactive Simulation This is one of the more interesting and successful re-
cent developments in computer graphics and quantitative modeling. Visual interactive
320 Chapter 7 Simulation
C7 8/10/01 1:35 PM Page 320
7/27/2019 Arena Simulation Information Different Book_7
5/55
simulation (VIS) uses computer graphics displays to present the impact of various man-
agerial decisions. The decisions are implemented interactively while the simulation is
running. These simulations can show dynamic systems that evolve over time in terms of
animation. The user watches the progress of the simulation in an animated form on a
graphics terminal and can alter the simulation as it progresses. For an interesting exam-
ple, see Lembersky and Chi (1984).
Business Games Business games are simulation models involving several participants
who are engaged in playing a role in a game that simulates a realistic competitive situa-
tion. Individuals or teams compete to achieve their goal, such as profit maximization, in
competition or cooperation with the other individuals or teams. Games exist for a variety
of specific situations, such as manufacturing, hospitals, banks, nonprofit organizations,
and so on. For example, a team running a hospital must make decisions concerning
staffing, room rates, expansion, fund drives, and so forth. A popular business game uti-
lized in numerous MBA programs is called The Beer Game (Hammond 1994). This busi-
ness game simulates the process of managing a supply chain. Both computerized and
manual game board versions exist.
The two primary purposes of these games are for training and for research. The ad-
vantages for training are that the participant learns much faster and the knowledge and
experience gained are more memorable than passive instruction. In addition, complexi-ties, interfunctional dependencies, unexpected events, and other such factors can be intro-
duced into the game by the game administrator to evoke special circumstances. And the
time compressionallowing many years of experience in only minutes or hourslets the
participants try out actions that they would not be willing to risk in an actual situation and
see the result in the future.
In the research role, the games provide insight into the behavior of organizations, the
decision making process, and the interactions within a team. Observing the dynamics of
team decision making sheds light on important issues, such as the roles assumed by indi-
viduals on the teams, the effect of personality types and managerial styles, the emergence
of team conflict and cooperation, and so on. For an example of this use, see The Execu-
tive Game (Henshaw and Jackson 1990).
Corporate and Financial Simulations One of the more important applications of sim-ulation is in corporate planning, especially the financial aspects. Corporate planning in-
volves both long- and short-range plans. The models integrate production, finance, mar-
keting, and possibly other functions into one model, either deterministic or, when risk
analysis is desired, probabilistic. Many large corporations (e.g., Sears, General Motors,
and United Airlines) have developed such models.
System Dynamics One of the most interesting types of simulation, system dynamics,
is represented by the software package Dynamo, developed in the 1960s by J.W. For-
rester (1971). Regular simulation models are most commonly meant to be evaluated in
steady state conditions but the real world is rarely in steady state for long. Thus, there is a
need for continuous simulation models that allow dynamic behavior. System dynamics is
an engineering-oriented method of simulation based on the concept that complex systems
are usually composed of chains of causes and effects known as feedback loops. And in
contrast to other simulation models that usually deal with decision-making situations,system dynamics deals more with macroeconomic policies. Sets of equations capture
these policies and describe how the various elements and loops of the system interact. A
decision or action in one area produces an effect in another area, which, in turn, creates
another effect or produces the need for another decision or action. System dynamics has
been used to study social, political, corporate, governmental, and even world systems.
Chapter 7 Simulation 321
C7 8/10/01 1:35 PM Page 321
7/27/2019 Arena Simulation Information Different Book_7
6/55
Uses of Simulation
Because of its flexibility, simulation has been used to study a wide variety of situations,
including helping a bakery minimize its transportation costs (Martin 1998), evaluating in-
tervention strategies for preventing the heterosexual spread of HIV in an African city
(Bernstein et al. 1998), assisting the Department of Energy compare alternative haz-
ardous waste remediation alternatives (Toland et al. 1998), and the design of manufactur-
ing operations (Mollaghasemi 1998). There are other familiar situations that can be ad-
dressed with simulation as well:
Urban transportation systems, including their costs as well as their travel times,
congestion, and pollution. This information can help in designing optimal
throughways, such as one-way streets, lane conversions, and traffic signal settings.
Plant and warehouse location studies that simulate both incoming materials as well
as shipments of finished goods and replacement parts.
Determination of the proper size of repair crews for expensive equipment that breaks
down and the costs incurred by each.
Airport runway takeoffs and landings in order to improve productivity (throughput)
as well as minimize costs and maximize profits.
You can see that simulation is one of the most flexible techniques in the tool kit ofquantitative business modelers. It can be applied to many different types of situations and
yields a great deal of information concerning the effectiveness of different operating poli-
cies under various conditions and assumptions.
Advantages and Disadvantages of Simulation
The increased acceptance of simulation at higher managerial levels is probably due to a
number of factors:
1. Simulation theory is relatively straightforward.
2. Simulation is descriptive rather than normative, allowing managers to ask broad,
what-if questions and to test wide-ranging policies.
3. An accurate simulation model requires an intimate knowledge of the situation, thus
forcing the modeler to constantly interface with the manager.4. The simulation model is built for one particular situation and, typically, will not
address any other situation. Thus, no generalized understanding is required of the
managerevery component in the model corresponds one to one with a part of the
real-life system.
5. Simulation can handle an extremely wide variation in problem types (e.g., inventory
and staffing), as well as higher managerial level functions like long-range planning.
Thus, it is always there when the manager needs it.
6. The manager can experiment with different factors to determine which are important
and experiment with different policies and alternatives to determine which are the
best. The experimentation is done with a model rather than by interfering with the
system.
7. Simulation, in general, allows for inclusion of the real-life complexities of problems;
simplifications are not necessary. For example, simulation can utilize real-life
probability distributions rather than approximate theoretical distributions.
8. Due to the nature of simulation, a great amount of time compression can be attained,
giving the manager some feel as to the long-term effects of various policies, in a
matter of minutes.
9. The great amount of time compression enables experimentation with a very large
sample. Therefore, as much accuracy can be achieved as desired at a relatively low cost.
322 Chapter 7 Simulation
C7 8/10/01 1:35 PM Page 322
7/27/2019 Arena Simulation Information Different Book_7
7/55
The primary disadvantages of simulation are these:
1. An optimal solution cannot be guaranteed.
2. Constructing a simulation model is frequently a slow and costly process.
3. Solutions and inferences from a simulation study are usually not transferable to other
problems. This is due to the incorporation in the model of the unique factors of the
situation.4. Simulation is sometimes so easy to use and explain to managers that analytical
solutions that can yield optimal results are often overlooked.
5. Validating a simulation model relative to the situation it is supposed to represent can
be difficult.
6. Analysis of a simulation output can sometimes be extremely difficult and time
consuming.
Chapter 7 Simulation 323
7.2 The Modeling Process for Monte Carlo Simulation
Monte Carlo simulation is named for its random nature, similar to the famous gambling
spot. The modeling process follows much the same generic process as with other models
except that the analysis step involves conducting repetitive experiments on the model.
We elaborate the various steps as follows.
Step 1: Opportunity/Problem Recognition
Recognizing a real-world opportunity or problem is identical to that described with other
models except that simulation is usually called into play when the assumptions required
for the other models are not satisfied, or there is no appropriate model developed for the
situation. For example, a queuing situation may be of interest but the arrival and/or service
processes do not meet the random assumptions required to use queuing theory. This was
the case for the BSU walk-in medical clinic. Or an optimization situation may not involve
linear relationships. Or the situation may not fit into one of the standard models of quanti-
tative business modeling, and a special model will be required to model the situation.
Step 2: Model Formulation
This task involves developing the procedural steps in the model of the process. For simu-
lation studies, the influence diagram is particularly useful because developing a simula-
tion model requires an intimate understanding of the relationships among the elements of
the system being studied. A good example is Exhibit 7.1 for the medical clinic. The influ-
ence diagram may be redrawn in a variety of different ways and simulation models for
each of the diagrams may be formulated until one seems better, or more appropriate, than
the others. Even after one has been chosen, it may be modified many times before a final
formulation is acceptable.
Another issue in simulation is deciding whether a transient or steady state model is
desired. Many situations do not fit our regular models because they represent transient
phenomena. These can be modeled with simulation, but the concern is how to determine
good managerial policies when the situation keeps changing. In these cases, it is impor-
tant to be able to identify the range of transient behavior and test the managerial policies
against the full range of situations that may occur. More typically, we try to develop good
managerial policies for situations that reach a steady state. Although we discuss a bit later
how to determine whether the simulation has reached a steady state, it may well be the
C7 8/10/01 1:35 PM Page 323
7/27/2019 Arena Simulation Information Different Book_7
8/55
case that the real-world situation never reaches a steady state. For example, the noontime
rush at a fast food restaurant may never reach a steady state condition, either building up
in arrivals and service personnel, or decreasing in one or the other.
Step 3: Data Collection
The data collection process for Monte Carlo simulation is similar to that with other types
of quantitative models. However, the modeler must be careful to collect sufficient data
to fully describe the situation because it might not fit the modeling assumptions of the
other models. For example, in a queuing situation we assume that the arrivals follow the
Poisson process and thus collect enough data to verify that this assumption is correct. If
it is not, however, then more data may be needed to ascertain the actual arrival distribu-
tion, or range of distributions if no one distribution fits the data, as was done for BSUs
medical clinic.
This burden of data collection is even greater for situations that are less well defined;
that is, not a clear queuing situation, or optimization situation, or regression or decision
analysis or other standard type of modeling situation. Then a great deal of data must be
collected to even describe the situation, and more may be needed as the model being con-
structed is analyzed, requiring a return trip(s) to gather the additional data.
Step 4: Analysis of the Model
In this step, we divide the analysis into four segments that are particularly important for
simulation studies:
1. Test and validate the model.
2. Design the experiment.
3. Conduct the experiment.
4. Evaluate the results.
Lets look at each segment in more detail.
Testing and Validating the Model Obviously, the simulation model must properly re-
flect the system under study. This requires validating the model by comparing it to the ac-tual system. A valid simulation model should behave similarly to the underlying phenom-
enon. This is a necessary validation condition, but by itself may not be sufficient to allow
us to rely on its predictive abilities. Theoretical insights into the underlying phenomena
that govern the behavior of the business, economic, and social system that is being simu-
lated are critical to the construction of a valid model.
Validation may be viewed as a two-step process. The first step is to determine whether
the model is internally correct in a logical and programming sense ( internal validity). The
second is to determine whether it represents the phenomenon it is supposed to represent
(called external validity). The first step thus involves checking the equations and procedures
in the model for accuracy, both in terms of mistakes or errors as well as in terms of properly
representing the phenomenon of interest. The task of verifying a models internal validity
can often be simplified if the model is developed in modules and each module is tested as it
is developed. Focusing on a particular module rather than trying to evaluate the logic of the
entire model all at once facilitates identifying the source of errors and correcting them.Once the internal validity has been established, the model is then tested by inputting his-
torical values into the model and seeing if it replicates what happens in reality. If the model
passes this test, extreme values of the input variables are entered and the model is checked by
management for the reasonableness of its output. When a model is intended to simulate a
new or proposed system for which no actual data are available, there is no way to verify that
324 Chapter 7 Simulation
C7 8/10/01 1:35 PM Page 324
7/27/2019 Arena Simulation Information Different Book_7
9/55
the model, in fact, represents the system based on historical data, so managers must rely on
their own or expert opinions. And, of course, it is always necessary to test the model thor-
oughly for logical or programming errors (especially at extreme values of the data) and be
alert for any discrepancies or unusual characteristics in the results obtained from the model.
Some simulation models, as noted with visual interactive simulation, display a visual
representation of the results that gives managers a better feel for what is happening in themodel. Then the manager can suggest changes in the assumptions or input data and see
the effect on the outputs. This improves the validity testing process and thereby bolsters
the chances for the models eventual implementation.
Designing of the Experiment Once the model has been proven valid, the next task is
to design the simulation experiment. Experimental design refers to controlling the con-
ditions of the study, such as the variables to include. This is in contrast to situations
where observations are taken but the conditions of the study are not controlled. With de-
signed experiments, interpreting the results of the study is often more straightforward be-
cause the impact of extraneous factors and variables has been controlled.
More specifically, this step involves determining what factors should be considered
fixed in the model and what factors will be allowed to vary, what levels of the factors to
use, what the resulting dependent measures are going to be, how many times the model will
be replicated, the length of time of each replication, and other such considerations. For ex-ample, in a simple queuing simulation we may decide to fix the arrival and service rates but
vary the number of servers and then evaluate the customer waiting times, the dependent
variable. Clearly, many of these issues have important implications regarding the actual de-
velopment of the simulation model. Therefore, decisions made at this stage may require
making modifications to the computer model. Alternatively, more experienced modelers
often address experimental design issues prior to or concurrent with model development.
However, some simulation experiments may be much more complex because the
number of factors that must be investigated is very large. For example, consider invest-
ment problems with 10 possible investment alternatives (e.g., stocks, bonds), each of
which may assume only five values. All together, there are 510 different possibilities
(close to 10 million). To simulate 10 million runs is time consuming and costly. Thus, we
would instead pick some critical combinations of variables to investigate that, we hope,
would give us an intuitive feel for what was happening. If we were then able to gain someintuition about the situation, we would use that to further investigate particular variable
combinations of interest. All in all, the design of simulation experiments is similar to the
usual design of experiments. Issues such as the structure, sample size, cost, quality, and
the use ofstatistical tools to analyze the results are frequently involved.
Also included in the experimental design task is determining how long to run the sim-
ulation (when to stop the experiment). Sometimes, the length of a run is based on the
length of an actual phenomenon; for example, the length of the boating season in Chicago
is 10 weeks. This is called a terminating simulation and is illustrated in Section 7.6. In a
similar fashion to the way increasing the sample size reduces the standard error and there-
fore increases the accuracy of a survey, longer simulation runs and more replications of the
simulation model increase the accuracy of the results. Furthermore, stopping rules can be
developed using statistical theory to determine the appropriate number of replications to
achieve a specified confidence level for the results. For example, statistical theory can be
used to determine the number of days to simulate arrivals to a particular ATM in order tobe 95 percent confident that the true average customer waiting time is within 20 seconds.
Several techniques are available for decreasing the variance of the distribution of the
measures of performance (variance reduction). Reducing the variation of the distribution of
the performance measures helps to increase the precision of the simulation results. Perhaps
the most common variance reduction technique is the use of common random numbers.
Chapter 7 Simulation 325
C7 8/10/01 1:35 PM Page 325
7/27/2019 Arena Simulation Information Different Book_7
10/55
For example, assume a company was interested in comparing alternative investment strate-
gies over an extended period of time. To compare these strategies, a number of economic
variables need to be randomly generated, such as the rate of inflation, interest rates, and so
on. If the company generated separate random numbers for each investment strategy, then
the fact that one investment strategy performed better than the others could simply be the
result of the random numbers generated. Had the same set of random numbers been used tocompare all the investment strategies, the company would have more confidence that ob-
served differences in the results were due to differences in the strategies themselves and not
the result of the random numbers generated. While the use of common random numbers is
an effective way to reduce the variation across the various designs in an experiment, it is
important to consider how the results will be analyzed prior to using this approach. Many
statistical analysis techniques such as analysis of variance (ANOVA) are based on the as-
sumption that the observations are independent of one another. The use of common random
numbers clearly violates this assumption.
Another consideration in the experimental design task is whether to consider all the
data or to ignore the transient start-up data. It is usually necessary to wait until the model
stabilizes before conducting the simulation, whereupon the start-up data are discarded. For
example, in simulating the operation of a factory, at the beginning of the simulation there is
no work-in-process. As simulated time elapses, the work in process in the factory will grad-
ually build up and approach its steady state level. If at the end of the simulation run the av-erage work-in-process is calculated starting at time zero, this average will be smaller than
the actual amount of average inventory once the shop reaches steady state because the aver-
age will include data from the transient period when the factory was approaching steady
state. To avoid this problem, data during the start-up period is typically discarded and not
included in the calculation of the performance measures. The start-up period can be deter-
mined statistically or sometimes even visually (e.g., see Welchs method in Law and Kel-
ton 2000). In the preceding example, a plot of the work-in-process level at fixed intervals
could be used to determine the length of time required to warm-up the system.
We illustrate many of these issues in the example in Section 7.4.
Conducting the Experiment Conducting an experiment involves running the model
for the length determined in the previous step and inspecting the output measures. This
step also involves deciding whether to run independent replications of the model or to runit once for a long time and break this long run into several runs or batches (called the
batch means approach). The advantage of the batch means approach is that there is only
one warm-up period required, thereby reducing the amount of runs needed. The major
drawback of this approach is that the replications created by the batch means approach
are not truly independent, as they are when independent replications are used, which can
complicate the statistical analysis of the output.
Evaluating the Results The final task of the analysis step, prior to implementation, is
evaluating the results. Here, we deal with issues such as: What constitutes a significant dif-
ference? What do the results mean? Do more runs need to be made? Should we
change the model and repeat the experiment? To help answer such questions, we often rely
heavily on statistical tools such as ttests, ANOVA, and regression (see Chapters 2 and 3).
We may also conduct a sensitivity analysis (in the form of what-if questions). Sen-
sitivity analysis is performed in simulation in two ways. First, using a trial-and-error ap-proach, one can change the input values of the simulation (especially the uncontrollable
parameters) to find how sensitive the proposed solutions are to changes in the input data.
This is usually done by rerunning the simulation, either by using a what-if feature or sim-
ply using the computers editing capabilities to change data values. Second, there is the
issue of the value of additional information. One should explore the issue of whether and
326 Chapter 7 Simulation
C7 8/10/01 1:35 PM Page 326
7/27/2019 Arena Simulation Information Different Book_7
11/55
where effort should be directed to obtain better estimates of parameter values. The latter
may be done either quantitatively (if possible) or qualitatively.
Step 5: Implementation
Implementing the simulation results involves the same issues as any other implementa-tion. However, the chances of implementation are often better with simulation because
the manager is usually more involved in the simulation process and the models are closer
to the managers reality. And as noted earlier, many simulation packages allow the actual
simulation to be visually displayed in two and even three dimensions on a computer
screen, giving the manager more confidence in recommending the implementation of the
simulation results.
Chapter 7 Simulation 327
7.3 The Monte Carlo Methodology
Managerial systems of decisions under risk include chance elements in their behavior. As
such, they can be simulated with the aid of a technique called Monte Carlo simulation.The technique involves random sampling from the probability distributions that represent
the real-life processes. Let us give an example.
The Tourist Information Center
Alisa Goldman was delighted with her new job as director of the Tourist Information
Center for the city of Miami Beach. She had completed her graduate work in the Hotel
and Entertainment Services program of a highly rated college in New York and had ac-
cepted an offer for this new position from her former internship employer, the city of
Miami Beach.
The city manager, Sean Bushnell, had been impressed with Alisas analytical skills
during her summers as an intern working at the Senior Citizens Center. There, Alisa had
been instrumental in instituting programs that raised the quality of the centers services
while simultaneously cutting their costs. Sean had been straightforward in his expecta-tions when offering Alisa the permanent position of director for this new center: The cen-
ter was severely underfunded, yet the city council had high expectations for the center. If
the first year were successful, the center would be much better funded the second year. If
not, the city council might well cancel the entire project.
Alisa saw her first task as determining the needs for service at the center. This re-
quired statistics concerning the tourists arrival rates, their waiting times, and the ser-
vice times involved in meeting their needs. Following this, Alisa would look into
more details concerning the variety of services the tourists required. Special brochures
and posters might handle a significant portion of their information requirements, for
example. Or perhaps some form of express line for frequently asked questions
(FAQs) was desirable.
Alisas first approach to the data collection problem was to log tourist arrivals and
services in the facility. Her results for the first 10 tourists are shown in Exhibit 7.2. Basedon this quick preliminary sample, Alisa concluded that the average tourist waited 0.7
minute and the employee was busy during 0.82 minute, or 82 percent of the time. Several
questions came to Alisas mind:
How long should she clock the operation of the information clerk?
How do the employees feel about being clocked?
C7 8/10/01 1:35 PM Page 327
7/27/2019 Arena Simulation Information Different Book_7
12/55
7/27/2019 Arena Simulation Information Different Book_7
13/55
7/27/2019 Arena Simulation Information Different Book_7
14/55
7/27/2019 Arena Simulation Information Different Book_7
15/55
proportion to the probabilities listed. The bottom of the spreadsheet contains the random
service times generated by Excel.
To generate the 15 service times shown in Exhibit 7.8, the menu items Tools/DataAnalysis. . ./Random Number Generation were selected to display the Random Number
Generation dialog box shown in Exhibit 7.9. Since we want to place the random variates in
one column, a one was entered in the Number of Variables field. Next, since we want to gen-
erate 15 service times, 15 was entered in the Number of Random Numbers field. Since we
want to base the randomly generated service times on the discrete probability distribution
Chapter 7 Simulation 331
Service Time (Minutes) Probability
3 0.156
4 0.287
5 0.3626 0.195
EXHIBIT 7.7 Service
Times at the Tourist
Information Center
1
2
3
4
5
6
7
8
9
1 0
1 1
1 2
1 3
1 4
1 5
1 6
1 71 8
1 9
2 0
2 1
2 2
2 3
2 4
A
Service
Time
3
4
5
6
Arrival
Number
1
2
3
4
5
6
7
89
10
11
12
13
14
15
B
Probability
0.156
0.287
0.362
0.195
Service
Time
4
3
6
3
5
4
3
55
5
4
4
3
5
6
EXHIBIT 7.8 Randomly Generating Service Times for 15 Visitors
to the Tourist Information Center
C7 8/10/01 1:35 PM Page 331
7/27/2019 Arena Simulation Information Different Book_7
16/55
shown in Exhibit 7.7, we specify that a discrete distribution will be used in the Distribution
field. After indicating that a discrete distribution will be used, the Parameters section of the
Random Number Generation dialog box requests the range for the Value and Probability
Input Range. This range always consists of two columns. The first column contains the possi-
ble outcomes that can occur and the second column contains the probability of each outcome
actually occurring. Excel uses this information to randomly generate the outcomes according
to the probabilities specified. For example, referring to the spreadsheet in Exhibit 7.8, a ser-
vice time of 5 minutes has a 0.362 chance of being generated by Excel based on specifying
the cells A3:B6 as the Value and Probability Input Range. Finally, cell B10 was entered for
the Output Range. It is sufficient to enter only the cell in the upper left-hand corner of the
range when specifying an output range. Alternatively, the entire range B10:B24 could havebeen specified in the Output Range field.
On closer examination of the random service times shown in Exhibit 7.8, it can be
observed that a 4-minute service time was generated four times, representing approxi-
mately 27 percent (4/15) of the generated service times. This is relatively close to our tar-
get of having 28.7 percent of the service times be 4 minutes. On the other hand, a
3-minute service time was also generated four times, but this is relatively far from our
target of 15.6 percent of the service times being 3 minutes. We comment that this is the
result of such a small sample size and, in general, as our sample size is increased, it will
more closely conform to the specified distribution. This is one reason why it is important
to run the simulation model for a sufficiently long period.
332 Chapter 7 Simulation
EXHIBIT 7.9 Generating 15 Service Times for the Tourist Information Center
7.4 Time Independent,Discrete Simulation
Following is a list of specific steps detailing some of the major simulation tasks described ear-
lier, but for the time independent discrete simulation process. Following the list, we offer an ex-
ample to illustrate the steps. In Section 7.5, we address the time dependent simulation process.
C7 8/10/01 1:35 PM Page 332
7/27/2019 Arena Simulation Information Different Book_7
17/55
1. Describe the system and obtain the probability distributions of the relevant elements
of the system. This is a crucial step requiring intimate familiarity with the system.
Frequently, incorrect assumptions are made at this point that invalidate the rest of the
simulation.
2. Define the appropriate measure(s) of system performance. If necessary, write it in
the form of an equation(s).3. Set up the initial simulation conditions (e.g., insert the values needed to start the
simulation).
4. For each probabilistic element, generate a random value and determine the systems
performance.
5. Derive the measures of performance and their variances.
6. If steady-state results are desired, repeat steps 4 and 5 until the measures of system
performance stabilize, as described in the following example.
7. Repeat steps 46 for various managerial policies. Given the values of the
performance measures and their confidence intervals, decide on the appropriate
managerial policy.
This procedure will be demonstrated with an inventory control example.
E X A M P L E
Marvins Service StationMarvins Service Station sells gasoline to boat owners. The demand for gasoline depends on
weather conditions and fluctuates according to the following distribution:
Weekly Demand (Gallons) Probability
2,000 0.12
3,000 0.23
4,000 0.48
5,000 0.17
Shipments arrive once a week. Because Marvins Service Station is in a remote location, itmust order and accept gasoline once a week. Joe, the owner, faces the following problem: If he
orders too small a quantity, he will lose, in terms of lost profits and goodwill, 12 cents per gallondemanded and not provided. If he orders too large a quantity, he will have to pay 5 cents per gal-
lon shipped back due to lack of storage space for what he ordered but had to return. For eachgallon sold, he makes 10 cents profit. Joe now receives 3,500 gallons at the beginning of each
week before he opens for business. He thinks that he should receive more, maybe 4,000 or even4,500 gallons. The tanks storage capacity is 5,500 gallons. The problem is to find the best order
quantity.Joecouldsolve his problem by trial and error. That is, he could order different weekly quanti-
ties for periods of, say, 10 weeks, and then see which worked best by comparing the results.
However, simulation can give an answer in a few minutes and a simulated loss is only a loss onpaper. This section will explain how to solve Joes dilemma.
Solution by Simulation
To find the appropriate ordering quantity, it is necessary to compute the expected profit
(loss) for the existing order quantity (3,500 gallons) and for other possible order quanti-
ties such as 4,000 and 4,500 (as suggested by Joe), or any other desired figure. Assume
Chapter 7 Simulation 333
C7 8/10/01 1:35 PM Page 333
7/27/2019 Arena Simulation Information Different Book_7
18/55
that today is the first day of the week, there were 300 gallons remaining after business
last week, and a shipment has just arrived, resulting in an inventory of 3,800 gallons.
(Note: All quantities in this example are in gallons.)
To clarify our thinking about this situation, and to specify the exact relationships in
the simulation, we first construct a diagram. In this case, we will include the equations in
the diagram, which is then known as a flow diagram of the relationships. A flow dia-gram is a schematic presentation of all computational activities used in the simulation.
Exhibit 7.10 shows the flow diagram for this inventory situation. We discuss the equa-
334 Chapter 7 Simulation
EXHIBIT 7.10 Flow Diagram for the Inventory Example
Given Ib =3,800for first week
Enter informationand deplete
inventoryU=DIbS=IbIe =0
B=0
Initialize weeksinventoryIb =3,500
Compute profit
0.10S 0.12U 0.05B
Startweek
Stop
Enter informationand updateinventoryU=0S=D
Ie =Ib S
Caninventory satisfy
demandIb D
?
Generate RN
Yes
Yes
No
No
Yes No
Find weeks demand
Return excess andset inventory levelto 5,500 maximum
B=Ie +3,5005,500Ib =5,500
Calculateinitial inventoryIb =Ie +3,500
Isstorage
capacity exceededIe +3,500 5,500
?
More runsrequired?
Note:Ib = beginning inventory
Ie = ending inventory
S
= sales
U
= unsatisfied demand
B
= shipped back
D
= demand
C7 8/10/01 1:35 PM Page 334
7/27/2019 Arena Simulation Information Different Book_7
19/55
7/27/2019 Arena Simulation Information Different Book_7
20/55
In column E the inventory at the end of the week is calculated. Since it is not
possible to have a negative amount of inventory, the IF function is used to calculate
the inventory at the end of week 1 in cell E15 as follows:
=IF(B15>=C15,B15C15,0)
According to this formula, if the inventory available at the beginning of week 1
(B15) is greater than or equal to the demand in week 1 (C15), then inventory at the
end of week 1 is equal to the inventory available at the beginning of week 1 minus
the demand during week 1. Alternatively, if the inventory available at the beginning
of week 1 is less than the demand during week 1, then the inventory at the end of
week 1 would be zero. Since unsatisfied demand (column F) is the opposite of end-
ing inventory, it is calculated in a similar fashion.The amount shipped back is calculated in column G. Such a situation occurs
when the end-of-the-week inventory plus the shipment (3,500 gallons in the sys-
tem under study) exceed the 5,500-gallon tank capacity. In this case, the excess sup-
ply is shipped back and the beginning inventory is 5,500. For example, in week 3,
the shipment of 3,500, added to the weekend inventory of week 2 of 2,300, gives a
total of 5,800 gallons. Therefore, 5,800 5,500 = 300 gallons are shipped back.
336 Chapter 7 Simulation
1
2
3
45
6
7
8
9
1 0
1 1
1 2
1 3
1 4
1 5
1 6
1 7
1 8
1 9
2 0
2 12 2
2 3
2 4
2 5
2 6
2 7
2 8
2 9
3 0
3 1
3 2
3 3
3 4
3 5
3 6
3 7
I
Average
Weekly
Profit
$300.00
$250.00
$295.00
$346.25
$335.00
$327.50
$323.57$333.13
$328.33
$325.50
Total
Weekly
A
Weekly
Demand
2,000
3,0004,000
5,000
Beg. inv.
Shipment
Capacity
Week
Number
1
2
3
4
5
6
78
9
10
Average
B
Probability
0.12
0.230.48
0.17
300
3,500
5,500
Inventory
at Beginning
of Week
3,800
4,300
5,500
5,000
3,500
3,500
3,5004,000
3,500
3,500
40,100
4,010
C
Simulated
Demand
3,000
2,000
4,000
5,000
4,000
4,000
3,0004,000
4,000
3,000
36,000
3,600
D
Sold
3,000
2,000
4,000
5,000
3,500
3,500
3,0004,000
3,500
3,000
34,500
3,450
E
Inventory
at End
of Week
800
2,300
1,500
0
0
0
5000
0
500
5,600
560
F
Unsatisfied
Demand
0
0
0
0
500
500
00
500
0
1,500
150
G
Shipped
Back
300
0
0
0
0
0
00
0
0
0
30
H
Weekly
Profit
$300.00
$200.00
$385.00
$500.00
$290.00
$290.00
$300.00$400.00
$290.00
$300.00
$3,255.00
$325.50
Key Formulas
B15 =B8+B9
B16 =MIN(E15+$B$9,5500) {copy to cells B17:B24}
D15 =IF(B15>=C15,C15,B15) {copy to cells D16:D24}
E15 =IF(B15>=C15,B15-C15,0) {copy to cells E16:E24}
F15 =IF(C15>=B15,C15-B15,0) {copy to cells F16:F24}
G15 =IF(B8+$B$9>$B$10,B8+$B$9-$B$10,0)
G16 =IF(E15+$B$9>$B$10,E15+$B$9-$B$10,0) {copy to cells G17:G24}
H15 =(0.1*D15)-(0.12*F15)-(0.05*G15) {copy to cells H16:H24}
I15 =AVERAGE(H$15:H15) {copy to cells I16:I24}
Input
Output
EXHIBIT 7.11 The Simulation for 10 Weeks
C7 8/10/01 1:35 PM Page 336
7/27/2019 Arena Simulation Information Different Book_7
21/55
Column H shows the measure of performance in this problemprofit. The
profit is calculated, every week, according to the formula:
$ Profit = 0.10(sales) 0.12(unsatisfied demand) 0.05(shipped back)
The resulting values are plotted in Exhibit 7.12a and compared to a theoreti-
cal continuous distribution that may, in reality, be the underlying distribution of
weekly profit.
Column I represents the average weekly profit at any week, computed by total-
ing the weekly profits up to that week (cumulative profit) and dividing it by the num-
ber of weeks. Notice how the absolute cell reference was used in the first term of theformula entered in cell I15 so that it could be copied to the other cells in column I.
Step 5: Compute the Measures of Performance Each simulation run is composed of
repeat, multiple trials. The question of how many trials to have in one run (i.e., find-
ing the length of the run) involves statistical analysis. The longer the run, the more
accurate the results, but the higher the simulation time and cost. This issue concerns
what are called stopping rules, discussed further in Step 6.
Chapter 7 Simulation 337
Averageweeklyprofit($)
2,500 3,000 3,500 4,000 4,500 5,5005,000
Order quantity (gallons)
(b) Average weekly profit variability
0
100
200
300
400
500
Frequencyofoccurrences
200 250 300 350
Actual
400 500450
Weekly profits ($)
(a) Profit distribution
0
1
2
3
4
Best fit continuous
EXHIBIT 7.12 Profit Results
C7 8/10/01 1:35 PM Page 337
7/27/2019 Arena Simulation Information Different Book_7
22/55
7/27/2019 Arena Simulation Information Different Book_7
23/55
determined, then simulation runs are made to extend past this point into the stabiliza-
tion period, and the measures of performance and their variances are recorded to de-
termine their average values and confidence intervals.
If there exist several measures of performance, then the stabilization analysis
must be performed for each measure. Only after stabilization is achieved in all mea-
sures of performance (or at least in all importantmeasures) should the simulation bestopped.
Step 7: Find the Best Ordering Policy Steps 4, 5, and 6 are now repeated for other or-
dering policies in order to find the best. In the example just presented, the ordered
quantity Q was 3,500; other values ofQ (e.g., 3,300, 3,700, 4,000) should be consid-
ered next. Each value ofQ constitutes an independent system for which the various
measures of effectiveness such as average profit, average sales, and unsatisfied de-
mand are computed. Normally, the same set of random numbers is used for all trials
in order to increase their comparability (refer to discussion of design of experiments
in Section 7.2). Each such experiment is called a simulation run. The results for av-
erage weekly profit are shown in Exhibit 7.12b; the best results seem to occur at
about 4,100 gallons.
In this case, the most important measure of performance has been assumed to be
the average profit, and therefore the policy with the highest average profit will be se-
lected. In other systems, two or more measures of performance may have to be com-pared such as the probability of a stockout.
Chapter 7 Simulation 339
7.5 Time Dependent Simulation
As you may recall from earlier in the chapter, Alisa needed some tools to support her job
as director of the Tourist Information Center. To use simulation required extensive histor-
ical data concerning both the demand for services as well as the service capabilities. She
has now collected the following information: The Tourist Information Center is staffed
by one employee and is open from 9 A.M. to 5 P.M. The length of service required by
tourists varies according to the probability distribution in Exhibit 7.14a, and they arrive at
the center according to the distribution in Exhibit 7.14b.Alisa now wishes to find the following:
The average waiting time per tourist, in minutes
The percentage of time that the employee is busy (utilization)
(a) Service (b) Arrivals
Time BetweenLength Two Consecutiveof Service Arrivals (Interarrival(Minutes) Probability (%) Time, Minutes) Probability (%)
3 15.6 3 20.2
4 28.7 4 23.6
5 36.2 5 31.2
6 19.5 6 18.4
7 6.6
EXHIBIT 7.14
Service and Arrival
Distributions
C7 8/10/01 1:35 PM Page 339
7/27/2019 Arena Simulation Information Different Book_7
24/55
The average number of tourists in the center
The probability of finding two tourists in the center
Simulation Analysis with Discrete Distributions
Before starting the simulation, we create an influence diagram for Alisas situation,
shown in Exhibit 7.15. Based on this diagram, we develop the spreadsheet shown in Ex-
hibit 7.16 to simulate the processing of arriving tourists, using random numbers generated
by Excel. (For illustration purposes, we limit the simulation to only 10 tourists.) To simu-
late this situation two sets of random numbers are needed: the time required to service
each tourist and the time between tourist arrivals. The time of the first arrival is given as
9:00 A.M. (For the purpose of this example, from now on we will ignore the hour and con-
sider only the number of minutes that have elapsed since 9:00 A.M.) The interarrival times
for the other 9 tourists (column B) and the service times (column D) for all 10 tourists
were generated from the discrete distributions entered at the top of the spreadsheet shown
in Exhibit 7.16 using Excels Random Number Generation tool.In column C the predicted arrival time of each tourist is calculated. As noted earlier,
the first tourist is assumed to enter at 9:00 A.M., or zero minutes after the information cen-
ter opens. The interarrival time for the second tourist was generated to be 6 minutes after
the arrival of the first tourist. To calculate the time of the second tourists arrival, the for-
mula =C12+B13 was entered in cell C13 and then copied to cells C14:C21.
For service to begin for a given tourist, two events must occur: (1) the employee
must finish with the preceding tourist and (2) the tourist must arrive at the center. In other
words, for the service employee to begin helping the second tourist, the service for the
first tourist must be finished and the second tourist must be physically present at the in-
formation center. To capture this logic, the formula =MAX(F12, C13) was entered in cell
E13 and then copied to cells E14:E21.
The time that service ends is calculated simply as the time service begins (column E)
for a particular tourist plus the randomly generated service time (column D) for the
tourist. Two measures of system performance are calculated in columns G and H.
Average Waiting Time Since the first arriving tourist will not have to wait, formulas
were entered to calculate only the waiting time of tourists two through nine. In the
spreadsheet shown in Exhibit 7.16, waiting time is calculated by subtracting the time the
tourist arrived (column C) from the time service begins (column E). For the arriving
340 Chapter 7 Simulation
EXHIBIT 7.15 Influence Diagram for Tourist Information Center
Customerwaiting
time
Qualityof service
DevelopFAQ brochure
Add expressline
Number ofemployees
Variety ofservices
Rate ofarrivals
Customerservicetimes
Increasefunding
C7 8/10/01 1:35 PM Page 340
7/27/2019 Arena Simulation Information Different Book_7
25/55
tourists, the average waiting time per tourist was 0.56 minute (excluding the first tourist
who will never have to wait, a startup transientphenomenon).
Utilization of the Service Facility Idle time is calculated as the difference between the
start of service of a particular tourist and the end of service of the preceding tourist. In
Exhibit 7.16, the center was simulated for a total of 48 minutes. During this period, there
were 6 minutes of idle time. Thus, the employee was idle 13 percent of the time (6/48) or
alternatively, busy 87 percent of the time (42/48).
Average Number of Tourists in the Center During 6 minutes, there were no tourists
in the center, but during 5 minutes, there were two (during times of waiting). During theremaining 37 minutes (48 6 5 = 37), there was one tourist. On the average, the num-
ber of tourists either waiting or being served were
L = [0(6) + 1(37) + 2(5)]/48 = 0.98
This average corresponds to the symbolL in Chapter 6.
Chapter 7 Simulation 341
EXHIBIT 7.16 Simulation of Tourist Information Center
1
2
34
5
6
7
8
9
1 0
1 1
1 2
1 3
1 4
1 5
1 6
1 71 8
1 9
2 0
2 1
2 2
2 3
2 4
2 5
2 6
2 7
2 8
2 9
3 0
3 1
3 2
B
Probability
0.1560.287
0.362
0.195
Predicted
Interarrival
Time
0
6
3
5
5
64
5
3
7
C
Time
Arriving
14
9
6
0
19
2529
34
37
44
D
Interarrival
Time
34
5
6
7
Service
Time
4
6
4
5
35
3
4
4
4
E
Probability
0.2020.236
0.312
0.184
0.066
Service
Start
0
6
10
16
20
2529
34
38
44
F
Service
End
10
16
20
25
2834
38
41
48
4
A
Service
Time
34
5
6
Tourist
Number
1
2
3
4
5
67
8
9
10
Average
G
Wait
Time
1
0
1
0
00
1
2
0
0.56
H
Idle
Time
2
0
0
0
01
0
0
3
0.13
Key Formulas
C13 =C12+B13 {copy to cells C14:C21}
E12 =C12
E13 =MAX(F12,C13) {copy to cells E14:E21}
F12 =E12+D12 {copy to cells F13:F21}
G13 =E13-C13 {copy to cells G14:G21}
H13 =E13-F12 {copy to cells H14:H21}
G22 =AVERAGE(G13:G21)
H22 =SUM(H13:H21)/F21
C7 8/10/01 1:35 PM Page 341
7/27/2019 Arena Simulation Information Different Book_7
26/55
Probability of Finding Two Tourists in the Center This situation occurred in 5 of the
48 minutes, or 10.4 percent of the time. In a similar manner, other measures of perfor-
mance for this service system could be calculated.
Simulation with Continuous Probability Distributions
In the preceding case, both the interarrival times and the service times followed discrete
distributions. If one or both of these follow a continuous distribution, such as the normal
distribution or the uniform distribution, we can use Excels Random Number Generation
tool to generate random numbers in a similar way. Beyond specifying a different distribu-
tion and the parameters that are unique to the distribution, the procedure is identical to the
procedure described. In Section 7.7 we simulate a situation that requires generating ran-
dom variables from several continuous distributions.
342 Chapter 7 Simulation
7.6 Risk Analysis
In Chapter 5, we presented simple examples of risk analysis in the form of a decision treeor a decision table. Simulation can deal with much more complicated risk analysis prob-
lems. Such problems may involve many possible combinations and probabilities, and
even some constraints. Thus, the standard decision analysis approach is insufficient. The
example we use here is fairly simple but illustrates the applicability of simulation in risk
analysis.
Let us assume that we want to predict the profit from product M-6 where the profit is
given by the following formula:
Profit = [(unit price unit cost) volume sold] advertising cost
Now let us assume that the unit selling price can take three levels: either $5, $5.50,
or $6, depending on market conditions. We also assume that the probabilities of these
market conditions are known. Similarly, the unit cost may assume several levels (depend-
ing on the commodity markets). The volume is a function of the economic conditions,and the advertising cost depends on competitors actions. All this information is summa-
rized in Exhibit 7.17.
Using Excel to generate the random numbers, we can simulate the four random
variables and compute the profit or any other measures of performance such as the
probability of having a loss, the probability of making $10,000 or more, and so on.
The first 10 trials are then shown in Exhibit 7.17. For example, in trial 1, the profit =
(5.00 3.50)18,000 30,000 = 3,000.
This information is then summarized in a risk profile probability distribution and a
cumulative probability distribution, such as in Exhibit 7.18. Such functions are extremely
important in risk analysis. What these figures show is that the range of profit varies be-
tween a loss ($3,000) and $50,000 profit. The mean is about $23,000 (based on 100 tri-
als; the true mean based on expected values is $23,140). If we compute the most likely
profit (based on the most likely values of the variables) we would get
(5.50 3.00)18,000 20,000 = $25,000
a $2,000 difference compared to the long-run mean. The cumulative probability curve also
shows us that there is a 2 percent chance oflosing money on this product and a 14 percent
chance of making less than $10,000. On the other hand, there is a 15 percent chance of
making more than $30,000 and a 5 percent chance of making more than $40,000.
C7 8/10/01 1:35 PM Page 342
7/27/2019 Arena Simulation Information Different Book_7
27/55
7/27/2019 Arena Simulation Information Different Book_7
28/55
344 Chapter 7 Simulation
In this section we return to the Banyon State University (BSU) example to illustrate simu-
lation in the broader modeling context. We overviewed this case in the chapter opener;
now we will look at the situation in more detail.
Opportunity/Problem Recognition
Respondents to a survey indicate that the universitys walk-in clinic is one of the areas
with which they are most dissatisfied. Analysis of the respondents comments suggests
that although the university community is reasonably satisfied with the quality of care
they receive at the clinic, they are quite dissatisfied with the amount of time they spend at
the clinic. A student team was asked to study the impact that a computerized patient
record system would have on the clinics operations. With this system, all patient records
would be stored electronically and could be immediately accessed by the doctor or nurse
via computers at their respective work areas.
Model Formulation and Data Collection
A team of students was selected to study the problem as part of a course project and de-
veloped the preliminary influence diagram of the situation, as illustrated earlier in Ex-
hibit 7.1. In order to study the clinic in more depth, the team collected data on the pat-
tern of arrivals and patient processing times to the clinic over a 2-week period. To
collect this data, a student from the team recorded the time each patient arrived on a
time card designed by the team. Analysis of the arrival data indicated that patient inter-
arrival times were uniformly distributed between the times of 6 and 20 minutes.
Next, the time when the patients file was retrieved was recorded on the card. The
difference between when the patient arrived and when the patients record was re-
trieved was used to estimate the time required to retrieve the records. An analysis of the
data collected over the 2-week period indicated that the time to retrieve patient records
followed a normal distribution, with a mean of 4 minutes and standard deviation of
0.75 minute.Once a patients record was retrieved, the card for recording times was attached to it
with a paper clip. When the nurse got to a particular patient, she would record the time
the file was picked up. Likewise, the nurse would record the time when she was finished
with this patient. Analysis of this data suggested that the nurse processing times followed
a normal distribution with a mean of 10 minutes and a standard deviation of 2.3 minutes.
Finally, a similar process was followed by the doctor. The doctor recorded both the
time each medical examination began and was completed. Then the doctor placed the
completed time card in a designated box for the student team to pick up. An analysis of
the doctor treatment times indicated that they also closely followed a normal distribution,
with a mean of 17 minutes and a standard deviation of 3.4 minutes.
Rather than jumping right in and trying to develop a simulation model of the clinics
operations, the student team first developed the flow diagram shown in Exhibit 7.19 to
gain a better understanding of its operations. Based on this flow diagram, the studentteam decided to develop a model in Excel to simulate 8 hours (480 minutes) of operation
of the clinic, both as it currently operates and how it would likely operate if the comput-
erized patient record system were implemented. Thus, this is a terminating rather than
steady state simulation due to the nature of the situation being simulated. The spreadsheet
is shown in Exhibit 7.20.
7.7 Detailed Modeling Example
C7 8/10/01 1:35 PM Page 344
7/27/2019 Arena Simulation Information Different Book_7
29/55
Column A in Exhibit 7.20 simply keeps track of the order in which patients arrive
at the clinic on a particular day. In column B the interarrival times for the patients were
randomly generated from a Uniform distribution over the range of 6 to 20 minutes,
using Excels Random Number Generation tool (see Exhibit 7.21). According to Ex-
hibit 7.20, the first patient arrives 10.5 minutes after the clinic opens, the second pa-
tient arrives 13.4 minutes after the first patient, and so on.
In column C, the time the patient actually arrives is calculated. For the purpose of sim-ulating the clinics operations, the clinic is assumed to open each day at time zero. Also,
since trying to keep track of both hours and minutes can become tedious in spreadsheets, all
times are expressed in the number of minutes since the clinic opened. The interarrival time
for the first patient represents the time between when the clinic opens and when the patient
arrives, so the formula =B5 was entered in cell C5. Referring to Exhibit 7.20, we observe
Chapter 7 Simulation 345
Normal (17, 3.4)Normal (10, 2.3)Normal (4, 0.75)Uniform (6, 20)
Doctor examNurse examRetrieverecords
Patientarrivals
EXHIBIT 7.19 Flow Diagram of Walk-In Clinics Operations
1
2
3
4
5
6
7
8
9
1 0
1 1
1 2
1 3
1 4
1 5
1 6
1 7
1 8
1 9
2 0
2 1
2 2
2 3
2 4
2 5
2 6
2 7
2 8
2 9
3 0
3 1
3 2
3 3
3 4
3 5
3 6
3 73 8
3 9
4 0
4 1
4 2
4 3
4 4
G
Doctor
Exam
Begins
45.0
61.1
78.0
91.5
114.4
135.3
152.5
169.9
187.0
205.5
226.6
240.4
259.4
276.5
292.2
307.0
325.7
339.4
353.7
372.4
392.7
413.8
432.3
444.9
458.6
474.8
491.7
515.0
531.4
548.5
570.4
592.6
615.0643.0
660.3
677.6
701.3
723.7
744.1
759.7
E
Nurse
Exam
Starts
13.4
29.5
40.8
60.6
75.3
89.4
104.1
114.0
127.8
134.3
143.1
151.1
159.4
171.6
183.7
193.2
204.9
214.3
223.7
238.3
246.1
265.1
282.0
292.1
305.6
315.8
327.0
333.2
342.8
353.7
362.3
372.9
382.7395.9
406.9
420.1
431.3
443.9
455.4
468.5
C
Time of
Patient
Arrival
10.5
23.9
37.8
56.5
71.9
79.0
85.8
92.0
104.0
122.8
130.9
140.8
147.5
163.3
171.2
182.4
192.7
201.7
220.3
234.2
242.4
260.8
278.5
285.4
295.1
304.6
313.2
321.0
331.9
339.7
346.8
354.3
370.9390.8
397.6
416.9
427.7
439.9
450.5
464.7
A
Patient
Number
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
3334
35
36
37
38
39
40
I
Time
Patient
Finished
61.1
78.0
91.5
114.4
135.3
152.5
169.9
187.0
205.5
226.6
240.4
259.4
276.5
292.2
307.0
325.7
339.4
353.7
372.4
392.7
413.8
432.3
444.9
458.6
474.8
491.7
515.0
531.4
548.5
570.4
592.6
615.0
643.0660.3
677.6
701.3
723.7
744.1
759.7
782.5
M
Doctor
Exam
Begins
45.0
61.1
78.0
91.5
114.4
135.3
152.5
169.9
187.0
205.5
226.6
240.4
259.4
276.5
292.2
307.0
325.7
339.4
353.7
372.4
392.7
413.8
432.3
444.9
458.6
474.8
491.7
515.0
531.4
548.5
570.4
592.6
615.0643.0
660.3
677.6
701.3
723.7
744.1
759.7
O
Time
In
System
50.6
54.1
53.7
57.9
63.4
73.5
84.1
95.0
101.5
103.8
109.5
118.6
129.0
128.9
135.8
143.3
146.7
152.0
152.1
158.5
171.4
171.5
166.4
173.2
179.7
187.1
201.8
210.4
216.6
230.7
245.8
260.7
272.1269.5
280.0
284.4
296.0
304.2
309.2
317.8
K
Total
Waiting
Time
25.8
26.3
31.9
24.2
28.4
41.6
56.8
64.1
76.5
73.9
87.7
91.3
99.7
101.1
111.5
112.9
123.6
128.3
125.9
130.4
139.8
143.7
143.7
146.0
153.3
159.0
172.3
184.4
188.6
200.2
213.0
228.5
234.8241.2
251.4
251.2
264.2
272.3
282.9
285.4
F
Time for
Nurse
Examination
8.7
10.9
8.3
10.8
14.1
14.7
9.9
13.8
6.5
8.8
8.0
8.3
12.2
12.1
9.5
11.7
9.4
9.4
7.5
7.8
10.5
9.3
10.1
13.5
10.2
11.2
6.2
9.6
10.9
8.6
10.6
9.8
9.311.0
11.3
9.5
9.4
11.5
10.7
9.6
D
Time to
Retrieve
Record
2.9
5.6
3.0
4.1
3.4
3.3
4.7
2.8
4.1
3.0
4.6
4.6
2.8
3.2
2.5
3.7
6.0
3.1
3.4
4.1
2.9
4.3
3.5
4.0
3.5
3.7
4.4
3.5
3.9
3.4
3.4
5.0
3.95.1
3.3
3.2
3.6
4.0
3.4
3.8
B
Time
Between
Arrivals
10.5
13.4
13.9
18.7
15.4
7.1
6.8
6.2
12.0
18.8
8.1
9.9
6.7
15.8
7.9
11.2
10.3
9.0
18.6
13.9
8.2
18.4
17.7
6.9
9.7
9.5
8.6
7.8
10.9
7.8
7.1
7.5
16.619.9
6.8
19.3
10.8
12.2
10.6
14.2
H
Time for
Doctor
Examination
16.1
16.9
13.5
22.9
20.9
17.2
17.4
17.1
18.5
21.1
13.8
19.0
17.1
15.7
14.8
18.7
13.7
14.3
18.7
20.3
21.1
18.5
12.6
13.7
16.2
16.9
23.3
16.4
17.1
21.9
22.2
22.4
28.017.3
17.3
23.7
22.4
20.4
15.6
22.8
J
Time
In
System
50.6
54.1
53.7
57.9
63.4
73.5
84.1
95.0
101.5
103.8
109.5
118.6
129.0
128.9
135.8
143.3
146.7
152.0
152.1
158.5
171.4
171.5
166.4
173.2
179.7
187.1
201.8
210.4
216.6
230.7
245.8
260.7
272.1269.5
280.0
284.4
296.0
304.2
309.2
317.8
N
Time
Patient
Finished
61.1
78.0
91.5
114.4
135.3
152.5
169.9
187.0
205.5
226.6
240.4
259.4
276.5
292.2
307.0
325.7
339.4
353.7
372.4
392.7
413.8
432.3
444.9
458.6
474.8
491.7
515.0
531.4
548.5
570.4
592.6
615.0
643.0660.3
677.6
701.3
723.7
744.1
759.7
782.5
P
Total
Waiting
Time
25.8
26.3
31.9
24.2
28.4
41.6
56.8
64.1
76.5
73.9
87.7
91.3
99.7
101.1
111.5
112.9
123.6
128.3
125.9
130.4
139.8
143.7
143.7
146.0
153.3
159.0
172.3
184.4
188.6
200.2
213.0
228.5
234.8241.2
251.4
251.2
264.2
272.3
282.9
285.4
L
Nurse
Exam
Starts
10.5
23.9
37.8
56.5
71.9
86.0
100.7
110.6
124.4
130.9
139.7
147.7
156.0
168.2
180.3
189.8
201.5
210.9
220.3
234.2
242.4
260.8
278.5
288.6
302.1
312.3
323.5
329.7
339.3
350.2
358.8
369.4
379.2390.8
401.8
416.9
427.7
439.9
451.4
464.7
Present System New Computerized Patient Record System
EXHIBIT 7.20 Simulation Model Results of Walk-In Clinic
C7 8/10/01 1:35 PM Page 345
7/27/2019 Arena Simulation Information Different Book_7
30/55
that the first patient arrived 10.5 minutes after the clinic opened. The interarrival time of
13.4 generated for the second patient indicates that the second patient of the day arrived
13.4 minutes after the arrival of the first patient. Therefore, to calculate the actual arrival
time of the second patient, the formula =C5+B6 was entered in cell C6. Since this logic re-
peats for the other arriving patients during the day, the formula entered in cell C6 was
copied down to the other cells in column C.In column D, Excels Random Number Generator tool was used to generate the time
to retrieve each patients medical record from a normal distribution with a mean of 4
minutes and standard deviation of 0.75. The process of doing this is similar to generating
the interarrival times for the patients, the major difference being that the random numbers
were generated from a normal distribution as opposed to being generated from a uniform
distribution.
The time the nurse starts examining the patient is calculated in column E. Since the
first patient does not have to wait for the nurse to finish with other patients, the time the
nurse begins examining the first patient is equal to the amount of time required to retrieve
the patients file after the patient arrives. Therefore, the formula =C5+D5 was entered in
cell E5. For all the patients that arrive after the first patient, two events have to occur be-
fore the nurse can begin examining a particular patient. First, the patient must arrive at
the clinic and have his or her medical record retrieved. Second, the nurse must finish with
the preceding patient. The time required to retrieve the second patients medical recordcan be calculated as C6+D6. The time the nurse finishes with the first patient is calcu-
lated as E5+F5 (the time the exam begins + the time required to complete the exam).
Since both of these events must be completed before the exam can be started for the sec-
ond patient, we enter the formula =MAX(C6+D6,E5+F5) in cell E6. This formula can
then be copied to the remaining cells in column E.
346 Chapter 7 Simulation
EXHIBIT 7.21 Generating Random Patient Interarrival Times with Excel
C7 8/10/01 1:35 PM Page 346
7/27/2019 Arena Simulation Information Different Book_7
31/55
Excels Random Number Generator tool was used to generate the time for the nurse to
complete her exam of a particular patient from a normal distribution with a mean of 10 min-
utes and standard deviation of 2.3 in column F.
The time the doctor begins examining a given patient is calculated in column G.
Since the doctor does not arrive until 45 minutes after the clinic opens, the first patient
will not be seen until both the clinic has been open for 45 minutes and the nurse exam ofthe first patient has been completed. Therefore, the time the first patient is seen by the
doctor is calculated as =MAX(C5+D5+F5,45) in cell G5. For the remaining patients that
visit the clinic on a particular day, the doctor cannot begin the exam until two events are
completed. First, the doctor must finish with the preceding patient. Second, the nurse
must finish with the current patient. Referring to the second patient that arrives at the
clinic, the time the doctor finishes with the first patient can be calculated as G5+H5.
Likewise, the time the nurse finishes with the second patient is calculated as E6+F6.
Hence, the time that the doctor begins examining the second patient is calculated as
=MAX(G5+H5,E6+F6) in cell G6. The formula entered in cell G6 can be copied to the
remaining cells in column G.
Excels Random Number Generator tool was used to generate the time required for
the doctor to perform an exam from a normal distribution with a mean of 17 minutes and
standard deviation of 3.4. The time the patient treatment was completed is calculated as
=G5+H5 in cell I5 for the first patient. This formula can be copied to the remaining cellsin column I.
Two performance measures are calculated in columns J and K, respectively. In col-
umn J the time the patient spends at the clinic is calculated by subtracting the time the pa-
tient arrived from the time the doctor finished with the patient. For the first patient, the
total time spent in the clinic is calculated as =I5C5 in cell J5. The total amount of time a
patient spends waiting is calculated as the total time the patient spends in the clinic less
the time the patients spends with the doctor and nurse. For the first patient, the amount of
waiting time is calculated as =J5F5H5 in cell K5. The formulas entered in cells J5 and
K5 can be copied to the remaining cells in their respective columns.
Finally, columns L through M correspond to a model that simulates the operation of
the clinic if the new computerized patient record system were implemented. Note that an
advantage to this simulation model is that the same patient arrivals, nurse processing
times, and doctor processing times are used to compare the performance of the manualrecord retrieval system and the computerized record retrieval system. That is, common
random numbers are used to compare both options. Had different sets of random numbers
been used, the decision maker would not be sure if observed differences in performance
were due to one option actually being superior to the other or due to the fact that different
sets of random numbers were used.
The formulas entered to simulate the operation of the clinic with the computerized pa-
tient record system are similar to the formulas discusse