Chapter 1 -- What is Simulation?

advertisement
OUTLINE
• Basic Concepts in Modeling and
Simulation
• Building Simulation Models
• Verification and Validation
• Designing Experiments
• Output Analysis
• Applications of Simulation
Modeling
Simulation with Arena, 3rd ed.
Chapter 1 – What Is Simulation?
Slide 1 of 23
SIMULATION
Imitate the operations of a facility or process,
usually via computer
 What’s being simulated is the system
 To study system, often make
assumptions/approximations, both logical and
mathematical, about how it works
 These assumptions form a model of the system
 If model structure is simple enough, could use
mathematical methods to get exact information on
questions of interest — analytical solution
Simulation Modeling and Analysis
Slide 2 of 51
Ways to Study Systems
– Simulation is “method
of last resort?” Maybe
…
– But with simulation
there’s no need (or less
need) to “look where
the light is”
Work With the System?
— unquestionably
looking at the right thing
 But it’s often impossible to do so in
reality with the actual system
– System doesn’t exist
– Would be disruptive, expensive, or
dangerous
– Advantage
Slide 4 of 23
Computer Simulation
•
•
•
•
•
Methods and applications to imitate or mimic real
systems usually via computer.
No longer regarded as the approach of “last
resort”.
Today, it is viewed as an indispensable problemsolving methodology for engineers, designers,
and managers.
Can be used to study simple models but should
not use it if an analytical solution is available
Real power of simulation is in studying complex
models
Slide 5 of 23
Applications of Simulation
•
Applies in many fields and industries
–
–
–
–
–
–
–
–
–
–
–
–
–
–
Manufacturing facility
Bank operation
Airport operations (passengers, security, planes, crews, baggage)
Transportation/logistics/distribution operation
Hospital facilities (emergency room, operating room, admissions)
Computer network
Freeway system
Business process (insurance office)
Criminal justice system
Chemical plant
Fast-food restaurant
Supermarket
Theme park
Emergency-response system
Slide 6 of 23
Advantages of Simulation
•
•
•
•
•
Flexibility to model things as they are (even if messy and
complicated) - Allows uncertainty, nonstationarity in
modeling
New policies, operating procedures can be explored
without disrupting ongoing operation of the real system.
New hardware designs, physical layouts, transportation
systems can be tested without committing resources for
their acquisition.
Time can be compressed or expanded to allow for a
speed-up or slow-down of the phenomenon
Advances in simulation software, computing and
information technology are all increasing popularity of
simulation
Slide 7 of 23
The Bad News
•
•
•
•
•
Don’t get exact answers, only approximations,
estimates
Model building requires special training.
Simulation modeling and analysis can be time
consuming and expensive.
Simulation results can be difficult to interpret.
Get random output (RIRO) from stochastic
simulations

Statistical design, analysis of simulation experiments
Slide 8 of 23
SIMULATION vs. OPTIMIZATION
In an optimization model, the values of the
decision variables are outputs that will
maximize (or minimize) the value of the
objective function.
In a simulation model, the values of the
decision variables (controllable ones) are
inputs. The model evaluates the objective
function for a particular set of values and
provides various performance measures.
RIRO (Random input Random Output)
Simulation Model Taxonomy
The System:
A Simple Processing System
Machine
(Server)
Arriving
Blank Parts
•
6
5
Queue (FIFO)
4
Departing
Finished Parts
Part in Service
General intent:


•
7
Estimate expected production
Waiting time in queue, queue length, proportion of time
machine is busy
Time units




