DES - Introduction
DES - Introduction
and Modeling
Period : September / February 20XX
Discrete-Event Simulation:
Introduction
Session 6
Banks Carson II and Nelson Nicol (2014), Discrete-Event System Simulation, Pearson,
2
Topic
3
Chapter 1
Introduction to Simulation
4
Discrete-Event Simulation (DES) vs. Discrete-
Time Simulation
Discrete-event
Discrete-time
5
What is a Simulation?
A simulation: imitation of the operation of a real-world
process or system over time:
Involves generation of an artificial history of a system.
Observes that history and draws inferences about system
characteristics.
Can be used as:
Analysis tool for predicting the effect of changes to existing
systems.
Design tool to predict performance of new systems.
Many real-world systems are very complex that cannot
be solved mathematically.
Hence, numerical, computer-based simulation can be used to
imitate the system behavior.
6
When to use Simulation?
Simulation can be used for the purposes of:
Study and experiment with internal interactions of a complex
system.
Observe the effect of system alterations on model behavior.
Gain knowledge about the system through design of simulation
model.
Use as a pedagogical device to reinforce analytic solution
methodologies, also to verify analytic solutions.
Experiment with new designs or policies before implementation.
Determine machine requirements through simulating different
capabilities.
For training and learning.
Show animation.
Model complex system.
7
When Not to Use Simulation?
Simulation should not be used when:
Problem can be solved by common sense.
Problem can be solved analytically.
If it is easier to perform direct experiments.
If the costs exceed the savings.
If the resources or time to perform simulation studies are not
available.
If no data, not even estimates, is available.
If there is not enough time or personnel to verify/validate the
model.
If managers have unreasonable expectations: overestimate the
power of simulation.
If system behavior is too complex or cannot be defined.
8
Advantages and Disadvantages of Simulation
9
Advantages and Disadvantages of Simulation
Advantages (cont.):
Study interactions of variables, and their importance to system
performance.
Perform bottleneck analysis.
Understand how the system operates.
Test “what if” questions.
Disadvantages:
Model building requires special training.
Simulation results can be difficult to interpret.
Simulation modeling and analysis can be time consuming and
expensive.
Simulation is used in some cases when an analytical solution is
possible (or even preferable).
10
Areas of Application
The applications of simulation are vast.
The Winter Simulation Conference: an excellent way to
learn more about the latest in simulation applications and
theory.
Some areas of applications:
Manufacturing
Construction engineering and project management.
Military.
Logistics, supply chain, and distribution.
Transportation modes and traffic.
Business process simulation.
Healthcare.
Computer and communication systems.
11
Areas of Application
Some general trends:
Risk analysis, e.g., pricing, insurance.
Call-center analysis.
Large-scale systems, e.g., internet backbone, wireless networks.
Automated material handling systems as test beds for the
development and functional testing of control-system software.
12
Systems and System Environment
A system is a group of objects joined together in some
regular interaction or interdependence to accomplish
some purpose.
e.g., a production system: machines, component parts & workers
operate jointly along an assembly line to produce vehicle.
Affected by changes occurring outside the system.
System environment: “outside the system”, defining the
boundary between system and it environment is
important.
13
Components of a System
An entity: an object of interest in the system, e.g., computing
jobs in queue.
An attribute: a property of an entity, e.g., priority class, or
vector of resource requirements.
An activity: represents a time period of a specified length, e.g.
job receiving service.
The state of a system: collection of variables necessary to
describe the system at any time, relative to the objectives of
the study, e.g., the number of busy servers, the number of jobs
in queue.
An event: an instantaneous occurrence that may change the
system state, can be endogenous or exogenous, e.g., a new
job arrival, or service time completion
14
Example System: Queuing at a Teller
Entity A person
Attributes Person ID
Person age
Person saving
Events A person arrives in the queue
A person moves to the teller
A person leaves the teller
State The teller is busy
10 persons in queue
15
Discrete and Continuous Systems
Discrete system: in which state variable(s) change only at a
discrete set of points in time.
e.g., the number of jobs in queue changes when a new job arrives
or when service is completed for another
Continuous system: in which state variable(s) change
continuously over time.
e.g., the head of water behind a dam.
17
Types of Models
Two types of models: mathematical or physical.
Mathematical model: uses symbolic notation and
mathematical equations to represent a system.
Simulation is a type of mathematical model.
Simulation models:
Static or dynamic.
Deterministic or stochastic.
Discrete or continuous.
Our focus: discrete, dynamic, and stochastic models.
18
Discrete Event System Simulation
This book is about discrete-event system simulation.
Simulation models are analyzed by numerical methods
rather than by analytical methods.
Analytical methods: deductive reasoning of mathematics to
“solve” the model.
Numerical methods: computational procedures to “solve”
mathematical models.
19
Steps in a Simulation Study
20
Steps in a Simulation Study
Four phases:
Problem formulation and setting objective and overall design
(step 1 to 2).
Modeling building and data collection (step 3 to 7)
Running of the model (step 8 to 10).
Implementation (step 11 to 12).
An iterative process.
21
Thank you for your attention
22
Chapter 2
Simulation Examples
23
Purpose
To present several examples of simulations that can be
performed by devising a simulation table either manually
or with a spreadsheet.
To provide insight into the methodology of discrete-
system simulation and the descriptive statistics used for
predicting system performance.
24
Outline
The simulations are carried out by following steps:
Determine the input characteristics.
Construct a simulation table.
For each repetition i, generate a value for each input, evaluate
the function, and calculate the value of the response yi.
Simulation examples are in queueing, inventory, reliability
and network analysis.
25
Simulation of Queueing Systems
A queueing system is described by its calling population, nature of
arrivals, service mechanism, system capacity and the queueing
discipline (details in Chapter 6.)
In a single-channel queue:
The calling population is infinite.
Arrivals for service occur one at a time in a random fashion, once they
join the waiting line, they are eventually served.
Arrivals and services are defined by the distribution of the time
between arrivals and service times.
Key concepts:
The system state is the number of units in the system and the status of
the server (busy or idle).
An event is a set of circumstances that causes an instantaneous change
in the system state, e.g., arrival and departure events.
The simulation clock is used to track simulated time.
26
Simulation of Queueing Systems
Event list: to help determine what happens next.
Tracks the future times at which different types of events occur.
(this chapter simplifies the simulation by tracking each unit
explicitly.)
Events usually occur at random times.
The randomness needed to imitate real life is made possible
through the use of random numbers, they can be generated
using:
Random digits tables: form random numbers by selecting the
proper number of digits and placing a decimal point to the left of
the value selected, e.g., Table A.1 in book.
Simulation packages and spreadsheets.
Details in chapter 7.
27
Simulation of Queueing Systems
Single-channel queue illustration:
Assume that the times between arrivals were generated by rolling
a die 5 times and recording the up face. Input generated:
Customer Interarrival Time Arrival Time on Clock
1 - 0
2 2 2
3 4 6
4 1 7
5 2 9
6 6 15
28
Simulation of Queueing Systems
Resulting simulation table emphasizing clock times:
Customer Arrival Time Time Service Service Time Time Service
Number (clock) Begins (Clock) (Duration) Ends (clock)
1 0 0 2 2
2 2 2 1 3
3 6 6 3 9
4 7 9 2 11
5 9 11 1 12
6 15 15 4 19
Another presentation method, by chronological ordering of events:
Event Type Customer Number Clock Time
Arrival 1 0
Departure 1 2
Arrival 2 2
Departure 2 3
Arrival 3 4
Arrival 4 7
Departure 2 8
Arrival 5 8
Departure 4 11
Departure 5 12
Arrival 6 15
Departure 6 19
29
Simulation of Queueing Systems
Grocery store example: with only one checkout counter.
Customers arrive at random times from 1 to 8 minutes apart, with
equal probability of occurrence:
Time between Cumulative Random Digit
Arrivals (minutes) Probability Probability Assignment
1 0.125 0.125 001-125
2 0.125 0.250 126-250
3 0.125 0.375 251-375
4 0.125 0.500 376-500
5 0.125 0.625 501-625
6 0.125 0.750 626-750
7 0.125 0.875 751-875
8 0.125 1.000 876-000
31
Grocery Store Example
[Simulation of Queueing Systems]
Generated time-between-arrivals:
Customer Random Digits Interarrival Times (minutes)
1 - -
2 64 1
3 112 1
4 678 6
5 289 3
6 871 7
… … …
100 538 4
Using the same methodology, service times are generated:
32
Grocery Store Example
[Simulation of Queueing Systems]
For manual simulation, Simulation tables are designed for the
problem at hand, with columns added to answer questions
posed: 2 customer was in the
system for 5 minutes.
nd
purposes of illustration.
36
Able-Baker Call Center Example
[Simulation of Queueing Systems]
37
Able-Baker Call Center Example
[Simulation of Queueing Systems]
In the second spreadsheet, we run an experiment with 400 trials
(each consisting of the simulation of 100 callers) and found the
following:
38
Simulation of Inventory Systems
A simple inventory system, an (M, N) inventory system:
40
Simulation of Inventory Systems
The News Dealer’s Example: A classical inventory problem
concerns the purchase and sale of newspapers.
News stand buys papers for 33 cents each and sells them for 50
cents each.
Newspaper not sold at the end of the day are sold as scrap for 5
cents each.
Newspaper can be purchased in bundles of 10 (can only buy 10,
20,… 50, 60…)
Random Variables:
Types of newsdays.
Demand.
43
News Dealer’s Example
[Simulation of Inventory Systems]
From the manual solution
The simulation table for the decision to purchase 70 newspapers
is:
44
News Dealer’s Example
[Simulation of Inventory Systems]
From Excel: running the simulation for 400 trials (each for 20
days)
45
News Dealer’s Example
[Simulation of Inventory Systems]
The manual solution had a profit of $131.00, not far from the
average over 400 days, $137.61.
But the result for a one-day simulation could have been the
minimum value or the maximum value.
Hence, it is useful to conduct many trials.
On the “One Trial” sheet in Excel spreadsheet of Example 2.3.
Observe the results by clicking the button ‘Generate New Trail.’
Notice that the results vary quite a bit in the profit frequency graph
and in the total profit.
46
Order-Up-To Level Inventory Example
[Simulation of Inventory Systems]
47
Other Examples of Simulation
Reliability problem:
A machine with different failure types of which repairman is called
to install or repair the part.
Possible random variables: time to failure, time to service.
Possible decision variables: decide strategy of repair verses
replace, number of repairman to hire.
Random normal numbers:
e.g. a bomber problem – where the point of impact is normally
distributed around the aim point.
Possible decision variables: number of bombs to drop for a certain
level of damage.
48
Other Examples of Simulation
Lead-time demand:
Lead time is the random variable: the time from placement of an
order until the order is received.
Other possible random variable: demand.
Possible decision variables: how much and how often to order.
Project simulation:
A project can be represented as a network of activities: some
activities must be carried out sequentially, others can be done in
parallel.
Possible random variables: times to complete the activities.
Possible decision variables: sequencing of activities, number of
workers to hire.
49
Summary
Introduced simulation concepts by means of examples,
illustrated general areas of application, and motivated the
remaining chapters.
Ad-hoc simulation tables were used:
Events in tables were generated by using uniformly distributed
random numbers, and resulting responses were analyzed.
Ac-hoc simulation table may fail due to system complexities.
More systematic methodology, e.g., event scheduling approach,
is described in Chapter 3.
Key takeaways:
A simulation is a statistical experiment and results have variation.
As the number of replications increases, there is an increased
opportunity for greater variation.
50
Chapter 3
General Principles
51
Purpose
Develops a common framework for the modeling of
complex systems.
Covers the basic blocks for all discrete-event simulation
models.
Introduces and explains the fundamental concepts and
methodologies underlying all discrete-event simulation
packages.
These concepts and methodologies are not tied to any particular
simulation package.
52
Outline
Deals exclusively with dynamic, stochastic systems.
Discrete-event models are appropriate for those systems
for which changes in system state occur only at discrete
points in time.
Covers general principles and concepts:
Event scheduling/time advance algorithm.
The three prevalent world views.
Introduces some of the notions of list processing.
53
Concepts in Discrete-Event Simulation
System: a collection of entities that interact together over time,
e.g., people and machines.
Model: an abstract representation of a system.
System state: a collection of variables that contain all the info
necessary to describe the system at any time.
Entity: any object or component in the system, e.g., a server, a
customer, a machine.
Attributes: the properties of a given entity.
54
Concepts in Discrete-Event Simulation
Lists: a collection of associated entities, ordered in some
logical fashion, a.k.a, sets, queues and chains.
Event: an instantaneous occurrence that changes the state of
a system, e.g., an arrival of a new customer.
Event list: a list of event notices for future events, ordered by
time of occurrence, a.k.a. the future event list (FEL)
Activity: a duration of time of specified length which is known
when it begins , e.g., a service time.
Clock: a variable representing simulated time.
55
Concepts in Discrete-Event Simulation
An activity typically represents a service time, an interarrival
time, or any processing time whose duration has been
characterized/defined by the modeler.
An activity’s duration may be specified:
Deterministic
Statistical
A function depending on system variables and/or entity attributes.
Duration is not affected by the occurrence of other events, hence,
activity is also called an unconditional wait.
Completion of an activity is an event, often called a primary
event.
For example
If the current simulated time is CLOCK = 100 minutes, and an
inspection time of exactly 5 minutes is just beginning, then an event
notice is created that specified the type of event and the event time
(100+5 = 105 min).
56
Concepts in Discrete-Event Simulation
A delay’s duration is determined by system conditions (not
specified by the modeler ahead of time.)
Also called a conditional wait.
For example, a customer’s delay in a waiting line may be
dependent on the number and duration of service of other
customers ahead in line and, whether a server has a failure
during the delay.
Dynamic: Function of time and constantly changing over time.
System state, entity attributes, the number of active entities, the
contents of sets, and the activities and delays currently in
progress are all function of time.
57
Concepts in Discrete-Event Simulation
Example: Able-Baker Call Center System. A discrete-event model
has the following components:
System state:
The number of callers waiting to be served at time t
Indicator that Able is idle or busy at time t
Indicator that Baker is idle or busy at time t
Entities: neither the caller nor the servers need to be explicitly
represented, except in terms of the state variables, unless certain caller
averages are desired.
Events:
Arrival
Service completion by Able
Service completion by Baker
Activities:
Interarrival time.
Service time by Able
Service time by Baker
Delay: a caller’s wait in queue until Able or Baker becomes free.
58
Concepts in Discrete-Event Simulation
The definition of the model components provides a static
description of the model.
A description of the dynamic relationships and
interactions between the components is also needed.
e.g., how does each event affect system state? What events
mark the beginning or end of each activity? What is the system
state at time 0?
A discrete-event simulation is:
The modeling over time of a system all of whose state changes
occur at discrete points in time.
Proceeds by producing a sequence of system snapshots.
59
Event Scheduling/Time Advance Algorithm
The mechanism for advancing simulation time and
guaranteeing that all events occur in correct chronological
order.
At any given time t, the future event list (FEL) contains all
previously scheduled future events and their associated event
times (t1,t2, …)
FEL is ordered by event time, and the event time satisfy:
t £ t1 £ t2 £ t3 £ … £ tn where t is the value of
CLOCK
Repeat
60
Event Scheduling/Time Advance Algorithm
Example: figure 3.2 (cannot find it in the figure files…)
61
List Processing [Event Scheduling]
62
Future Events [Event Scheduling]
63
Future Events [Event Scheduling]
64
World Views
The most prevalent world views are:
Event-scheduling world view (variable time advance.)
Process-interaction world view (variable time advance.)
Activity-scanning world view (fixed time increment.)
Event-scheduling approach
Concentrates on events and their effect on system state
Summarized in the previous slides; manual simulation will be
discussed next.
65
World Views
Process-interaction approach
Concentrates on the processes: a process is a time-sequenced
list of events, activities and delays that define the life cycle of one
entity as it moves through a system.
Usually, many processes are active simultaneously in a model,
and the interaction among processes could be quite complex.
A popular approach because it has intuitive appeal and ease of
simulation package implementation.
An example of a “customer process”:
66
World Views
Activity-scanning approach:
Concentrates on activities of a model and those conditions that
allow an activity to begin.
At each clock advance, the conditions for each activity are
checked, and if the conditions are true, then the corresponding
activities begins.
Simple in concept but slow runtime on computers.
The modified approach is called the three-phase approach.
Events are considered to be activities of duration zero time units.
Activities are divided into 2 categories:
B-type: activities that are bound to occur, e.g. primary events.
C-type: activities or events that are conditional upon certain conditions
being true
Simulation proceeds with repeated execution of the 3 phases: from
removal of events, then execute B-type events, and then execute C-
type events.
67
World Views
Commercial Use:
Process-interaction approach has been adopted by simulation
packages most popular in the U.S.
Activity-scanning packages are popular in the UK and Europe.
68
Manual Simulation Using Event Scheduling
Grocery Store Example: Single-channel queue. Reconsider the
single checkout counter problem.
The system consists of those customers in the waiting plus the one (if
any) checking out.
For this example, a stopping time of 60 minutes is set.
Model components:
System state: LQ(t) – # of customers in line at time t, LS(t) - # being served at
time t.
Entities: the server and customers are not explicitly modeled, except in terms
of the state variables.
Events: arrival (A), departure (D), stopping event (E).
Event notices (event type, event time):
(A, t), representing an arrival event to occur at future time t;
(D, t), representing a customer departure at future time t;
(E, 60), representing the simulation stop event at future time 60.
Activities: interarrival time and service time.
Delay: customer time spent in waiting line.
69
Grocery Store Example [Manual Simulation]
70
Grocery Store Example [Manual Simulation]
71
Grocery Store Example [Manual Simulation]
Initial conditions are the 1st customer arrives at time 0 and begin service.
Only two statistics: server utilization (B) & maximum queue lengths (MQ).
Simulation table:
Arrival at time 8
Departure at time 4
Terminating event
at time 60
System State Cumulative Statistics
Clock LQ(t) LS(t) Future Event List Comment B MQ
First A occurs: (a* = 8),
0 0 1 (D, 4), (A, 8), (E, 60) schedule next A; (s*=4) 0 0
Schedule first D
4 0 0 (A, 8), (E, 60) First D occurs: (D, 4) 4 0
73
Grocery Store Example [Manual Simulation]
At time 18, when the departure event (D, 18, C3) is being executed, the
response time for customer C3 is computed by:
Six dump trucks are used to haul coal from the entrance of a
small mine to the railroad.
Each truck is loaded by one of two loaders.
After loading, the truck immediately moves to the scale to be
weighed.
The loaders and the scale have a FCFS waiting line (or queue) for
trucks.
After being weighed, a truck begins a travel time (during which the
truck unloads) and returns to the loader queue.
76
Dump-Truck Example [Manual Simulation]
78
Dump-Truck Example [Manual Simulation]
79
Dump-Truck Example [Manual Simulation]
Truck 3 joins the weigh Truck 4 begins to load,
queue (because the scale is schedule an EL event for
Simulation Table: occupied.) future time 10
81
Dump-Truck Example [Manual Simulation]
82
Dump-Truck Example [Manual Simulation]
83
Lists: Basic Properties and Operations
Lists are a set of ordered or ranked records.
In simulation, each record represents one entity or one event
notice.
They have top or head (1st item) and bottom or tail.
Ways to traverse the list (to find the 2nd, 3rd, etc. items on the list)
are necessary.
An entity identifier and its attributes are fields in the entity
record.
Each record on a list has a field that holds a “next pointer” that
points to the next record on the list.
84
Lists: Basic Properties and Operations
The main operations on a list are:
Removing a record from the top of the list
Removing a record from any location on the list
Adding an entity record to the top or bottom of the list
Adding a record at an arbitrary position in the list, specified by the ranking
rule.
In the event-scheduling approach, when time is advanced and
the imminent event is due to be executed:
First, the removal operation takes place.
If an arbitrary event is being canceled, or an entity is removed from a list
based on some of its attributes to being an activity, then the second
removal operation is performed
If a queue has the ranking rule earliest due date first, then, upon arrival at
the queue, an entity must be added to the list determined by the due-date
ranking rule.
85
Lists: Basic Properties and Operations
For simulation on a computer:
All records are stored in arrays: arrays hold successive records in
contiguous locations in computer memory, referenced by array index.
All entities and event notices are represented by structure (as in C) or
classes (as in Java) allocated from RAM memory as needed, and tracked
by pointers to a record or structure.
86
Using Arrays [List Processing]
87
Using Arrays [List Processing]
88
Dump-Truck Example [List Processing]
Recall the dump-truck problem: At clock time 10, there is waiting line
of 3 dump trucks occurred at the weigh queue, specifically, DT3, DT2
and DT4 (in this order.)
Suppose the model is tracking one attribute of each dump truck: its
arrival time at the weigh queue, updated each time it arrives.
Suppose that the entities are stored in records in an array
dimensioned from 1 to 6, one record for each dump truck.
Each entity is represented by a record with 3 fields:
The first is an entity identifier,
The second is the arrival time at the weigh queue,
The last is pointer field to “point to” the next record.
[ DTi, arrival time at weigh queue, next index]
89
Dump-Truck Example [List Processing]
At clock time 10, the list of entities in the weigh queue would be defined by:
headptr = 3
R(1) = [DT1, 0.0, 0], R(2) = [DT2, 10.0, 4], R(3) = [DT3, 5.0, 2]
R(4) = [DT4, 10.0, 0], R(5) = [DT5, 0.0, 0], R(6) = [DT6, 0.0, 0]
To traverse the list, start with the head pointer, go to that record, retrieve that
record’s next point, and proceed. To create the list in its logical order, for
example:
headptr = 3,
R(3) = [DT3, 5.0, 2], R(2) = [DT2, 10.0, 4], R(4) = [DT4, 10.0, 0]
The zero entry for next point in R(4), as well as tailptr = 4, indicates that DT4 is at
the end of the list.
90
Dump-Truck Example [List Processing]
At clock time 12, dump truck DT3 begins weighing and thus leaves the
weigh queue.
To remove the DT3 entity record form the top of the list, update the head
pointer by setting it equal to the next pointer value of the record at the top
of the list:
headptr = R(headptr, next)
In this example, we get: headptr = R(3, next) = 2. Hence, dump truck DT2
in R(2) is now at the top of the list.
91
Using Dynamic Allocation and Linked Lists
[List Processing]
Used in procedural languages, such as C++ and Java, and in
most simulation languages.
Entity records are dynamically created when an entity is
created.
Event notice records are dynamically created whenever an
event is scheduled on the future event list.
Basic mechanics:
The languages maintain a linked list of free chunks of computer
memory and allocate a chunk of desired size upon request to
running programs.
When an entity exits from the simulated system, and also after an
event occurs and the event notice is no longer needed, the
corresponding records are free.
92
Using Dynamic Allocation and Linked Lists
[List Processing]
A record is referenced by a pointer instead of by an array index.
A pointer to a record can be thought of as the physical or logical
address in computer memory of the record.
If the 3rd item on the list is needed, we need to traverse the list,
counting items until we reach the record.
Notation for records:
Entities: [ID, attributes, next pointer]
Event notices: [event type, event time, other data, next pointer]
List types:
Singly-linked lists: one-way linkage from the head of the list to its
tail.
Doubly-linked lists: records have two pointer fields, one for the
next record and one for the previous record.
93
Dump-Truck Example [List Processing]
94
Summary
Introduced the major concepts and building blocks in
simulation:
Entities and attributes.
Events and activities.
Three major world views:
Event-scheduling.
Process interaction.
Activity scanning.
Basic notions of list processing are introduced to gain
understanding of this important underlying methodologies.
95
Chapter 5
Statistical Models in
Simulation
96
Purpose & Overview
The world the model-builder sees is probabilistic rather
than deterministic.
Some statistical model might well describe the variations.
In this chapter:
Review several important probability distributions
Present some typical application of these models
97
Review of Terminology and Concepts
In this section, we will review the following
concepts:
Discreterandom variables
Continuous random variables
Cumulative distribution function
Expectation
98
Discrete Random Variables [Probability Review]
2. i 1
p ( xi ) 1
99
Continuous Random Variables [Probability Review]
3. f ( x) 0, if x is not in RX
Properties
x0
1. P( X x0 ) 0, because x0
f ( x) dx 0
2. P(a X b) P(a X b) P (a X b) P (a X b)
100
Continuous Random Variables [Probability Review]
1 x/ 2
e , x0
f ( x) 2
0, otherwise
101
Cumulative Distribution Function [Probability Review]
102
Cumulative Distribution Function [Probability Review]
The probability that the device lasts for less than 2 years:
P (0 X 2) F (2) F (0) F (2) 1 e 1 0.632
103
Expectation [Probability Review]
104
Expectations [Probability Review]
106
Queueing Systems [Useful Models]
107
Inventory and supply chain [Useful Models]
108
Reliability and maintainability [Useful Models]
109
Other areas [Useful Models]
110
Discrete Distributions
Discrete random variables are used to describe
random phenomena in which only integer values
can occur.
In this section, we will learn about:
Bernoullitrials and Bernoulli distribution
Binomial distribution
Geometric and negative binomial distribution
Poisson distribution
111
Bernoulli Trials and Bernoulli Distribution
[Discrete Dist’n]
Bernoulli Trials:
Consider an experiment consisting of n trials, each can be a
success or a failure.
Let Xj = 1 if the jth experiment is a success
and Xj = 0 if the jth experiment is a failure
The Bernoulli distribution (one trial):
p, x j 1, j 1,2,..., n
p j ( x j ) p ( x j ) 1 p q, x j 0 ,j 1,2 ,...,n
0, otherwise
where E(Xj) = p and V(Xj) = p (1 – p) = p q
Bernoulli process:
The n Bernoulli trials where trails are independent:
p(x1,x2,…, xn) = p1(x1) p2(x2) … pn(xn)
112
Binomial Distribution [Discrete Dist’n]
113
Geometric & Negative
Binomial Distribution [Discrete Dist’n]
Geometric distribution
The number of Bernoulli trials, X, to achieve the 1st success:
q x 1 p, x 0,1, 2,..., n
p( x)
0, otherwise
E(X) = 1/p, and V(X) = q/p2
114
Poisson Distribution [Discrete Dist’n]
115
Poisson Distribution [Discrete Dist’n]
116
Continuous Distributions
Continuous random variables can be used to
describe random phenomena in which the
variable can take on any value in some interval.
In this section, the distributions studied are:
Uniform
Exponential
Normal
Weibull
Lognormal
117
Uniform Distribution [Continuous Dist’n]
Properties
P(x1 < X < x2) is proportional to the length of the interval:
F(x2) – F(x1) = (x2 – x1)/(b – a)
E(X) = (a+b)/2 V(X) = (b – a)2/12
U(0,1) provides the means to generate random numbers,
from which random variates can be generated.
118
Exponential Distribution [Continuous Dist’n]
highly variable
intersect.
119
Exponential Distribution [Continuous Dist’n]
Memoryless property
For all s and t greater or equal to 0:
P(X > s + t | X > s) = P(X > t)
120
Normal Distribution [Continuous Dist’n]
Mean:
Variance: 0
2
Denoted as X ~ N(m,s2)
Special properties:
lim x f ( x) 0, and lim x f ( x) 0.
f(m – x) = f((m + x); the pdf is symmetric about m.
The maximum value of the pdf occurs at x = m; the mean and
mode are equal.
121
Normal Distribution [Continuous Dist’n]
1 t 2 / 2
z
x
where ( z ) e dt
2 122
Normal Distribution [Continuous Dist’n]
123
Weibull Distribution [Continuous Dist’n]
A random variable X has a Weibull distribution if its pdf has the form:
x 1 x
f ( x)
exp , x
0, otherwise
3 parameters:
Location parameter: u, ( )
Scale parameter: b , (b > 0)
Shape parameter. a, (> 0)
Example: u = 0 and a = 1:
When b = 1,
X ~ exp(l = 1/a)
124
Lognormal Distribution [Continuous Dist’n]
125
Poisson Distribution
Definition: N(t) is a counting function that represents
the number of events occurred in [0,t].
A counting process {N(t), t ≥ 0} is a Poisson process
with mean rate l if:
Arrivals occur one at a time
{N(t), t ≥ 0} has stationary increments
{N(t), t ≥ 0} has independent increments
Properties
e t ( t ) n
P[ N (t ) n] , for t 0 and n 0,1,2,...
n!
Equal mean and variance: E[N(t)] = V[N(t)] = lt
Stationary increment: The number of arrivals between time s
and time t > s is also Poisson-distributed with mean l(t – s)
126
Interarrival Times [Poisson Dist’n]
The 1st arrival occurs after time t iff there are no arrivals in the interval
[0,t], hence:
P{A1 > t} = P{N(t) = 0} = e-lt
P{A1 ≤ t} = 1 – e-lt [cdf of exp(l)]
Interarrival times, A1, A2, …, are exponentially distributed and
independent with mean 1/l
Poisson(l)
127
Splitting and Pooling [Poisson Dist’n]
Splitting:
Suppose each event of a Poisson process can be classified as
Type I, with probability p and Type II, with probability 1-p.
N(t) = N1(t) + N2(t), where N1(t) and N2(t) are both Poisson
processes with rates l p and l (1-p)
lp N1(t) ~ Poi[lp]
l
N(t) ~ Poi(l)
N2(t) ~ Poi[l(1-p)]
l(1-p)
Pooling:
Suppose two Poisson processes are pooled together
N1(t) + N2(t) = N(t), where N(t) is a Poisson processes with
rates l1 + l2 l
N1(t) ~ Poi[l ]
1 1 l +l
1 2
N(t) ~ Poi(l + l )
1 2
N2(t) ~ Poi[l ] l
2 2
128
Nonstationary Poisson
Process (NSPP) [Poisson Dist’n]
Relating stationary Poisson process n(t) with rate l=1 and NSPP N(t)
with rate l(t):
Let arrival times of a stationary process with rate l = 1 be t1, t2, …,
and arrival times of a NSPP with rate l(t) be T1, T2, …, we know:
ti = L(Ti)
Ti = L-1(ti)
129
Nonstationary Poisson
Process (NSPP) [Poisson Dist’n]
Example: Suppose arrivals to a Post Office have rates 2 per minute
from 8 am until 12 pm, and then 0.5 per minute until 4 pm.
Let t = 0 correspond to 8 am, NSPP N(t) has rate function:
2, 0t 4
(t )
0.5, 4 t 8
Expected number of arrivals by time t:
2t , 0t4
(t ) 4 t t
0 2 ds 4 0.5ds
2
6, 4 t 8
130
Empirical Distributions [Poisson Dist’n]
131
Summary
The world that the simulation analyst sees is probabilistic,
not deterministic.
In this chapter:
Reviewed several important probability distributions.
Showed applications of the probability distributions in a simulation
context.
Important task in simulation modeling is the collection and
analysis of input data, e.g., hypothesize a distributional
form for the input data. Reader should know:
Difference between discrete, continuous, and empirical
distributions.
Poisson process and its properties.
132
Thank You
133