Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Simulation

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 66

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 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?
– Advantage — 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

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 problem-
solving 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 Departing
7 6 5 4
Blank Parts Finished Parts
Queue (FIFO) Part in Service
• General intent:
 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 Arrival Time Interarrival Time Service Time
1 0.00 1.73 2.90
2 1.73 1.35 1.76
3 3.08 0.71 3.39
4 3.79 0.62 4.52
5 4.41 14.28 4.46
6 18.69 0.70 4.36
7 19.39 15.52 2.07
8 34.91 3.15 3.36
9 38.06 1.76 2.37
10 39.82 1.00 5.38
11 40.82 . .
. . . .
. . . .
• Stop when 20 minutes of (simulated) time have
passed

Chapter 2 – Fundamental Slide 12 of 46 Simulation with


Simulation by Hand:
Setup
System Clock B(t) Q(t) Arrival times of Event calendar
custs. in queue

Number of Total of Area under Area under


completed waiting waiting times in queue Q(t) B(t)
times in queue

4
3
Q(t) graph 2
1
0
0 5 10 15 20
2
B(t) graph 1
0
0 5 10 15 20

Time (Minutes)
Interarrival times 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 Clock B(t) Q(t) Arrival times of Event calendar
custs. in queue [1, 0.00, Arr]
0.00 0 0 <empty> [–, 20.00, End]

Number of Total of Area under Area under


completed waiting waiting times in queue Q(t) B(t)
times in queue
0 0.00 0.00 0.00

4
3
Q(t) graph 2
1
0
0 5 10 15 20
2
B(t) graph 1
0
0 5 10 15 20

Time (Minutes)
Interarrival times 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 Clock B(t) Q(t) Arrival times of Event calendar
custs. in queue [2, 1.73, Arr]
1 0.00 1 0 <empty> [1, 2.90, Dep]
[–, 20.00, End]
Number of Total of Area under Area under
completed waiting waiting times in queue Q(t) B(t)
times in queue
1 0.00 0.00 0.00

4
3
Q(t) graph 2
1
0
0 5 10 15 20
2
B(t) graph 1
0
0 5 10 15 20

Time (Minutes)
Interarrival times 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 Clock B(t) Q(t) Arrival times of Event calendar
custs. in queue [1, 2.90, Dep]
2 1 1.73 1 1 (1.73) [3, 3.08, Arr]
[–, 20.00, End]
Number of Total of Area under Area under
completed waiting waiting times in queue Q(t) B(t)
times in queue
1 0.00 0.00 1.73

4
3
Q(t) graph 2
1
0
0 5 10 15 20
2
B(t) graph 1
0
0 5 10 15 20

Time (Minutes)
Interarrival times 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 Clock B(t) Q(t) Arrival times of Event calendar
custs. in queue [3, 3.08, Arr]
2 2.90 1 0 <empty> [2, 4.66, Dep]
[–, 20.00, End]
Number of Total of Area under Area under
completed waiting waiting times in queue Q(t) B(t)
times in queue
2 1.17 1.17 2.90

4
3
Q(t) graph 2
1
0
0 5 10 15 20
2
B(t) graph 1
0
0 5 10 15 20

Time (Minutes)
Interarrival times 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 Clock B(t) Q(t) Arrival times of Event calendar
custs. in queue [4, 3.79, Arr]
3 2 3.08 1 1 (3.08) [2, 4.66, Dep]
[–, 20.00, End]
Number of Total of Area under Area under
completed waiting waiting times in queue Q(t) B(t)
times in queue
2 1.17 1.17 3.08

4
3
Q(t) graph 2
1
0
0 5 10 15 20
2
B(t) graph 1
0
0 5 10 15 20

Time (Minutes)
Interarrival times 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 Clock B(t) Q(t) Arrival times of Event calendar
custs. in queue [5, 4.41, Arr]
4 3 2 3.79 1 2 (3.79, 3.08) [2, 4.66, Dep]
[–, 20.00, End]
Number of Total of Area under Area under
completed waiting waiting times in queue Q(t) B(t)
times in queue
2 1.17 1.88 3.79

4
3
Q(t) graph 2
1
0
0 5 10 15 20
2
B(t) graph 1
0
0 5 10 15 20

Time (Minutes)
Interarrival times 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 Clock B(t) Q(t) Arrival times of Event calendar
custs. in queue [2, 4.66, Dep]
5 4 3 2 4.41 1 3 (4.41, 3.79, 3.08) [6, 18.69, Arr]
[–, 20.00, End]
Number of Total of Area under Area under
completed waiting waiting times in queue Q(t) B(t)
times in queue
2 1.17 3.12 4.41