Can use different units in different places … must declare
Be careful to check the units when specifying inputs
Declare base time units for internal calculations, outputs
Be reasonable (interpretation, roundoff error)
Chapter 2 – Fundamental
Slide 11 of 46
Simulation with
Model Specifics
•
•
•
•
Initially (time 0) empty and idle
Base time units: minutes
Input data (assume given for now …), in minutes:
Part Number
1
2
3
4
5
6
7
8
9
10
11
.
.
Arrival Time
0.00
1.73
3.08
3.79
4.41
18.69
19.39
34.91
38.06
39.82
40.82
.
.
Interarrival Time
1.73
1.35
0.71
0.62
14.28
0.70
15.52
3.15
1.76
1.00
.
.
.
Service Time
2.90
1.76
3.39
4.52
4.46
4.36
2.07
3.36
2.37
5.38
.
.
.
Stop when 20 minutes of (simulated) time have
passed
Chapter 2 – Fundamental
Slide 12 of 46
Simulation with
Simulation by Hand:
Setup
System
Clock
Number of
completed waiting
times in queue
Total of
waiting times in queue
B(t)
Q(t)
Arrival times of
custs. in queue
Area under
Q(t)
Event calendar
Area under
B(t)
4
Q(t) graph
3
2
1
0
B(t) graph
0
5
10
15
20
0
5
10
15
20
2
1
0
Interarrival times
Time (Minutes)
1.73, 1.35, 0.71, 0.62, 14.28, 0.70, 15.52, 3.15, 1.76, 1.00, ...
Service times
2.90, 1.76, 3.39, 4.52, 4.46, 4.36, 2.07, 3.36, 2.37, 5.38, ...
Chapter 2 – Fundamental
Slide 13 of 46
Simulation with
Simulation by Hand:
t = 0.00, Initialize
System
Number of
completed waiting
times in queue
0
Clock
B(t)
Q(t)
0.00
0
0
Arrival times of
Event calendar
custs. in queue
[1, 0.00,
Arr]
<empty> [–, 20.00,
End]
Total of
waiting times in queue
Area under
Q(t)
Area under
B(t)
0.00
0.00
0.00
4
Q(t) graph
3
2
1
0
B(t) graph
0
5
10
15
20
0
5
10
15
20
2
1
0
Interarrival times
Time (Minutes)
1.73, 1.35, 0.71, 0.62, 14.28, 0.70, 15.52, 3.15, 1.76, 1.00, ...
Service times
2.90, 1.76, 3.39, 4.52, 4.46, 4.36, 2.07, 3.36, 2.37, 5.38, ...
Chapter 2 – Fundamental
Slide 14 of 46
Simulation with
Simulation by Hand:
t = 0.00, Arrival of Part 1
System
1
Number of
completed waiting
times in queue
1
Clock
B(t)
Q(t)
Total of
waiting times in queue
Arrival times of
Event calendar
custs. in queue
[2, 1.73,
Arr]
<empty> [1, 2.90,
Dep]
[–, 20.00,
End]
Area under
Area under
Q(t)
B(t)
0.00
1
0
0.00
0.00
0.00
4
Q(t) graph
3
2
1
0
B(t) graph
0
5
10
15
20
0
5
10
15
20
2
1
0
Interarrival times
Time (Minutes)
1.73, 1.35, 0.71, 0.62, 14.28, 0.70, 15.52, 3.15, 1.76, 1.00, ...
Service times
2.90, 1.76, 3.39, 4.52, 4.46, 4.36, 2.07, 3.36, 2.37, 5.38, ...
Chapter 2 – Fundamental
Slide 15 of 46
Simulation with
Simulation by Hand:
t = 1.73, Arrival of Part 2
System
2
1
Number of
completed waiting
times in queue
1
Clock
B(t)
Q(t)
Total of
waiting times in queue
Arrival times of
Event calendar
custs. in queue
[1, 2.90,
Dep]
(1.73) [3, 3.08,
Arr]
[–, 20.00,
End]
Area under
Area under
Q(t)
B(t)
1.73
1
1
0.00
0.00
1.73
4
Q(t) graph
3
2
1
0
B(t) graph
0
5
10
15
20
0
5
10
15
20
2
1
0
Interarrival times
Time (Minutes)
1.73, 1.35, 0.71, 0.62, 14.28, 0.70, 15.52, 3.15, 1.76, 1.00, ...
Service times
2.90, 1.76, 3.39, 4.52, 4.46, 4.36, 2.07, 3.36, 2.37, 5.38, ...
Chapter 2 – Fundamental
Slide 16 of 46
Simulation with
Simulation by Hand:
t = 2.90, Departure of Part 1
System
2
Number of
completed waiting
times in queue
2
Clock
B(t)
Q(t)
Total of
waiting times in queue
Arrival times of
Event calendar
custs. in queue
[3, 3.08,
Arr]
<empty> [2, 4.66,
Dep]
[–, 20.00,
End]
Area under
Area under
Q(t)
B(t)
2.90
1
0
1.17
1.17
2.90
4
Q(t) graph
3
2
1
0
B(t) graph
0
5
10
15
20
0
5
10
15
20
2
1
0
Interarrival times
Time (Minutes)
1.73, 1.35, 0.71, 0.62, 14.28, 0.70, 15.52, 3.15, 1.76, 1.00, ...
Service times
2.90, 1.76, 3.39, 4.52, 4.46, 4.36, 2.07, 3.36, 2.37, 5.38, ...
Chapter 2 – Fundamental
Slide 17 of 46
Simulation with
Simulation by Hand:
t = 3.08, Arrival of Part 3
System
3
2
Number of
completed waiting
times in queue
2
Clock
B(t)
Q(t)
Total of
waiting times in queue
Arrival times of
Event calendar
custs. in queue
[4, 3.79,
Arr]
(3.08) [2, 4.66,
Dep]
[–, 20.00,
End]
Area under
Area under
Q(t)
B(t)
3.08
1
1
1.17
1.17
3.08
4
Q(t) graph
3
2
1
0
B(t) graph
0
5
10
15
20
0
5
10
15
20
2
1
0
Interarrival times
Time (Minutes)
1.73, 1.35, 0.71, 0.62, 14.28, 0.70, 15.52, 3.15, 1.76, 1.00, ...
Service times
2.90, 1.76, 3.39, 4.52, 4.46, 4.36, 2.07, 3.36, 2.37, 5.38, ...
Chapter 2 – Fundamental
Slide 18 of 46
Simulation with
Simulation by Hand:
t = 3.79, Arrival of Part 4
System
4
3
2
Number of
completed waiting
times in queue
2
Clock
B(t)
Q(t)
Total of
waiting times in queue
Arrival times of
Event calendar
custs. in queue
[5, 4.41,
Arr]
(3.79, 3.08) [2, 4.66,
Dep]
[–, 20.00,
End]
Area under
Area under
Q(t)
B(t)
3.79
1
2
1.17
1.88
3.79
4
Q(t) graph
3
2
1
0
B(t) graph
0
5
10
15
20
0
5
10
15
20
2
1
0
Interarrival times
Time (Minutes)
1.73, 1.35, 0.71, 0.62, 14.28, 0.70, 15.52, 3.15, 1.76, 1.00, ...
Service times
2.90, 1.76, 3.39, 4.52, 4.46, 4.36, 2.07, 3.36, 2.37, 5.38, ...
Chapter 2 – Fundamental
Slide 19 of 46
Simulation with
Simulation by Hand:
t = 4.41, Arrival of Part 5
System
5
4
3
2
Number of
completed waiting
times in queue
2
Clock
B(t)
Q(t)
Total of
waiting times in queue
Arrival times of
Event calendar
custs. in queue
[2, 4.66,
Dep]
(4.41, 3.79, 3.08) [6, 18.69,
Arr]
[–, 20.00,
End]
Area under
Area under
Q(t)
B(t)
4.41
1
3
1.17
3.12
4.41
4
Q(t) graph
3
2
1
0
B(t) graph
0
5
10
15
20
0
5
10
15
20
2
1
0
Interarrival times
Time (Minutes)
1.73, 1.35, 0.71, 0.62, 14.28, 0.70, 15.52, 3.15, 1.76, 1.00, ...
Service times
2.90, 1.76, 3.39, 4.52, 4.46, 4.36, 2.07, 3.36, 2.37, 5.38, ...
Chapter 2 – Fundamental
Slide 20 of 46
Simulation with
Simulation by Hand:
t = 4.66, Departure of Part 2
System
5
4
3
Number of
completed waiting
times in queue
3
Clock
B(t)
Q(t)
Total of
waiting times in queue
Arrival times of
Event calendar
custs. in queue
[3, 8.05,
Dep]
(4.41, 3.79) [6, 18.69,
Arr]
[–, 20.00,
End]
Area under
Area under
Q(t)
B(t)
4.66
1
2
2.75
3.87
4.66
4
Q(t) graph
3
2
1
0
B(t) graph
0
5
10
15
20
0
5
10
15
20
2
1
0
Interarrival times
Time (Minutes)
1.73, 1.35, 0.71, 0.62, 14.28, 0.70, 15.52, 3.15, 1.76, 1.00, ...
Service times
2.90, 1.76, 3.39, 4.52, 4.46, 4.36, 2.07, 3.36, 2.37, 5.38, ...
Chapter 2 – Fundamental
Slide 21 of 46
Simulation with
Simulation by Hand:
t = 12.57, Departure of Part 4
System
5
Number of
completed waiting
times in queue
5
Clock
B(t)
Q(t)
12.57
1
0
Arrival times of
custs. in queue
Total of
waiting times in queue
Area under
Q(t)
15.17
15.17
Event calendar
[5, 17.03,
Dep]
() [6, 18.69,
Arr]
[–, 20.00,
End]
Area under
B(t)
12.57
4
Q(t) graph
3
2
1
0
B(t) graph
0
5
10
15
20
0
5
10
15
20
2
1
0
Interarrival times
Time (Minutes)
1.73, 1.35, 0.71, 0.62, 14.28, 0.70, 15.52, 3.15, 1.76, 1.00, ...
Service times
2.90, 1.76, 3.39, 4.52, 4.46, 4.36, 2.07, 3.36, 2.37, 5.38, ...
Chapter 2 – Fundamental
Slide 22 of 46
Simulation with
Simulation by Hand:
t = 17.03, Departure of Part 5
System
Number of
completed waiting
times in queue
5
Clock
B(t)
Q(t)
17.03
0
0
Arrival times of
custs. in queue
()
Event calendar
[6, 18.69,
Arr]
[–, 20.00,
End]
Total of
waiting times in queue
Area under
Q(t)
Area under
B(t)
15.17
15.17
17.03
4
Q(t) graph
3
2
1
0
B(t) graph
0
5
10
15
20
0
5
10
15
20
2
1
0
Interarrival times
Time (Minutes)
1.73, 1.35, 0.71, 0.62, 14.28, 0.70, 15.52, 3.15, 1.76, 1.00, ...
Service times
2.90, 1.76, 3.39, 4.52, 4.46, 4.36, 2.07, 3.36, 2.37, 5.38, ...
Chapter 2 – Fundamental
Slide 23 of 46
Simulation with
Simulation by Hand:
t = 18.69, Arrival of Part 6
System
6
Number of
completed waiting
times in queue
6
Clock
B(t)
Q(t)
18.69
1
0
Arrival times of
custs. in queue
()
Total of
waiting times in queue
Area under
Q(t)
Event calendar
[7, 19.39,
Arr]
[–, 20.00,
End]
[6, 23.05,
Dep]
Area under
B(t)
15.17
15.17
17.03
4
Q(t) graph
3
2
1
0
B(t) graph
0
5
10
15
20
0
5
10
15
20
2
1
0
Interarrival times
Time (Minutes)
1.73, 1.35, 0.71, 0.62, 14.28, 0.70, 15.52, 3.15, 1.76, 1.00, ...
Service times
2.90, 1.76, 3.39, 4.52, 4.46, 4.36, 2.07, 3.36, 2.37, 5.38, ...
Chapter 2 – Fundamental
Slide 24 of 46
Simulation with
Simulation by Hand:
t = 19.39, Arrival of Part 7
System
7
6
Number of
completed waiting
times in queue
6
Clock
B(t)
Q(t)
Total of
waiting times in queue
Arrival times of
Event calendar
custs. in queue
[–, 20.00,
End]
(19.39) [6, 23.05,
Dep]
[8, 34.91,
Arr]
Area under
Area under
Q(t)
B(t)
19.39
1
1
15.17
15.17
17.73
4
Q(t) graph
3
2
1
0
B(t) graph
0
5
10
15
20
0
5
10
15
20
2
1
0
Interarrival times
Time (Minutes)
1.73, 1.35, 0.71, 0.62, 14.28, 0.70, 15.52, 3.15, 1.76, 1.00, ...
Service times
2.90, 1.76, 3.39, 4.52, 4.46, 4.36, 2.07, 3.36, 2.37, 5.38, ...
Chapter 2 – Fundamental
Slide 25 of 46
Simulation with
Simulation by Hand:
t = 20.00, The End
System
7
6
Number of
completed waiting
times in queue
6
Clock
B(t)
Q(t)
20.00
1
1
Arrival times of
Event calendar
custs. in queue
[6, 23.05,
Dep]
(19.39) [8, 34.91,
Arr]
Total of
waiting times in queue
Area under
Q(t)
Area under
B(t)
15.17
15.78
18.34
4
Q(t) graph
3
2
1
0
B(t) graph
0
5
10
15
20
0
5
10
15
20
2
1
0
Interarrival times
Time (Minutes)
1.73, 1.35, 0.71, 0.62, 14.28, 0.70, 15.52, 3.15, 1.76, 1.00, ...
Service times
2.90, 1.76, 3.39, 4.52, 4.46, 4.36, 2.07, 3.36, 2.37, 5.38, ...
Chapter 2 – Fundamental
Slide 26 of 46
Simulation with
Simulation by Hand:
Finishing Up
•
Average waiting time in queue:
Total of times in queue 15.17

 2.53 minutes per part
