RSH 10 CH 15
RSH 10 CH 15
RSH 10 CH 15
To accompany
Quantitative Analysis for Management, Tenth Edition,
by Render, Stair, and Hanna
Power Point slides created by Jeff Heyl
Simulation Modeling
2009 Prentice-Hall, Inc.
Learning Objectives
1. Tackle a wide variety of problems by
simulation
2. Understand the seven steps of conducting a
simulation
3. Explain the advantages and disadvantages of
simulation
4. Develop random number intervals and use
them to generate outcomes
5. Understand alternative simulation packages
available
After completing this chapter, students will be able to:
Chapter Outline
15.1 Introduction
15.2 Advantages and Disadvantages of Simulation
15.3 Monte Carlo Simulation
15.4 Simulation and Inventory Analysis
15.5 Simulation of a Queuing Problem
15.6 Fixed Time Increment and Next Event
Increment Simulation Models
15.7 Simulation Model for a Maintenance Policy
15.8 Two Other Types of Simulation
15.9 Verification and Validation
15.10 Role of Computers in Simulation
Introduction
Simulation is one of the most widely used
quantitative analysis tools
It is used by over half of the largest US
corporations in corporate planning
To simulate is to try to duplicate the features,
appearance, and characteristics of a real system
We will build a mathematical model that comes
as close as possible to representing the reality
of the system
You can also build physical models to test
systems
Introduction
The idea behind simulation is to imitate a real-
world situation mathematically
Study its properties and operating characteristics
Draw conclusions and make action decisions
Introduction
Using simulation, a manager should
1. Define a problem
2. Introduce the variables associated with the
problem
3. Construct a numerical model
4. Set up possible courses of action for testing
5. Run the experiment
6. Consider the results
7. Decide what courses of action to take
Process of Simulation
Define Problem
Introduce Important
Variables
Construct Simulation
Model
Specify Values of
Variables to Be Tested
Conduct the
Simulation
Examine the
Results
Select Best Course
of Action
Figure 15.1
Advantages and Disadvantages
of Simulation
Simulation is useful because
1. It is relatively straightforward and flexible
2. Recent advances in computer software make
simulation models very easy to develop
3. Can be used to analyze large and complex
real-world situations
4. Allows what-if? type questions
5. Does not interfere with the real-world system
6. Enables study of interactions between
components
7. Enables time compression
8. Enables the inclusion of real-world
complications
Advantages and Disadvantages
of Simulation
The main disadvantages of simulation are
1. It is often expensive as it may require a long,
complicated process to develop the model
2. Does not generate optimal solutions, it is a
trial-and-error approach
3. Requires managers to generate all conditions
and constraints of real-world problem
4. Each model is unique and the solutions and
inferences are not usually transferable to
other problems
Monte Carlo Simulation
When systems contain elements that exhibit
chance in their behavior, the Monte Carlo method
of simulation can be applied
Some examples are
1. Inventory demand
2. Lead time for inventory
3. Times between machine breakdowns
4. Times between arrivals
5. Service times
6. Times to complete project activities
7. Number of employees absent
Monte Carlo Simulation
The basis of the Monte Carlo simulation is
experimentation on the probabilistic elements
through random sampling
It is based on the following five steps
1. Setting up a probability distribution for
important variables
2. Building a cumulative probability distribution
for each variable
3. Establishing an interval of random numbers
for each variable
4. Generating random numbers
5. Actually simulating a series of trials
Harrys Auto Tire Example
A popular radial tire accounts for a large portion
of the sales at Harrys Auto Tire
Harry wishes to determine a policy for managing
this inventory
He wants to simulate the daily demand for a
number of days
Step 1: Establishing probability distributions
One way to establish a probability distribution for
a given variable is to examine historical outcomes
Managerial estimates based on judgment and
experience can also be used
Harrys Auto Tire Example
Historical daily demand for radial tires
DEMAND FOR TIRES FREQUENCY (DAYS)
0 10
1 20
2 40
3 60
4 40
5 30
200
Table 15.1
Harrys Auto Tire Example
Step 2: Building a cumulative probability distribution
for each variable
Converting from a regular probability to a
cumulative distribution is an easy job
A cumulative probability is the probability that a
variable will be less than or equal to a particular
value
A cumulative distribution lists all of the possible
values and the probabilities
Tables 15.2 and 15.3 show these distributions
Harrys Auto Tire Example
Probability of demand for radial tires
DEMAND VARIABLE PROBABILITY OF OCCURRENCE
0 10/200 = 0.05
1 20/200 = 0.10
2 40/200 = 0.20
3 60/200 = 0.30
4 40/200 = 0.20
5 30/200 = 0.15
200/200 = 1.00
Table 15.2
Harrys Auto Tire Example
Cumulative probability for radial tires
DAILY DEMAND PROBABILITY CUMULATIVE PROBABILITY
0 0.05 0.05
1 0.10 0.15
2 0.20 0.35
3 0.30 0.65
4 0.20 0.85
5 0.15 1.00
Table 15.3
Harrys Auto Tire Example
Step 3: Setting random number intervals
We assign a set of numbers to represent each
possible value or outcome
These are random number intervals
A random number is a series of digits that have
been selected by a totally random process
The range of the random number intervals
corresponds exactly to the probability of the
outcomes as shown in Figure 15.2
Harrys Auto Tire Example
Graphical representation of the cumulative
probability
distribution
for radial
tires
00
86
85
66
65
36
35
16
15
06
05
01
R
a
n
d
o
m
N
u
m
b
e
r
s
Represents 4
Tires Demanded
Represents 1
Tire Demanded
0.05
0.15
0.35
0.65
0.85
1.00
1.00
0.80
0.60
0.40
0.20
0.00
0 1 2 3 4 5
Daily Demand for Radials
C
u
m
u
l
a
t
i
v
e
P
r
o
b
a
b
i
l
i
t
y
Figure 15.2
Harrys Auto Tire Example
Assignment of random number intervals for
Harrys Auto Tire
DAILY DEMAND PROBABILITY CUMULATIVE
PROBABILITY
INTERVAL OF
RANDOM NUMBERS
0 0.05 0.05 01 to 05
1 0.10 0.15 06 to 15
2 0.20 0.35 16 to 35
3 0.30 0.65 36 to 65
4 0.20 0.85 66 to 85
5 0.15 1.00 86 to 00
Table 15.4
Harrys Auto Tire Example
Step 4: Generating random numbers
Random numbers can be generated in several
ways
Large problems will use computer program to
generate the needed random numbers
For small problems, random processes like
roulette wheels or pulling chips from a hat may
be used
The most common manual method is to use a
random number table
Because everything is random in a random
number table, we can select numbers from
anywhere in the table to use in the simulation
Harrys Auto Tire Example
Table of random numbers (partial)
52 06 50 88 53 30 10 47 99 37
37 63 28 02 74 35 24 03 29 60
82 57 68 28 05 94 03 11 27 79
69 02 36 49 71 99 32 10 75 21
98 94 90 36 06 78 23 67 89 85
96 52 62 87 49 56 59 23 78 71
33 69 27 21 11 60 95 89 68 48
50 33 50 95 13 44 34 62 64 39
88 32 18 50 62 57 34 56 62 31
90 30 36 24 69 82 51 74 30 35
Table 15.5
Harrys Auto Tire Example
Step 5: Simulating the experiment
We select random numbers from Table 15.5
The number we select will have a corresponding
range in Table 15.4
We use the daily demand that corresponds to the
probability range aligned with the random
number
Harrys Auto Tire Example
Ten-day simulation of demand for radial tires
DAY RANDOM NUMBER SIMULATED DAILY DEMAND
1 52 3
2 37 3
3 82 4
4 69 4
5 98 5
6 96 5
7 33 2
8 50 3
9 88 5
10 90 5
39 = total 10-day demand
3.9 = average daily demand for tires
Table 15.6
Harrys Auto Tire Example
Note that the average demand from this
simulation (3.9 tires) is different from the
expected daily demand
Expected
daily
demand
tires of Demand tires of y Probabilit
5
0
i i
i
Average number of
nightly arrivals
arrivals 2.73
days 15
arrivals 41
Average number of barges
unloaded each day
unloadings 2.60
days 15
unloadings 39
Using Excel to Simulate the Port of
New Orleans Queuing Problem
An Excel model for the Port of New Orleans
queuing simulation
Program 15.4A
Using Excel to Simulate the Port of
New Orleans Queuing Problem
Output from the Excel formulas in Program 15.4A
Program 15.4B
Fixed Time Increment and Next Event
Increment Simulation Models
Simulation models are often classified into fixed
time increment models and next event increment
models
The terms refer to the frequency in which the
system status is updated
Fixed time increments update the status of the
system at fixed time intervals
Next event increment models update only when
the system status changes
Fixed event models randomly generate the
number of events that occur during a time period
Next event models randomly generate the time
that elapses until the next event occurs
Simulation Model for a
Maintenance Policy
Simulation can be used to analyze different
maintenance policies before actually
implementing them
Many options regarding staffing levels, parts
replacement schedules, downtime, and labor
costs can be compared
This can including completely shutting down
factories for maintenance
Three Hills Power Company
Three Hills provides power to a large city through
a series of almost 200 electric generators
The company is concerned about generator
failures because a breakdown costs about $75
per generator per hour
Their four repair people earn $30 per hour and
work rotating 8 hour shifts
Management wants to evaluate the
1. Service maintenance cost
2. Simulated machine breakdown cost
3. Total cost
Three Hills Power Company
There are two important maintenance system
components
Time between successive generator breakdowns
which varies from 30 minutes to three hours
The time it takes to repair the generators which
ranges from one to three hours in one hour
blocks
A next event simulation is constructed to study
this problem
Three Hills Power Company
Three Hills
flow diagram
Start
Generate random number
for Time Between
Breakdowns
Record actual clock time
of breakdown
Examine time previous
repair ends
Is the
repairperson
free to begin
repair?
Wait until previous
repair is completed
No
Yes
Figure 15.4 (a)
Yes
Generate random number
for repair time required
Compute time repair
completed
Compute hours of machine
downtime = Time repair
completed Clock time
of breakdown
Enough
breakdowns
simulated?
Compute downtime and
comparative cost data
End
No
Three Hills Power Company
Three Hills
flow diagram
Figure 15.4 (b)
Three Hills Power Company
Time between generator breakdowns at Three
Hills Power
TIME BETWEEN
RECORDED
MACHINE
FAILURES (HRS)
NUMBER
OF TIMES
OBSERVED PROBABILITY
CUMULATIVE
PROBABILITY
RANDOM
NUMBER
INTERVAL
0.5 5 0.05 0.05 01 to 05
1.0 6 0.06 0.11 06 to 11
1.5 16 0.16 0.27 12 to 27
2.0 33 0.33 0.60 28 to 60
2.5 21 0.21 0.81 61 to 81
3.0 19 0.19 1.00 82 to 00
Total 100 1.00
Table 15.13
Three Hills Power Company
Generator repair times required
REPAIR TIME
REQUIRED (HRS)
NUMBER
OF TIMES
OBSERVED PROBABILITY
CUMULATIVE
PROBABILITY
RANDOM
NUMBER
INTERVAL
1 28 0.28 0.28 01 to 28
2 52 0.52 0.80 29 to 80
3 20 0.20 1.00 81 to 00
Total 100 1.00
Table 15.14
Three Hills Power Company
Simulation of generator breakdowns and repairs
(1)
BREAKDOWN
NUMBER
(2)
RANDOM
NUMBER FOR
BREAKDOWNS
(3)
TIME
BETWEEN
BREAKDOWNS
(4)
TIME OF
BREAKDOWN
(5)
TIME REPAIR-
PERSON IS
FREE TO
BEGIN THIS
REPAIR
(6)
RANDOM
NUMBER
FOR
REPAIR
TIME
(7)
REPAIR
TIME
REQUIRED
(8)
TIME
REPAIR
ENDS
(9)
NUMBER
OF
HOURS
MACHINE
DOWN
1 57 2 02:00 02:00 07 1 03:00 1
2 17 1.5 03:30 03:30 60 2 05:30 2
3 36 2 05:30 05:30 77 2 07:30 2
4 72 2.5 08:00 08:00 49 2 10:00 2
5 85 3 11:00 11:00 76 2 13:00 2
6 31 2 13:00 13:00 95 3 16:00 3
7 44 2 15:00 16:00 51 2 18:00 3
8 30 2 17:00 18:00 16 1 19:00 2
9 26 1.5 18:30 19:00 14 1 20:00 1.5
10 09 1 19:30 20:00 85 3 23:00 3.5
11 49 2 21:30 23:00 59 2 01:00 3.5
12 13 1.5 23:00 01:00 85 3 04:00 5
13 33 2 01:00 04:00 40 2 06:00 5
14 89 3 04:00 06:00 42 2 08:00 4
15 13 1.5 05:30 08:00 52 2 10:00 4.5
Total 44
Table 15.15
Cost Analysis of Simulation
The simulation of 15 generator breakdowns
covers 34 hours of operation
The analysis of this simulation is
Service
maintenance
cost
= 34 hours of worker service time
x $30 per hour
= $1,020
Simulated machine
breakdown cost
= 44 total hours of breakdown
x $75 lost per hour of downtime
= $3,300
Total simulated
maintenance cost of
the current system
= Service cost + Breakdown cost
= $1,020 + $3,300
= $4,320
Cost Analysis of Simulation
The cost of $4,320 should be compared with
other alternative plans to see if this is a good
value
The company might explore options like adding
another repairperson
Strategies such as preventive maintenance might
also be simulated for comparison
Building an Excel Simulation Model
for Three Hills Power Company
An Excel spreadsheet model for simulating the
Three Hills Power Company maintenance problem
Program 15.5A
Building an Excel Simulation Model
for Three Hills Power Company
Output from Excel spreadsheet in Program 15.5A
Program 15.5B
Two Other Types of
Simulation Models
Simulation models are often broken into
three categories
The Monte Carlo method
Operational gaming
Systems simulation
Though theoretically different,
computerized simulation has tended to
blur the differences
Operational Gaming
Operational gaming refers to simulation involving
two or more competing players
The best examples of this are military games and
business games
These types of simulation allow the testing of
skills and decision-making in a competitive
environment
Systems Simulation
Systems simulation is similar in that allows users
to test various managerial policies and decisions
to evaluate their effect on the operating
environment
This models the dynamics of large systems
A corporate operating system might model sales,
production levels, marketing policies,
investments, union contracts, utility rates,
financing, and other factors
Economic simulations, often called econometric
models, are used by governments, bankers, and
large organizations to predict inflation rates,
domestic and foreign money supplies, and
unemployment levels
Gross National
Product
Inflation Rates
Unemployment
Rates
Monetary
Supplies
Population
Growth Rates
Systems Simulation
Inputs and outputs of a typical economic system
simulation
Econometric Model
(in Series of
Mathematical
Equations)
Income Tax
Levels
Corporate Tax
Rates
Interest Rates
Government
Spending
Foreign Trade
Policy
Figure 15.5
Verification and Validation
It is important that a simulation model be checked
to see that it is working properly and providing
good representation of the real world situation
The verification process involves determining
that the computer model is internally consistent
and following the logic of the conceptual model
Verification answers the question Did we build
the model right?
Validation is the process of comparing a
simulation model to the real system it represents
to make sure it is accurate
Validation answers the question Did we build the
right model?
Role of Computers in Simulation
Computers are critical in simulating complex
tasks
Three types of computer programming languages
are available to help the simulation process
General-purpose languages
Special-purpose simulation languages
1. These require less programming
2. Are more efficient and easier to check for errors
3. Have random number generators built in
Pre-written simulation programs built to handle a
wide range of common problems
Excel and add-ins can also be used for
simulation problems