Simulation
Simulation
SLIDES
.
. BY
.
.
.
.
John Loucks
.
. St. Edward’s Univ.
.
.
.
● 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
● 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.
© 2013 Cengage Learning. All Rights Reserved. May not be
scanned, copied 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.
● Traffic Flow
● The objective of this simulation is to
determine the effect of installing a right 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 right turn, and controllable inputs such
as the length of time the right turn signal is
on.
● For each setting of the controllable inputs,
values would be generated for the
probabilistic inputs, and the resulting vehicle
© 2013 waiting timesAllwould
Cengage Learning. be computed.
Rights Reserved. May not be
scanned, copied 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.
● 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
© 2013 10
Cengage Learning. .84
All Rights Reserved. May not+1/8
be 23
1/8
scanned, copied 18
Example: Dynogen, Inc.
● 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
© 2013 Ant. Learning. All Rights Reserved.
Cengage May not be
scanned, copied 33
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.
© 2013 Cengage Learning. All Rights Reserved. May not be
6copied
scanned, .40 San Ant. 14 .88
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%
Time Required to
Check a Passenger's
Passport and Visa Probability
20 seconds .20
40 seconds .40
60 seconds .30
80 seconds .10
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
© 2013 Cengage Learning. All Rights Reserved. May not be
.90 < 1.0
scanned, copied 42
Waiting Line Example: Wayne Airport
● Time Relationships
● 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
© 2013 Cengage Learning. with
All Rights theMay
Reserved. baggage
not be
scanned, copied 46
Waiting Line Example: Wayne Airport
● Time Relationships
● Explanation
For example, passenger 1 begins being
served by the passport ontrol 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.
This process continues in this manner.
© 2013 Cengage Learning. All Rights Reserved. May not be
scanned, copied 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.
● 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?
● 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
© 2013 Cengage Learning. the average
All Rights Reserved. waiting
May not be time.
scanned, copied 54
Other Simulation Issues
● Computer Implementation
● Verification and Validation
● Advantages and Disadvantages
of Using Simulation
● 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.