No. of times in queue
6
•
Time-average number in queue:
Area under Q(t ) curve 15.78

 0.79 part
Final clock value
20
•
Utilization of drill press:
Area under B(t ) curve 18.34

 0.92 (dimension less)
Final clock value
20
Chapter 2 – Fundamental
Slide 27 of 46
Simulation with
Randomness in Simulation
•
•
The above was just one “replication” — a sample
of size one (not worth much)
Made a total of five replications:
Note
substantial
variability
across
replications
•
Confidence intervals for expected values:


In general, X  tn 1,1 / 2s / n
For expected total production, 3.80  (2.776)(1.64 / 5 )
3.80  2.04
Chapter 2 – Fundamental
Slide 28 of 46
Simulation with
Steps in a Simulation Study
•
•
•
•
•
•
•
•
•
Understand the system
Be clear about the goals
Formulate the model representation
Translate into modeling software
Verify “program”
Validate model
Design experiments
Make runs
Analyze, get insight, document results
Chapter 2 – Fundamental
Slide 29 of 46
Simulation with
A Simulation Project Requires to Put together a
Complete
Mix of Skills on the Team
-Knowledge of the system under investigation
-System analyst skills (model formulation)
-Model building skills (model Programming)
-Data collection skills
-Statistical skills (input data representation,
experimental design, output analysis)
-Management skills (to get everyone pulling in the
same direction)
Introduction
30
Steps in a Simulation
Project
Data Collection:Input Data Modeling
• Input Analysis activities consist of:



data collection
data analysis
goodness-of-fit testing (Chi-Square
and the Kolmogrov-Smirnov tests).
• The quality of the output is no better than
the quality of inputs (GIGO principle).
Model Translation: Choose The
Appropriate Simulation Tools
Assuming Simulation is the appropriate
means, three alternatives exist:
1.
Build Model in a General Purpose
Language
2.
Build Model in a General Simulation
Language
3.
Use a Special Purpose Simulation
Package
Introduction
33
Simulation Languages
• ARENA, Extend, AweSim, Micro Saint,
GPSS/SLX, SIMPLE++, SIMUL8 and etc.



Less flexibility
Easier to learn
More costly
Slide 34 of 23
SPECIAL PURPOSE
SIMULATION PACKAGES
NETWORK II.5: Simulator for computer
systems
 MEDMODEL: Health Care
OPNET: Simulator for communication
networks, including wireless networks
SIMFACTORY: Simulator for manufacturing
operations
Advantages: Short learning cycle, No programming
Disadvantages: High Cost, Limited Flexibility
Introduction
35
Two Simulation Modeling Approaches
1. Event-Scheduling Approach
2. Process-Interaction Approach
Chapter 2 – Fundamental
Slide 36 of 46
Simulation with
Steps in a Simulation
Project
Real-World System
Validation
Simulation Model
(Conceptual Model)
Verification
Simulation Program
Verfication & Validation
3/23/2016
38
Calibration and Validation
of Models
Compare model
Initial
Model
to reality
Revise
Compare
revised model
Real
System
to reality
First revision
of model
Revise
Compare 2nd
revised model
to reality
Second
revision
of model
Revise
<Iterative process of calibrating a model>
Verification and Validation
39
Example
• Suppose, in our current system, average
•
•
order-filling time is 16.2 hours for orders
received via the web. We hope to reduce this
by making changes in our logistics system.
We can check the validity of our simulation
model via a hypothesis test.
We can set up the following test:
H0: simulation mean fill time = 16.2
H1: simulation mean fill time  16.2
3/23/2016
40
Testing
•
Run R replications of the simulation model, collecting
the average fill time Y1,…,YR on each replication.
• If the data are approximately normally distributed, then
we reject H0 if
| Y  16.2 |
 t / 2,R1