4
3
Q(t) graph 2
1
0
0 5 10 15 20
2
B(t) graph 1
0
0 5 10 15 20

Time (Minutes)
Interarrival times 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 Clock B(t) Q(t) Arrival times of Event calendar
custs. in queue [3, 8.05, Dep]
5 4 3 4.66 1 2 (4.41, 3.79) [6, 18.69, Arr]
[–, 20.00, End]
Number of Total of Area under Area under
completed waiting waiting times in queue Q(t) B(t)
times in queue
3 2.75 3.87 4.66

4
3
Q(t) graph 2
1
0
0 5 10 15 20
2
B(t) graph 1
0
0 5 10 15 20

Time (Minutes)
Interarrival times 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 Clock B(t) Q(t) Arrival times of Event calendar
custs. in queue [5, 17.03, Dep]
5 12.57 1 0 () [6, 18.69, Arr]
[–, 20.00, End]
Number of Total of Area under Area under
completed waiting waiting times in queue Q(t) B(t)
times in queue
5 15.17 15.17 12.57

4
3
Q(t) graph 2
1
0
0 5 10 15 20
2
B(t) graph 1
0
0 5 10 15 20

Time (Minutes)
Interarrival times 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 Clock B(t) Q(t) Arrival times of Event calendar
custs. in queue [6, 18.69, Arr]
17.03 0 0 () [–, 20.00, End]

Number of Total of Area under Area under


completed waiting waiting times in queue Q(t) B(t)
times in queue
5 15.17 15.17 17.03

4
3
Q(t) graph 2
1
0
0 5 10 15 20
2
B(t) graph 1
0
0 5 10 15 20

Time (Minutes)
Interarrival times 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 Clock B(t) Q(t) Arrival times of Event calendar
custs. in queue [7, 19.39, Arr]
6 18.69 1 0 () [–, 20.00, End]
[6, 23.05, Dep]
Number of Total of Area under Area under
completed waiting waiting times in queue Q(t) B(t)
times in queue
6 15.17 15.17 17.03

4
3
Q(t) graph 2
1
0
0 5 10 15 20
2
B(t) graph 1
0
0 5 10 15 20

Time (Minutes)
Interarrival times 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 Clock B(t) Q(t) Arrival times of Event calendar
custs. in queue [–, 20.00, End]
7 6 19.39 1 1 (19.39) [6, 23.05, Dep]
[8, 34.91, Arr]
Number of Total of Area under Area under
completed waiting waiting times in queue Q(t) B(t)
times in queue
6 15.17 15.17 17.73

4
3
Q(t) graph 2
1
0
0 5 10 15 20
2
B(t) graph 1
0
0 5 10 15 20

Time (Minutes)
Interarrival times 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 Clock B(t) Q(t) Arrival times of Event calendar
custs. in queue [6, 23.05, Dep]
7 6 20.00 1 1 (19.39) [8, 34.91, Arr]

Number of Total of Area under Area under


completed waiting waiting times in queue Q(t) B(t)
times in queue
6 15.17 15.78 18.34

4
3
Q(t) graph 2
1
0
0 5 10 15 20
2
B(t) graph 1
0
0 5 10 15 20

Time (Minutes)
Interarrival times 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


04/14/2020 38
Calibration and Validation
of Models
Compare model
Initial
to reality Model

Revise
Compare
revised model
First revision
Real of model
to reality
System Revise

Compare 2nd
revised model Second
revision
to reality 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
04/14/2020 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

04/14/2020 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.

04/14/2020 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 Yield
Temperature
Catalyst
concentration
Growing tomatoes Fertilizer Yield
Soil pH Hardiness
Seed hybrid
Water
Simulation of a Job dispatch rule Throughput
manufacturing Number of Time in system
system machines Utilizations
Machines’ reliability Queue sizes
Mean downtimes
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 .................................. N
i
Continuous-time Output Data
Can jump into system at any point in time (real,
continuous time) and take a “snapshot” of something-
there 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

2
Q (t )
1

0
t T
DIDO Vs. RIRO Simulation
Inputs: Cycle Interarrival Batch
times times sizes

Simulation Model
RIRO

Outputs: Hourly Machine


production utilization
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 non-
terminating depends on
 both the objectives of the simulation study and
 the nature of the system.

Simulation with Arena, 3rd ed. Chapter 1 – What Is Slide 51 of 23


Analysis for Steady-State
Simulations
Objective: Estimate the steady state mean
  lim i  E (Yi )

Basic question: Should you do many short runs or one long


run ?????
Many short One long
runs run

X 1
X 1

X 2

X 3

X 4

X 5
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
Service Time
time (in P(X) P (X)
(in minutes)
minutes)

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.

You might also like