John Loucks: Slides by
John Loucks: Slides by
John
Loucks
St. Edward’s
University
© 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted
in a license distributed with a certain product or service or otherwise on a password-protected website for classroom use. 1
Chapter 12: Simulation
Simulation Modeling
Random Variables and Pseudo-Random Numbers
Time Increments
Experimental Design
Simulation Applications
Computer Implementation
Verification and Validation
Advantages and Disadvantages of Using Simulation
© 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted
in a license distributed with a certain product or service or otherwise on a password-protected website for classroom use. 2
Simulation Modeling
© 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted
in a license distributed with a certain product or service or otherwise on a password-protected website for classroom use. 3
What-If Analysis
© 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted
in a license distributed with a certain product or service or otherwise on a password-protected website for classroom use. 4
Random Variables
© 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted
in a license distributed with a certain product or service or otherwise on a password-protected website for classroom use. 5
Pseudo-Random Numbers
© 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted
in a license distributed with a certain product or service or otherwise on a password-protected website for classroom use. 6
Time Increments
© 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted
in a license distributed with a certain product or service or otherwise on a password-protected website for classroom use. 7
Experimental Design
© 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted
in a license distributed with a certain product or service or otherwise on a password-protected website for classroom use. 8
Experimental Design
© 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted
in a license distributed with a certain product or service or otherwise on a password-protected website for classroom use. 9
Simulation Applications
© 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted
in a license distributed with a certain product or service or otherwise on a password-protected website for classroom use. 10
Simulation Applications
Airline Overbooking
The objective of this simulation is to determine the
number of reservations an airline should accept for
a particular flight.
A simulation model is developed relating profit for
the flight to a probabilistic input, the number of
passengers with a reservation who show up and
use their reservation, and a controllable input, the
number of reservations accepted for the flight.
For each selected value for the controllable input, a
variety of possible values will be generated for the
number of passengers who show up, and the
resulting profit can be computed.
© 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted
in a license distributed with a certain product or service or otherwise on a password-protected website for classroom use. 11
Simulation Applications
Inventory Policy
The objective of this simulation is to choose an
inventory policy that will provide good customer
service at a reasonable cost.
A model is developed relating two output measures,
total inventory cost and the service level, to
probabilistic inputs, such as product demand and
delivery lead time from vendors, and controllable
inputs, such as the order quantity and the reorder
point.
For each setting of the controllable inputs, a variety
of possible values would be generated for the
probabilistic inputs, and the resulting cost and
service levels would be computed.
© 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted
in a license distributed with a certain product or service or otherwise on a password-protected website for classroom use. 12
Simulation Applications
Traffic Flow
The objective of this simulation is to determine the
effect of installing a left turn signal on the flow of
traffic through a busy intersection.
A model is developed relating waiting time for
vehicles to get through the intersection to
probabilistic inputs such as the number of vehicle
arrivals and the fraction that want to make a left turn,
and controllable inputs such as the length of time the
left turn signal is on.
For each setting of the controllable inputs, values
would be generated for the probabilistic inputs, and
the resulting vehicle waiting times would be
computed.
© 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted
in a license distributed with a certain product or service or otherwise on a password-protected website for classroom use. 13
Simulation Applications
Waiting Lines
The objective of this simulation is to determine the
waiting times for customers at a bank’s automated
teller machine (ATM).
A model is developed relating customer waiting times
to probabilistic inputs such as customer arrivals and
service times, and a controllable input, the number of
ATM machines installed.
For each value of the controllable input (the number
of ATM machines), a variety of values would be
generated for the probabilistic inputs and the
customer waiting times would be computed.
© 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted
in a license distributed with a certain product or service or otherwise on a password-protected website for classroom use. 14
Example: Dynogen, Inc.
© 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted
in a license distributed with a certain product or service or otherwise on a password-protected website for classroom use. 15
Example: Dynogen, Inc.
© 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted
in a license distributed with a certain product or service or otherwise on a password-protected website for classroom use. 17
Example: Dynogen, Inc.
Simulation Worksheet
Trade Random Price Stock
Number Number Change Price
1 .21 -1/8 22 7/8
2 .84 +1/8 23
3 .07 -3/8 22 5/8
4 .30 0 22 5/8
5 .94 +3/8 23
6 .57 0 23
7 .57 0 23
8 .19 -1/8 22 7/8
9 .84 +1/8 23
10 .84 +1/8 23 1/8
© 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted
in a license distributed with a certain product or service or otherwise on a password-protected website for classroom use. 18
Example: Dynogen, Inc.
© 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted
in a license distributed with a certain product or service or otherwise on a password-protected website for classroom use. 19
Inventory Example: Shelly’s Supermarket
© 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted
in a license distributed with a certain product or service or otherwise on a password-protected website for classroom use. 20
Inventory Example: Shelly’s Supermarket
© 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted
in a license distributed with a certain product or service or otherwise on a password-protected website for classroom use. 21
Inventory Example: Shelly’s Supermarket
© 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted
in a license distributed with a certain product or service or otherwise on a password-protected website for classroom use. 22
Inventory Example: Shelly’s Supermarket
© 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted
in a license distributed with a certain product or service or otherwise on a password-protected website for classroom use. 25
Inventory Example: Shelly’s Supermarket
© 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted
in a license distributed with a certain product or service or otherwise on a password-protected website for classroom use. 28
Example: Mark Koff’s Process
© 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted
in a license distributed with a certain product or service or otherwise on a password-protected website for classroom use. 29
Example: Mark Koff’s Process
© 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted
in a license distributed with a certain product or service or otherwise on a password-protected website for classroom use. 30
Example: Mark Koff’s Process
© 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted
in a license distributed with a certain product or service or otherwise on a password-protected website for classroom use. 31
Example: Mark Koff’s Process
© 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted
in a license distributed with a certain product or service or otherwise on a password-protected website for classroom use. 32
Example: Mark Koff’s Process
Simulation Worktable
Starting in Houston
Random Day's Random Day's
Day Number Location Day Number Location
1 .93 Houston 9 .72 San Ant.
2 .63 Houston 10 .89 San Ant.
3 .26 Houston 11 .49 San Ant.
4 .16 San Ant. 12 .64 San Ant.
5 .21 San Ant. 13 .91 San Ant.
6 .26 San Ant. 14 .02 Austin
7 .70 San Ant. 15 .52 Austin
8 .55 San Ant. 16 .69 San Ant.
© 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted
in a license distributed with a certain product or service or otherwise on a password-protected website for classroom use. 33
Example: Mark Koff’s Process
© 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted
in a license distributed with a certain product or service or otherwise on a password-protected website for classroom use. 34
Example: Mark Koff’s Process
Simulation Worksheet
Starting in Austin
Random Day's Random Day's
Day Number Location Day Number Location
1 .13 Austin 9 .23 San Ant.
2 .08 Austin 10 .64 San Ant.
3 .60 San Ant. 11 .36 San Ant.
4 .13 Austin 12 .56 San Ant.
5 .68 San Ant. 13 .25 San Ant.
6 .40 San Ant. 14 .88 San Ant.
7 .40 San Ant. 15 .18 Austin
8 .27 San Ant. 16 .74 San Ant.
© 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted
in a license distributed with a certain product or service or otherwise on a password-protected website for classroom use. 35
Example: Mark Koff’s Process
Simulation Summary
Starting in Houston
Austin = 2/16 = 12.50%
San Antonio = 11/16 = 68.75%
Houston = 3/16 = 18.75%
Starting in Austin
Austin = 4/16 = 25%
San Antonio = 12/16 = 75%
Houston = 0/16 = 0%
© 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted
in a license distributed with a certain product or service or otherwise on a password-protected website for classroom use. 36
Waiting Line Example: Wayne Airport
© 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted
in a license distributed with a certain product or service or otherwise on a password-protected website for classroom use. 37
Waiting Line Example: Wayne Airport
© 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted
in a license distributed with a certain product or service or otherwise on a password-protected website for classroom use. 38
Waiting Line Example: Wayne Airport
Time Required to
Check a Passenger's
Passport and Visa Probability
20 seconds .20
40 seconds .40
60 seconds .30
80 seconds .10
© 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted
in a license distributed with a certain product or service or otherwise on a password-protected website for classroom use. 39
Waiting Line Example: Wayne Airport
© 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted
in a license distributed with a certain product or service or otherwise on a password-protected website for classroom use. 40
Waiting Line Example: Wayne Airport
© 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted
in a license distributed with a certain product or service or otherwise on a password-protected website for classroom use. 41
Waiting Line Example: Wayne Airport
Time Required to
Check a Passenger's Random
Passport and Visa Probability Numbers
20 seconds .20 .00 < .20
40 seconds .40 .20 < .60
60 seconds .30 .60 < .90
80 seconds .10 .90 < 1.0
© 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted
in a license distributed with a certain product or service or otherwise on a password-protected website for classroom use. 42
Waiting Line Example: Wayne Airport
© 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted
in a license distributed with a certain product or service or otherwise on a password-protected website for classroom use. 43
Waiting Line Example: Wayne Airport
© 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted
in a license distributed with a certain product or service or otherwise on a password-protected website for classroom use. 44
Waiting Line Example: Wayne Airport
Time Relationships
Time a passenger begins service
by the passport inspector
= (Time the previous passenger started passport service)
+ (Time of previous passenger's passport service)
© 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted
in a license distributed with a certain product or service or otherwise on a password-protected website for classroom use. 45
Waiting Line Example: Wayne Airport
Time Relationships
Time a passenger begins service
by the baggage inspector
( If passenger does not wait in line for baggage
inspection)
= (Time passenger completes service
with the passport control inspector)
(If the passenger does wait in line for baggage
inspection)
= (Time previous passenger completes
service with the baggage inspector)
© 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted
in a license distributed with a certain product or service or otherwise on a password-protected website for classroom use. 46
Waiting Line Example: Wayne Airport
Time Relationships
Time a customer completes service
at the baggage inspector
= (Time customer begins service with baggage
inspector) + (Time required for baggage inspection)
© 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted
in a license distributed with a certain product or service or otherwise on a password-protected website for classroom use. 47
Waiting Line Example: Wayne Airport
© 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted
in a license distributed with a certain product or service or otherwise on a password-protected website for classroom use. 48
Waiting Line Example: Wayne Airport
© 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted
in a license distributed with a certain product or service or otherwise on a password-protected website for classroom use. 49
Waiting Line Example: Wayne Airport
© 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted
in a license distributed with a certain product or service or otherwise on a password-protected website for classroom use. 50
Waiting Line Example: Wayne Airport
Explanation
For example, passenger 1 begins being served by
the passport control inspector immediately. His service
time is 1:20 (80 seconds) at which time he goes
immediately to the baggage inspector who waves him
through without inspection.
Passenger 2 begins service with passport inspector
1:20 minutes (80 seconds) after arriving there (as this
is when passenger 1 is finished) and requires 1:00
minute (60 seconds) for passport inspection. He is
waved through baggage inspection as well.
The process continues in this manner.
© 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted
in a license distributed with a certain product or service or otherwise on a password-protected website for classroom use. 51
Waiting Line Example: Wayne Airport
Question
How long will it take for the first 10 passengers to
clear customs?
Answer
Passenger 10 clears customs after 9 minutes and
20 seconds.
© 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted
in a license distributed with a certain product or service or otherwise on a password-protected website for classroom use. 52
Waiting Line Example: Wayne Airport
Question
What is the average length of time a customer
waits before having his bags inspected after he clears
passport control? How is this estimate biased?
© 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted
in a license distributed with a certain product or service or otherwise on a password-protected website for classroom use. 53
Waiting Line Example: Wayne Airport
Answer
For each passenger calculate his waiting time:
(Baggage Inspection Begins) - (Passport Control
Ends)
= 0+0+0+40+0+20+20+40+40+0 = 120 seconds.
120/10 = 12 seconds per passenger
This is a biased estimate because we assume
that the simulation began with the system empty.
Thus, the results tend to underestimate the average
waiting time.
© 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted
in a license distributed with a certain product or service or otherwise on a password-protected website for classroom use. 54
Other Simulation Issues
Computer Implementation
Verification and Validation
Advantages and Disadvantages
of Using Simulation
© 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted
in a license distributed with a certain product or service or otherwise on a password-protected website for classroom use. 55
Computer Implementation
Spreadsheet Add-Ins
The use of spreadsheets for simulation has grown
rapidly in recent years.
Two popular spreadsheet add-in packages are
Crystal Ball and @Risk.
Spreadsheets are generally limited to smaller, less
complex systems.
© 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted
in a license distributed with a certain product or service or otherwise on a password-protected website for classroom use. 56
Computer Implementation
© 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted
in a license distributed with a certain product or service or otherwise on a password-protected website for classroom use. 57
Computer Implementation
© 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted
in a license distributed with a certain product or service or otherwise on a password-protected website for classroom use. 58
Model Verification and Validation
© 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted
in a license distributed with a certain product or service or otherwise on a password-protected website for classroom use. 59
Model Verification and Validation
© 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted
in a license distributed with a certain product or service or otherwise on a password-protected website for classroom use. 60
Advantages of Using Simulation
© 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted
in a license distributed with a certain product or service or otherwise on a password-protected website for classroom use. 61
Disadvantages of Using Simulation
© 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted
in a license distributed with a certain product or service or otherwise on a password-protected website for classroom use. 62
End of Chapter 12
© 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted
in a license distributed with a certain product or service or otherwise on a password-protected website for classroom use. 63