S/ R
3/23/2016
41
What can we conclude?
• If we accept, then the model is valid?
No! The model and the real system are
not the same; if we make R large
enough, we will eventually reject.
If we reject, then the model is invalid?
 No! It may be close enough for the
decision we need to make; we might
have accepted if R was smaller.

•
3/23/2016
42
Steps in a Simulation
Project
Experimental Design in Simulation
•
•
•
There is a huge amount of literature on
experimental design and most of it is applicable
to simulation.
Experimental design allows us to efficiently
explore the relationship between inputs and
outputs.
In experimental design terminology, the input
parameters and structural assumptions are called
factors (qualitative, quantitative, controllable,
uncontrollable) and the output performance
measures are called responses.
Experimental I/O Examples
Example
Inputs (factors)
Outputs (responses)
Chemical reaction
Pressure
Temperature
Catalyst concentration
Yield
Growing tomatoes
Fertilizer
Soil pH
Seed hybrid
Water
Yield
Hardiness
Simulation of a
manufacturing
system
Job dispatch rule
Number of machines
Machines’ reliability
Mean downtimes
Throughput
Time in system
Utilizations
Queue sizes
What Outputs (Responses) to
Collect?
There are typically two types of
output:
 Discrete-Time
Output Data
 Continuous-Time
Output Data
Discrete-time Output Data
There is a natural “first” observation, “second”
observation, etc.—but can only observe them when they
“happen”.
If Wi = time in system for the ith part produced (for i =
1, 2, ..., N), and there are N parts produced during the
simulation
Wi
1
2
3
..................................
i
N
Continuous-time Output Data
Can jump into system at any point in time (real,
continuous time) and take a “snapshot” of somethingthere is no natural first or second observation.
If Q(t) = number of parts in a particular queue at time t
between [0,T] and we run simulation for T units of
simulated time
3
2
Q(t )
1
0
t
T
DIDO Vs. RIRO Simulation
Inputs:
Cycle
times
Interarrival
times
Batch
sizes
Simulation Model
Outputs:
Hourly
production
Machine
utilization
RIRO
Steps in a Simulation
Project
OUTPUT ANALYSIS
•
Terminating (Transient) Simulations (Starts at time 0 under
well-specified initial conditions)
Example: Bank opens at 8:30 am with no customers present
and all tellers are available, and closes at 4:30 pm
• Non-terminating (Steady-state) Simulations (Initial
conditions are defined by the analyst)
Examples: assembly lines that shut down infrequently,
telephone systems, hospital emergency rooms, airport
Whether a simulation is considered to be terminating or nonterminating depends on
 both the objectives of the simulation study and
 the nature of the system.
