Output Analysis For A Single Model: Discrete-Event System Simulation
Output Analysis For A Single Model: Discrete-Event System Simulation
Purpose
Outline
Type of Simulations
Type of Simulations
Non-terminating simulation:
Divide the time interval [0, 5000) into 5 equal subintervals of 1000
minutes.
Average number of customers in queue from time (j-1)1000 to
j(1000) is Yj .
Batch, j
1
2
3
4
5
1, Y 1j
3.61
3.21
2.18
6.92
2.82
3.75
Replication
2, Y 2j
2.91
9.00
16.15
24.53
25.19
15.56
3, Y 3j
7.67
19.53
20.36
8.11
12.62
13.66
Measures of performance
n
1
= Yi
n i =1
)
Is unbiased if E
its(expected
value is , that is if:
Is biased if:
E () =
Desired
Point Estimator
[Performance Measures]
1
=
TE
TE
Y (t )dt
Point Estimator
[Performance Measures]
10
Confidence-Interval Estimation
[Performance Measures]
Let Yi be the average cycle time for parts produced on the ith
replication of the simulation (its mathematical expectation is ).
Average cycle time will vary from day to day, but over the long-run
the average of the averages will be close to .
R
1
2
Sample variance across R replications: S =
(Yi. Y.. ) 2
R 1 i =1
11
Confidence-Interval Estimation
[Performance Measures]
Y.. t / 2, R 1
S
R
We cannot know for certain how far Y.. is from but CI attempts
to bound that error.
A CI, such as 95%, tells us how much we can trust the interval to
actually bound the error between Y.. and .
12
Confidence-Interval Estimation
[Performance Measures]
Y.. t / 2, R 1S 1 +
1
R
13
TE
TE
Y (t )dt , for continuous output Y (t ),0 t TE
14
Statistical Background
[Terminating Simulations]
15
Statistical Background
[Terminating Simulations]
Across Replication:
For example: the daily cycle time averages (discrete time data)
1 R
The average:
Y.. = Yi.
R i =1
1 R
The sample variance:
2
S =
(Yi. Y.. ) 2
R 1 i =1
S
The confidence-interval half-width:
H = t / 2, R 1
R
Within replication:
1
S =
T Ei
2
i
TEi
(Y (t ) Y ) dt
0
i.
16
Statistical Background
[Terminating Simulations]
17
S
R
R is the # of
replications
S2 is the sample
variance
P Y.. < 1
18
19
Call Center Example: estimate the agents utilization over the first 2
hours of the workday.
2
z0.025 S 0 1.96 * 0.00518
= 12.14
=
2
0
.
04
t 0.025, R-1
13
14
15
2.18
2.16
2.14
15.39
15.1
14.83
20
Quantiles
[Terminating Simulations]
p z / 2
p (1 p )
R 1
21
Quantiles
[Terminating Simulations]
The best way is to sort the outputs and use the (R*p)th
smallest value, i.e., find such that 100p% of the data in a
histogram of Y is to the left of .
22
Quantiles
[Terminating Simulations]
l and u.
l cuts off 100pl% of the histogram (the Rpl smallest value of the
sorted data).
u cuts off 100pu% of the histogram (the Rpu smallest value of
the sorted data).
where pl = p z / 2
p (1 p )
R 1
pu = p + z / 2
p (1 p )
R 1
23
Quantiles
[Terminating Simulations]
pl = 0.8 1.96
.8(1 .8)
= 0.78
1000 1
pu = 0.8 + 1.96
.8(1 .8)
= 0.82
1000 1
Output
180.92
188.96
190.55
208.58
212.03
216.99
250.32
256.79
256.99
Rank
779
780
781
799
800
801
819
820
821
24
1 n
= lim Yi ,
n n i =1
1
= lim
TE TE
TE
Y (t )dt ,
(with probability 1)
(with probability 1)
25
26
Initialization Bias
[Steady-State Simulations]
Intelligent initialization
Initialize the simulation in a state that is more representative of
long-run conditions.
If the system exists, collect data on it and use these data to specify
more nearly typical initial conditions.
If the system can be simplified enough to make it mathematically
solvable, e.g. queueing models, solve the simplified model to find
long-run expected or most likely conditions, use that to initialize the
simulation.
27
Initialization Bias
[Steady-State Simulations]
28
Initialization Bias
[Steady-State Simulations]
Ensemble averages:
To identify trend in the data due to initialization bias
The average corresponding batch means across replications:
R
Y. j =
1
Yrj
R r =1
R replications
Initialization Bias
[Steady-State Simulations]
30
Initialization Bias
[Steady-State Simulations]
Initialization Bias
[Steady-State Simulations]
Error Estimation
[Steady-State Simulations]
Y = i =1 Yi / n
Error Estimation
[Steady-State Simulations]
k =
k
2
1 + 2
1 k
n
n
k =1
where B =
n / c 1
n 1
34
Error Estimation
[Steady-State Simulations]
Stationary time series Yi
exhibiting positive
autocorrelation.
Stationary time series Yi
exhibiting negative
autocorrelation.
Nonstationary time series
with an upward trend
35
Error Estimation
[Steady-State Simulations]
where B =
n / c 1
and V (Y ) is the variance of Y
n 1
36
Replication Method
[Steady-State Simulations]
Replication Method
[Steady-State Simulations]
and
j = d +1
E[Y.. (n, d )] = n ,d
n,d ~ .
standard error:
1 R
1 R 2
2
2
(
)
S =
Y
Y
Y
R
Y
=
..
..
r.
r.
R 1 r =1
R 1 r =1
2
and
s.e.(Y.. ) =
S
R
38
Replication Method
[Steady-State Simulations]
Reducing
bias
Trade off
Increasing
variance
39
Replication Method
[Steady-State Simulations]
and
Sample Size
[Steady-State Simulations]
z S 1.645 (25.30)
R 0.05 0 =
= 17.1
2
2
Sample Size
[Steady-State Simulations]
Approach:
42
1 jm
Y (t + T0 )dt
j
m
(
1
)
m
A discrete-time process, {Yi, i = d+1,d+2, , n}:
jm
k batches of size m = (n d)/k, batch means:
1
Yj =
Yi + d
m i =( j 1) m +1
Yj =
43
Y1
S
1
=
k
k
Yk
Y2
j =1
(Y j Y )2 =
k 1
j =1
Y j2 kY 2
k (k 1)
Summary
45