Professional Documents
Culture Documents
Chapter 8
Model Goodness: Verification and Validation
Altiok / Melamed Simulation Modeling and Analysis with Arena Chapter 8 1
sanity checks
A simple workstation
A Generic workstation can be described as a queueing system the flow of incoming jobs, either singly or in batches, forms the arrival stream the time a job is delayed for processing at the workstation server is its service time. if an incoming job cannot start processing right away (because servers are busy),
then it is held in a buffer (finite or infinite), and in due time will be removed from the buffer and assigned a server (real-life workstations it is, of course, finite) a job that finds the buffer full on arrival is usually rerouted to another workstation or simply assumed to be lost the order in which jobs queue up in the buffer is called a queueing discipline. a workstation model may have additional wrinkles, such as server failure and repair, routinely modeled via random uptimes and random downtimes
Altiok / Melamed Simulation Modeling and Analysis with Arena Chapter 8 4
A standard notation has been developed to specify a queueing system succinctly, employing slash-separated symbols, representing arrival process, service process, number of servers and queue capacity in this order (an omitted capacity is understood to be infinite)
the symbol GI stands for a general iid distribution (special cases are M for an exponential distribution and D for a deterministic distribution) the symbol G stands for a general distribution non- iid distribution M/M/1 specifies a queue with iid exponential distributions for inter-arrival and service times (Poisson process), a single server and infinite buffer capacity M/D/k/C specifies a queue with iid exponential inter-arrival times, deterministic service times, k servers and a system of capacity of C, of which the first k positions are occupied by servers
Altiok / Melamed Simulation Modeling and Analysis with Arena Chapter 8 5
Service Disciplines
Common service disciplines:
FIFO (First-In-First-Out), also known as FCFS (First-Come-FirstServed) is the most common discipline, where jobs are served in order of arrival LIFO (Last-in-First-Out), also known as LCFS (Last-Come-FirstServed), serves the most recent arrival first SIRO (Service-In-Random-Order) selects the next job in the buffer randomly, with equal probabilities RR (Round Robin) has associated with it a (fixed) service time, often referred to as the time quantum, and jobs are served cyclically, one quantum at a time, until attaining their requisite service time PS (Priority-Service) assumes that jobs have priorities associated with them, and selects a job with the highest service priority jobs, such as FIFO, LIFO, SIRO, etc.
Altiok / Melamed Simulation Modeling and Analysis with Arena Chapter 8 6
N s is the average number of jobs in the system, including queue (buffer) and servers
N q is the average number of jobs in the queue (buffer) only
For a queueing system in steady state of capacity (buffer size) C (finite or infinite),
N S = n Pn
n=1 C
When r 1, then system is said to be unstable, and the server is said to be exhausted
In this case, the server is not able to keep up with the incoming workload, and consequently the number of jobs in the system grows without bound in the long run (system explosion)
Empty-and-Idle
Since the number of incoming and outgoing jobs in a regeneration cycle must coincide, one has
l E [T ] = m E [T ] or equivalently E [T ]/ E [T ] = l / m = r
C B B C
It follows that Pr{server is busy } = r = l / m For Poisson arrivals (iid exponential interarrival intervals)
Since residual interarrival intervals are exponential too, 1/ l Pr{server is idle } = 1 - r = E [T ] C E [X ] E [A ] 1/ m 1/ l i i = = Thus, E [T B ] = and E [T C ] = 1- r 1- r 1- r 1- r
Altiok / Melamed Simulation Modeling and Analysis with Arena Chapter 8 11
which is the service rate while the server is busy For an infinite capacity queue, this becomes
o = l
by flow conservation
12
Littles Formula
Littles Formula is a key general conservation equation, linking the mean number of jobs in the system, N , with the arrival rate, l , and the mean waiting time,W , given by
N = l W
note carefully that l is not the offered arrival rate, but the effective arrival rate, excluding any lost jobs! when the capacity is infinite (so no losses are incurred), then the offered arrival rate and effective arrival rate are the same
= l W
= lW
13
p is the long-run fraction of jobs that find k jobs in the system on k arrival. Such quantities are referred to as customer-average probabilities arrival point probabilities. Note carefully that the number of jobs in the system is computed only at the (random) times of arrival and excludes the arriving job. For this reason this kind of system state is referred to as the state embedded at arrival times, or as the state seen by arriving jobs.
P is the long-run fraction of time that the system has precisely k k jobs in it. Such quantities are referred to as time-average probabilities or arbitrary time probabilities.
Generally p k Pk
For single-server queues with finite capacity, K ,
l (1 - p K ) = m(1 - P 0 )
Altiok / Melamed Simulation Modeling and Analysis with Arena Chapter 8 14
does hold
The most common case where the equality above holds is when the arrival stream is a Poisson process
This case is known as PASTA (Poisson Arrivals See Time Averages)
15
Arena Queues summary statistics report for the single workstation model
Altiok / Melamed Simulation Modeling and Analysis with Arena Chapter 8 17
Arena Resources Summary statistics report for the single workstation model
18
Arena User Specified statistics report for the single workstation model
Altiok / Melamed Simulation Modeling and Analysis with Arena Chapter 8 19
Single-Station Verification
For a replication r, define
D (r ) is the number of departures (jobs processed) during replication r
o 1 (r ) =
D (r ) T (r )
The verification procedure to be outlined uses various sections of the Arena summary reports to estimate the throughput in multiple alternative computations, to show that they are all in reasonable agreement
note that is just circumstantial evidence of verification any major discrepancy among the computations would suggest an error in the simulation program (bug) and will preclude verification
Altiok / Melamed Simulation Modeling and Analysis with Arena Chapter 8 20
Throughput estimation from the Resources section and the throughput equation
an examination of the Resources report shows that the utilization was estimated as u = 0.8358 , and while the workstation was busy, it processed jobs at the rate of 0.25 jobs per hour by the throughput equation o = m(1 - P 0 ) , a second estimate of the throughput is o 2 (1) = mu = 0.25 0.8358 = 0.2090 jobs/hour
Altiok / Melamed Simulation Modeling and Analysis with Arena Chapter 8
21
Throughput estimation from the Counter section in the User Specified report and the effective arrival rate
the Counter section shows that the number of jobs that succeeded in entering the workstation was 20,736 out of a total of 20736+1503 jobs that arrived at the workstation, so that we estimate 1- p = 20736 / ( 20736 + 1503) = 0.9324 K since the throughput is the effective arrival rate, a fourth estimate is just o 4 (1) = l (1 - p K ) = (1/ 4.5) 0.9324 = 0.2072 jobs/hour
Altiok / Melamed Simulation Modeling and Analysis with Arena Chapter 8 22
= 1. 3265
b
= 6. 3969
from the Counter Section of the User Specified report, the = 0.2074 effective arrival rate (equal to throughput ) is l
eff
eff
= 1. 3265 and l
eff
suppose that neither workstation has buffer capacity limitations assume further that the arrival stream consists of two types of jobs: type 1 and type 2, each with its own assembly and painting operations job inter-arrival times are exponentially distributed with means 4 hours for type 1 and 10 hours for type 2. for type 1 jobs, assembly times (in hours) are distributed according to the Tria(1,2,3) distribution, while painting times are deterministic lasting 3 hours for type 2 jobs, assembly times (again in hours) are distributed according to the Tria(1,3,8) distribution, while painting times are deterministic lasting 2 hours this model is simulated for 100,000 hours to obtain resource utilizations and mean flow times by job type, and average WIP (work-in-process) levels in each buffer
Altiok / Melamed Simulation Modeling and Analysis with Arena Chapter 8 24
Dialog box for the StateSet module defining the states of each resource
Altiok / Melamed Simulation Modeling and Analysis with Arena Chapter 8 26
Dialog box and spreadsheet view for the Record module tallying flow times
Altiok / Melamed Simulation Modeling and Analysis with Arena Chapter 8 27
29
30
31
32
= 0.889 , are close, The two figures, u = 0.9 and u but would be even closer if we were to run the model longer
33
The estimated combined average flow time over all job types (weighted by the relative arrival rates) is
The average number of jobs in the system is estimated from the simulation run as the sum of average buffer sizes plus workstation utilizations over all job types, namely,
(k ) + u = [N (k )] = b
k
4.1456 + 4. 8111 + 0. 88924 + 0. 94098 = 10. 787 = 0. 35 31.122 = 10.893 = 10.787 and l W Thus, we find that N
agree closely, in agreement with Littles formula
Altiok / Melamed Simulation Modeling and Analysis with Arena Chapter 8 34
Model validation
Validation activities are critical to the construction of credible models The standard approach to model validation is to collect data (parameter values, performance metrics, etc.) from the system under study and compare them to their model counterparts
the data collection effort of Input Analysis can provide the requisite data from the system under study
data collected is classified into input values and corresponding output values
35
A model is constructed from the observed data and run to produce simulation data (that serve as input data sets) from which the corresponding output data (performance metrics) are then estimated
The correspondence of the generic inputs, I , and generic outputs, O , k k is shown below
Period 1 2 Input Data Set I1 I2 Output Metric Set O1 I2
M
N
M
IN Generic input and output data
Altiok / Melamed Simulation Modeling and Analysis with Arena Chapter 8
M
ON
36
collected from runs of the simulation model of the system under study
Thus,
for the real-life system under study, O i = D i , i = 1, K , N
, i = 1, K , N for the simulation runs, O = D i i
Altiok / Melamed Simulation Modeling and Analysis with Arena Chapter 8 37