Simulation with Arena, 3rd ed.
Chapter 1 – What Is Simulation?
Slide 51 of 23
Analysis for Steady-State
Simulations
Objective: Estimate the steady state mean
  limi  E (Yi )
Basic question: Should you do many short runs or one long
run ?????
Many short
runs
X1
X2
X3
X4
X5
One long
run
X1
Simulation with ARENA©
•
What is ARENA©?
Arena is a Microsoft Windows based application
package for simulation modeling and analysis. It
is a product of Rockwell Software, Inc.
Current version: 14.5 (2014)
•
ARENA’s User interface: GUI, interactive and
menu driven.
Cellular Manufacturing
• Cells 1, 2, and 4 each have a single machine, Cell 3
has 2 machines. The two machines in Cell 3 are
different: the newer one can process parts in 80%
of the time of the older one.
• The system produces 3 parts types, each visiting a
different sequence of stations.
• All the process times are triangularly distributed.
• We will collect statistics on resource utilization, time
and number in queue, as well as cycle time (time in
system, from entry to exit) by part type. Initially,
we’ll run the simulation for 2000 minutes.
Exercise 1: Wayne International Airport
Wayne International Airport primarily serves
domestic air traffic. Occasionally, however,
a chartered plane from abroad will arrive
with passengers bound for Wayne's great amusement
parks.
Whenever an international plane
arrives at the airport the two customs
inspectors on duty set up operations to
process the passengers.
Exercise 1: Wayne International Airport
Incoming passengers must first have their
passports and visas checked. This is handled by
one inspector. The time required to check
a passenger's passports and visas can be
described by the following probability distribution:
Time
Probability
20 seconds
.20
40 seconds
.40
60 seconds
.30
80 seconds
.10
Exercise 1:
Wayne International Airport
After having their passports and visas checked,
the passengers next proceed to the second customs
official who does baggage inspections. Passengers
form a single waiting line with the official inspecting
baggage on a first come, first served basis. The time
required for baggage inspection is described by the
following probability distribution:
Time
Probability
No Time
.25
1 minute
.60
2 minutes
.10
3 minutes
.05
Exercise 1: Wayne International Airport
A chartered plane from abroad lands at Wayne
Airport with 80 passengers. Simulate the processing
of the first 10 passengers through customs. Use the
following random numbers:
For passport control:
93, 63, 26, 16, 21, 26, 70, 55, 72, 89
For baggage inspection:
13, 08, 60, 13, 68, 40, 40, 27, 23, 64
Exercise 1: Wayne International Airport
• Question 1
How long will it take for the first 10
passengers to clear customs?
• Question 2
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?
Exercise 1: Wayne International Airport
Answer 1: Passenger 10 clears customs after 9
minutes and 20 seconds.
Answer 2: (Baggage Inspection Begins) - (Passport
Control Ends)
= 0+0+0+40+0+20+20+40+40+0 = 120 sec.
Average Wait. Time/passenger=120/10 = 12
sec/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.
EXERCISE 2: Hand
Simulation of Ordering Policy
• XYZ company sells CD players (with speakers), which it orders
from Fuji Electronics in Japan. Because of shipping and
handling costs, each order must be for five CD players. Because
of the time it takes to receive an order, the warehouse outlet
places an order every time the present stock drops to five CD
players. It costs $100 to place an order. It costs the warehouse
$400 in lost sales when a customer asks for a CD player and the
warehouse is out of stock. It costs $40 to keep each CD player
stored in the warehouse. If a customer cannot purchase a CD
player when it is requested, the customer will not wait until one
comes in but will go to a competitor. The probability
distributions for demand and lead time have been determined as
follows:
EXERCISE 2: Hand
Simulation of Ordering Policy
Demand per Month
Probability
0
.04
1
.08
2
.28
3
.40
4
.16
5
.02
6
.02
1.00
EXERCISE 2: Hand
Simulation of Ordering Policy
Time to Receive an Order (month)
Probability
1
.60
2
.30
3
.10
1.00
EXERCISE 2: Hand
Simulation of Ordering Policy
• The warehouse has five CD players in stock.
Orders are always received at the beginning of the
week. Simulate ordering and sales policy for 10
months using the following random numbers
and compute the average monthly cost.
RNs (Demand): 39, 72, 37, 87, 98,99, 93, 21,97, 41
RNs (Lead Time):73,75,15, 62, 47, 69, 95, 78, 16, 25
Exercise 3
• George Nanchoff owns a gas station. The cars arrive at the gas station
and they are served by one assistant. Use the following inter-arrival
time and service distribution to simulate arrival of five cars.
Interarrival
time (in
minutes)
P(X)
Service Time
(in minutes)
P (X)
4
.35
2
.30
7
.25
4
.40
10
.30
6
.20
20
.10
8
.10
Using the random number sequence: 92, 44, 15, 97, 21, 80,
38, 64, 74, 08 estimate:
– the average customer waiting time ,
– average idle time of the assistant,
– the average time a car spends in the system.
Download