This action might not be possible to undo. Are you sure you want to continue?
Introduction To Simulation
A Simulation is the imitation of the operation of a real world process or a facility. The
facility or the process of interest is usually called a system.
In order to study the system we make a set of assumptions about it. These assumptions
constitute a model. Assumptions are expressed in mathematical or logical relationship.
If the model is simple enough, it may be solved by mathematical methods such as
calculus, algebra or probability theory. However, many real world problems are too
complex. Models of these systems are almost impossible to solve analytically. In a
simulation we use a computer to evaluate a model numerically and data are gathered in
order to estimate the desired characteristics of the model.
Systems and System Environment
To model a system, it is necessary to understand the concept of a system and the
system boundary. A system is defined as a group of objects that are joined together in
some regular interaction or interdependence toward the accomplishment of some
purpose.
A system is often affected by changes occurring outside the system. Such changes are
said to occur in the system environment. In modeling systems, it is necessary to decide
on the boundary between the system and its environment. This decision may depend on
the purpose of the study.
Component of a System
In order to understand and analyze a system, a number of terms need to be defined. An
entity is an object of interest in the system. An attribute is a property of an entity. An
activity represents a time period of specific length. If a bank is being studied, customers
might be one of the entities, the balance in their accounts might be an attribute, and
making deposits might be an activity.
The state of a system is defined to be that collection of variables necessary to describe
the system at any time, relative to the objectives of the study. In the study of a bank,
possible state variables are the number of busy tellers, the number of customers waiting
in line or being served, and the arrival time of the next customer. An event is defined as
an instantaneous occurrence that may change the state of the system. The term
id15561140 pdfMachine by Broadgun Software  a great PDF writer!  a great PDF creator!  http://www.pdfmachine.com http://www.broadgun.com
2
endogenous is used to describe activities and events occurring within a system and the
term endogenous is used to describe activities and events occurring within a system and
the term exogenous is used to describe activities and events in the environment that
affect the system. In the bank study, the arrival of a customer is an
endogenous event, and the completion of service of a customer is an endogenous event.
Discrete and Continuous Systems
System can be categorized as discrete or continuous. A discrete system is one in which
the state variable(s) change only at a discrete set of points in time. The bank is an
example of a discrete system, since the state variable, the number of customers in the
bank, changes only when a customer arrives or when the service provided to a customer
is completed.
A continuous system is one in which the state variables(s) change continuously over
time.
Model of a System
A model is defined as a representation of a system for the purpose of studying the
system. For most studies, it is necessary to consider only those aspects of the system
that affect the problem under investigation. These aspects are represented in a model of
the system, and the model, by definition, is a simplification of the system. On the other
hand, the model should be sufficiently detailed to permit valid conclusions to be drawn
about the real system. Different models of the same system may be required as the
purpose of investigation changes.
Types of Models
Models can be classified as being mathematical or physical. A mathematical model uses
symbolic notation and mathematical equations to represent a system. A simulation model
is a particular type of mathematical model of system.
Simulation models may be further classified as being static or dynamic, deterministic or
stochastic, and discrete or continuous. A static simulation model, sometimes called a
Monte Carlo simulation, represents a system at a particular point in time. Dynamic
simulation models represent systems as they change over time. The simulation of a bank
from 9:00 A.M. to 4:00 P.M. is an example of a dynamic simulation.
Simulation models that contain no random variables are classified as deterministic.
Deterministic model have a known set of inputs, which will result in a unique set of
outputs.
3
Steps in Simulation Study
Problem formulation: Every study should begin with a statement of the problem. If the
statement is provided by the policy makers or those that have the problem, the analyst
must ensure that the problem being described is clearly understood.
Setting of objectives and overall project plan
The objective indicates the questions to be answered by simulation. At this point a
determination should be made concerning whether simulation is the appropriate
methodology for the problem as formulated and objective as stated. The overall project
plan should include the plans for the study in terms of the number of people involved, the
cost of the study and the number of days required to accomplish each phase of the work
with the anticipated results at the end of each stage.
Model conceptualization
The construction of a model of a system is probably as much art as science. The art of
modeling is enhanced by an ability to abstract the essential features of a problem. To
select and modify basic assumptions that characterize the system, and then to enrich and
elaborate the model until a useful approximation results, the model complexity need not
exceed that required to accomplish the purposes for which the model is intended.
Violation of this principle will only add to modelbuilding expenses.
It is advisable to involve the model user in model conceptualization. This will both
enhance the quality of the resulting model and increase the confidence of the model user
in the application of the model.
Data collection
There is a constant interplay between the construction of the model and the collection of
the needed input data. As the complexity of the model changes, the required data
elements may also change.
Model translation
Since most realworld systems result in models that require a great deal of information
storage and computation, the model must e entered into a computerrecognizable format.
We use the term “program”, even though it is possible to accomplish the desired result in
many instance with little or no actual coding. The modeler must decide whether to
program the model in a simulation language or to use specialpurpose simulation
software.
4
Verifications
Verification pertains to the computer program prepared for the simulation model. Is the
computer program performing properly? If the input parameters and logical structure of
the model are correctly represented in the computer, verification has been completed.
Validation
Validation is the determination that a model is an accurate representation of the real
system. Validation is usually achieved through the calibration of the model, an iterative
process of comparing the model to actual system behavior and using the discrepancies
between the two, and the insights gained to improve the model. This process is repeated
until model accuracy is judged acceptable.
Experimental design
The alternatives that are to be simulated must be determined. Often, the decision
concerning which alternatives to simulate may be function of runs that have been
completed and analyzed.
Production runs and analysis
Production runs and their subsequent analysis, are used to estimate measures of
performance for the system designs that are being simulated.
Documentation and reporting
There are two types of documentation: program and progress, Program documentation is
necessary for numerous reasons. If the program is going to be used again by the same
or different analysts, it may be necessary to understand how the program operates.
Implementation
The success of the implementation phase depends on how well the previous eleven
steps have been performed. It is also contingent upon how thoroughly the analyst has
involved the ultimate model user during the entire simulation process.
Advantages and Disadvantages of Simulation:
Advantages are
1. New policies, operating procedures, decision rules, information flows,
organizational procedures, and so on can be explored without disrupting ongoing
operations of the real system.
5
2. New hardware designs, physical layouts, transportation systems, and so on, can
be tested without committing resources for their acquisition.
3. Hypotheses about how or why certain phenomena occur can be tested for
feasibility.
4. Time can be compressed or expanded allowing for a speedup or slowdown of the
phenomena under investigation.
5. Insight can be obtained about the interaction of variables.
6. Insight can be obtained about the importance of variables to the performance of
the system.
7. Bottleneck analysis can be performed indicating where workinprocess
information. Materials, so on are being excessively delayed.
8. A
9. “Whatif”, questions can be answered. This is particularly useful in the design of
new systems.
Disadvantages are
1. Model building requires special training. It is an art that is learned over time and
through experience. Furthermore, if two models are constructed by two
competent individuals, they may have similarities, but it is highly unlikely that they
will be the same.
2. Simulation results may be difficult to interpret. Since most simulation outputs are
essentially random variables, it may be hard to determine whether an
observation is a result of system interrelationships or randomness.
3. Simulation modeling and analysis can be time consuming and expensive.
Skimping on resources for modeling and analysis may result in simulation model
or analysis that is not sufficient for the task.
4. Simulation is used in some cases when an analytical solution is possible, or even
preferable.
When simulation is the appropriate tool
Simulation can be used for the following purposes.
6
1. Simulation enables the study of the internal interactions of a complex system or a
subsystem within a complex system.
2. Informational, organizational and environmental changes can be simulated and
their effect on the model can be observed.
3. By changing simulation input and observing the resulting outputs, we may know
which variables are important.
4. Simulation can be used to experiment with new designs or policies so as to
estimate its effect.
5. Simulation can be used to verify analytic solution.
6. Simulation models designed for training allow learning without the cost and
efforts of on the job training.
7. Using animation we can visualize the system in a particular stage of operation.
8. Many modern systems can be so complex that simulation may be the only way to
study them.
When simulation is not appropriate?
Simulation should not be used.
1. If the problem can be solved analytically.
2. If the problem can be solved using common sense.
3. If it is easier to perform direct experiment.
4. If the costs exceed the savings.
5. If the resources and time are not available.
6. If proper and sufficient data are not available.
7. If there is no time or skilled personnel are not available to verify and validate the
model.
8. If system behavior is extremely complex or cannot be defined.
9. If there is an unreasonable expectation.
7
Graded Questions
1. What is system modeling? Give an example and explain the different types of
models. [N04]
2. Define simulation. When is simulation appropriate and when it is not? [N04]
3. Define simulation. What are the various steps in simulation study? [M05]
4. Define model. What are the different types of models? Give example for each.
[M05]
8
2
Simulation Examples
Graded Questions
1. A small grocery store has only one checkout counter. Customers arrive at this
checkout counter at random from 1 to 8 minutes apart. Each possible value of
interarrival time has the same probability of occurrence. The service time distribution
is as follows:
Service time (minutes) : 1 2 3 4 5 6
Probability : 0.05 0.10 0.20 0.30 0.25 0.10
Perform the simulation for 10 customers. Obtain average waiting time in the queue
and average idle time of the server.
2. Observations of past data show the following patterns in respect of interarrival
durations and service durations in a single channel queuing system. Using the
random number table below, simulate the queue behaviour for a period of 60 minutes
and estimate the probability of the service being idle and the mean time spent by a
customer waiting for service.
Interarrival Time Service Time
Minutes Probability Minutes Probability
2 0.15 1 0.10
4 0.23 3 0.22
6 0.35 5 0.35
8 0.17 7 0.23
10 0.10 9 0.10
Random numbers (start at NorthWest corner and proceed along the row)
93 14 72 10 21
81 87 90 38 10
29 17 11 68 99
51 40 30 52 71
3. A plant has a large number of similar machines. The machine breakdowns or failures
are random and independent.
9
The shift incharge of the plant collected the data about the various
machines breakdown times and the repair time required on hourly basis, and
the record for the past 100 observations as shown below was:
Time Between
Recorded
Machine
Breakdown
(hours)
Probability Repair Time
Required
(hours)
Probability
0.5 0.05 1 0.28
1 0.06 2 0.52
1.5 0.16 3 0.20
2 0.33
2.5 0.21
3 0.19
For each hour that one machine is down due to being or waiting to be repaired, the
plant loses Rs. 70 by way of lost production. A repairman is paid at Rs. 20 per hour.
a. Simulate this maintenance system for 15 breakdowns.
b. Obtain the total maintenance cost.
Use following pairs of random numbers:
(61,87), (85,39),(16,28),(46,97),(88,69),(08,87),(82,52),(56,52),(22,15),(49,85)
4. The management of a company is considering the problem of marketing a new
product. The investment or the fixed cost required in the project is Rs. 25,000. There
are three factors that are uncertainselling price, variable cost and the annual sales
volume. The product has a life of only one year. The management has the past data
regarding the possible levels of the three factors.
Unit Selling
Price
(Rs.)
Probability Unit
Variable
Cost
(Rs.)
Probability Sales
Volume
(units)
Probability
40 0.30 20 0.10 3,000 0.20
50 0.50 30 0.60 4,000 0.40
60 0.20 40 0.30 5,000 0.40
Using MonteCarlo simulation technique, determine the average profit from the said
investment on the basis of 20 trials.
10
5. A company manufactures 200 motorcycles per day. Depending upon the availability
of raw materials and other conditions, the daily production has been varying from 196
motorcycles to 204 motorcycies, whose probability distribution is as given below:
Production/day: 196 197 198 199 200 201 202 203 204
Probability: 0.05 0.09 0.12 0.14 0.20 0.15 0.11 0.08 0.06
The motorcycles are transported in a specially designed threestoreyed lorry
that can accommodate only 200 motorcycles. Using the following random
numbers:
82,89,78,24,52,53,61,18,45,04,23,50,77,27,54,10, simulate the process to find out:
a. The average number of motorcycles waiting in the factory?
b. The average number of empty spaces on the lorry?
6. A confectioner sells confectionary items. Past data of demand per week (in hundred
kilograms) with frequency is given below:
7.
Demand/week: 0 5 10 15 20 25
Frequency: 2 11 8 21 5 3
Using the following sequence of random numbers, generate the demand for the next
10 weeks. Also find the average demand per week:
35,52,90,13,23,73,34,57,35,83,94,56,67,66,60
8. Consider the following continuously operating job shop. Interarrival times of jobs are
distributed as follows:
Time between
Arrivals (Hours)
Probability
0
1
2
3
.23
.37
.28
.12
Processing times for jobs are normally distributed with mean 50 minutes and
standard deviation 8 minutes. Construct a simulation table, and perform a simulation
for 10 new customers. Assume that when the simulation beings there is one job
11
being processed (scheduled to be completed in 25 minutes) and there is one job with
a 50minute processing time in the queue.
(a) What was the average time in the queue for the 10 new jobs?
(b) What was the average processing time of the 10 new jobs?
(c) What was the maximum time in the system for the 10 new jobs?
9. A plumbing supply firm is interested in the distribution of leadtime demand of
industrial sinks. The probability distribution for daily for daily demand is known and
occurs as show:
Daily
Demand
0 1 2 3 4
Probability 0.18 0.39 0.29 0.09 0.05
The distribution of leadtime has been reconstructed from past records as
follows:
Lead Time
(Days)
0 1 2 3 4 5
Probability 0.135 0.223 0.288 0.213 0.118 0.023
Develop the distribution of leadtime demand based on 20 cycles of leadtime.
10. Given A, B, C, these independent random variables: Variable A is normally
distributed with u = 100 and o
2
= 400. Variable B is discrete uniformly distributed with
probability distribution given by p (b) = 1/5 with b = 0,1,2,3 and 4. Variable C is
distributed in accordance with the following table.
Value of C Probability
10
20
30
40
.10
.25
.50
.15
Use simulation to estimate the mean of a new variable D, defined as
D = (A – 25B) / (2C)
Use a sample of size 10.
12
11. Leadtime for a stock item is normally distributed with a mean of 7 days and standard
deviation of 2 days. Daily demand is distributed as follows:
Daily
Demand
0 1 2 3 4
Probability 0.367 0.368 0.184 0.062 0.019
Determine the leadtime demand for 20 order cycles. (Round off lead time to the
closest integer during the simulation, and if a negative value results, give it a lead
time of zero.)
12. A bank has one drivein teller and room for one additional customer to wait.
Customers arriving when the queue is full, park and go inside the bank to transact
business. The timebetweenarrivals and servicestime distributions are given below.
Time between
Arrivals (Minutes)
Probability Service Time
(Minutes)
Probability
0 0.09 1 0.20
1 0.17 2 0.40
2 0.27 3 0.28
3 0.20 4 0.12
4 0.15
5 0.12
Simulate the operation of the driveinteller for 10 new customers. The first of the 10 new
customers arrives at a time determined at random. Start the simulation with one customer
being served, leaving at time 3, and one in the queue. How many customers went into
the bank to transact business?
Table Random Normal Numbers
0.23 0.17 0.43 2.18 2.13 0.49 2.72 0.18 0.42
0.24 1.17 0.025 0.67 0.59 0.13 0.15 0.46 1.64
1.16 017 0.36 1.26 0.91 0.71 1.00 1.09 0.02
0.02 0.19 0.04 1.92 0.71 0.90 0.21 1.40 0.38
0.39 0.55 0.13 2.55 0.33 0.05 0.34 1.95 0.44
0.64 0.36 0.98 0.21 0.52 0.02 0.15 0.43 0.62
1.90 0.48 0.54 0.60 0.35 1.29 0.57 0.23 1.41
1.04 0.70 1.69 1.76 0.47 0.52 0.73 0.94 1.63
7.8 0.11 0.91 1.13 0.07 0.45 0.94 1.42 0.75
0.68 1.77 0.82 1.68 2.60 1.59 0.72 0.80 0.61
0.02 0.92 1.76 0.66 0.18 1.32 1.26 0.61 0.83
0.47 1.04 0.83 2.05 1.00 0.70 1.12 0.82 0.08
13
0.40 1.40 1.20 0.00 0.21 2.13 0.22 1.79 0.87
0.75 0.09 1.50 0.14 2.99 0.41 0.99 0.70 0.51
0.66 1.97 0.15 1.16 0.60 0.50 1.36 1.94 0.11
0.44 0.09 0.59 1.37 0.18 1.44 0.80 2.11 1.37
1.41 2.71 0.67 1.83 0.97 0.06 0.28 0.04 0.21
1.21 0.52 0.20 0.88 0.78 0.84 1.08 0.25 0.17
0.07 0.66 0.51 0.04 0.84 0.04 1.60 0.92 1.14
0.08 0.09 1.12 0.40 0.69 0.12
0.53 0.36 2.64 0.22 0.78 1.92 0.26 1.04 1.61
1.56 1.82 1.03 1.14 0.12 0.78 0.12 1.42 0.52
0.03 1.29 0.33 2.60 0.64 1.19 0.13 0.91 0.78
1.49 1.55 0.79 1.37 0.97 0.17 0.58 1.43 1.29
1.19 1.35 0.16 1.03 0.17 0.32 0.28 0.68 0.54
1.19 1.03 0.12 1.07 0.87 1.40 0.24 0.81 0.31
0.11 1.95 0.44 0.39 0.15 1.20 1.98 0.32 2.91
1.86 0.06 0.19 1.29 0.33 1.51 0.36 0.80 0.99
0.16 0.28 0.60 0.78 0.67 0.13 0.47 0.18 0.89
1.21 1.19 0.60 1.22 0.07 1.13 1.45 0.94 0.54
0.82 0.54 0.98 0.13 1.52 0.77 0.95 0.84 2.40
0.75 0.80 0.28 1.77 0.16 0.33 2.43 1.11 1.63
0.42 0.31 1.56 0.56 0.64 0.78 0.04 1.34 0.01
150 1.78 0.59 0.16 0.36 1.89 1.19 0.53 0.97
0.89 0.08 0.95 0.73 1.25 1.04 0.47 0.68 0.87
0.19 0.85 1.68 0.57 0.37 0.48 0.17 2.36 0.53
0.49 0.32 2.08 1.02 2.59 0.53 0.15 0.11 0.05
1.44 0.07 0.22 0.93 1.40 0.54 1.28 0.15 0.67
0.21 0.48 1.21 0.67 1.10 0.75 0.37 0.68 0.02
0.65 0.12 0.94 0.44 1.21 0.06 1.28 1.51 1.39
0.24 0.83 1.55 0.33 0.59 1.24 0.70 0.01 0.15
0.73 1.24 0.40 0.61 0.68 0.69 0.07 0.23 0.66
1.93 0.75 0.32 0.95 1.35 1.51 0.88 0.10 1.19
0.08 0.16 0.38 0.96 1.99 0.20 0.98 0.16 0.26
0.47 1.250 0.32 0.51 1.04 0.97 2.60 0.08 1.19
Simulation Examples
Chap – 2
Simulation of Queuing Systems –
14
A queuing system is described by its calling population, the nature of the arrivals, the
service mechanism, the system capacity & the queuing discipline.
Calling population waiting line server
Fig. Queuing System
In the single channel queue, the calling population is infinite ie if a unit leaves the
calling population & joins the waiting lines or entire service, there is no change in the
arrival rate of other units that may need service.
In the single queue, the system works an FIFO by a single server or channel.
Arrivals & services are defined by the distribution by the distribution of service
times, resp. for any simple single or multi channel queue the overall effective motival sale
must be lets than the total service rate or the waiting line wall grow without bound. When
queues grow without bound they are termed explosive or unstable.
1. The average waiting time for a customer 2.8 minutes. This is determined in the
following manner.
Average waiting time total time customers wait in queue (minutes)
=
(minutes) total numbers of customers
56
= = 2.8 minutes
20
2. The probability that a customer has to wait in the queue is 0.65. This is
determined in the following manner:
Number of customers who wait
Probability (wait) =
Total number of customers
13
= = 0.65
20
15
3. The fraction of idle time of the server is 0.21. This is determined in the following
manner:
Probability of idle total idle tune if server (minutes)
Server =
Total run time of simulation (minutes)
18
= 86 = 0.21
The probability of the server being busy is the complement of 0.21, or 0.79.
4. The average service time is 3.4 minutes, determined as follows:
Average service time total service time (minutes)
(minutes) =
total number of customers
68
= = 3.4 minutes
20
This result can be compared with the expected service time by finding the mean of the
service time by finding the mean of the servicetime distribution using the equation
·
E (S) = ¯ s p (s)
S=0
Applying the expectedvalue equation to the distribution in Table 2.7 gives an expected
service time of:
= 1(0.10) + 2 (0.20) + 3 (0.30) + 4 (0.25) + 5 (0.10) + 6 (0.05)
= 3.2 minutes
the expected service time is slightly lower that the average service time in the simulation.
The longer the simulation, the closer the average will be to E (S).
5. The average time between arrivals is 4.3 minutes. This is determined in the
following manner:
Sum of all times
Average time between = between arrivals (minutes)
Arrivals (minutes)
Number of arrivals – 1
82
= = 4.3 minutes
19
One is subtracted from the denominator because the first arrival is assumed to occur at
time 0. This result can be compared to the expected time between arrivals by finding the
16
mean of the discrete uniform distribution whose endpoints are a = 1 and b = 8. The mean
is given by
a + b 1 + 8
E (A) = = 4.5 minutes
2 2
The expected time between arrivals is slightly higher than the average. However, as the
simulation becomes longer, the average value of the time between arrivals will approach
the theoretical mean, E (A).
6. The average waiting time of those who wait is 4.3 minutes. This is determined in
the following manner.
Average waiting time of total time customers wait in queue (minutes)
=
those who wait (minutes) total number of customers who wait
56
= = 4.3 minutes
13
7. The average time a customer spends in the system is 6.2 minutes. This can be
determined in two ways. First, the computation can be achieved by the following
relationship:
Total time customers spend in the
Average time customer system (minutes)
Spends in the system =
(minutes) total number of customers
124
= = 6.2 minutes
20
The second way of computing this same result is to realize that the following relationship
must hold:
Average time average time average time
Customers spends customer spends customer spends
In the system = waiting in the + in service
(minutes) queue (minutes) (minutes)
From finding 1 and 4 this results in:
Average time customer spends in the system (minutes)
= 2.8 + 3.4 = 6.2 minutes
17
A decision maker would be interested in results of this type, but a longer
simulation would increase the accuracy of the findings. However, some subjective
inferences can be drawn at this point. Most customers have to wait; however, the
average waiting time is not excessive. The server does not have an undue amount of idle
time. Objective statements about the results would depend on balancing the cost of
waiting with the cost of additional servers. (Simulations requiring variations of the arrival
and service distribution, as well as implementation in qa spreadsheet, are presented as
exercises for the reader.)
2.2 Simulation of Inventory Systems
An important class of simulation problems involves inventory systems. A simple
inventory system is shown in Figure 2.7. This inventory system has a periodic review of
length N, at which time the inventory level is checked. An order is made to bring the
inventory up to the level M. At the end of the first review period, an order quantity, Q
1
, is
placed. In this inventory system the leadtime (i.e., the length of time between the
placement and receipt of an order) is zero. Since demands are not usually known with
certainty, the order quantities are probabilistic. Demand is shown as being uniform over
the time period in Figure and do fluctuate over time. One possibility is that demands all
occur at the beginning of the cycle. Another is that the lead time is random of some
positive length.
Figure 2.7 Probabilistic orderlevel inventory systems.
Notice that in the second cycle, the amount in inventory drops below zero,
indicating a shortage. In Figure 2.7, these units are backordered; when the order arrives,
the demand for the backordered items is satisfied first. To avoid shortages, a buffer, or
safety, stock would need to be carried.
18
Carrying stock in inventory has an associated cost attributed to the interest paid
on the funds borrowed to buy the items (this also could be considered as the loss from
not having the funds available for other investment purposes). Other costs can be placed
in the carrying or holding cost column: renting of storage space, hiring guards, and so on.
An alternative to carrying high inventory is to make more frequent reviews, and
consequently, more frequent purchases or replenishments. This has an associated cost:
the ordering cost. Also, there is a cost in being short. Customers may get angry, with a
subsequent loss of good will. Larger inventories decrease the possibilities of shortages.
These costs must be traded off in order to minimize the total cost of an inventory system.
The total cost (or total profit) of an inventory system is the measure of
performance. This can be affected by the policy alternatives. For example, in Figure 2.7,
the decision maker can control the maximum inventory level, M, and the length of the
cycle, N. What effect does changing N have on the various costs?
In an (M, N) inventory system, the events that may ovvur are: the demand for
items in the inventory, the review of the inventory position, and the receipt of an order at
the end of each review period. When the leadtime is zero, as in Figure 2.7, the last two
events occur simultaneously.
In the following example for deciding how many newspapers to buy, only a single
time period of specified length is relevant and only a single procurement is made.
Inventory remaining at the end of the single time period is sold for scrap or discarded. A
wide variety of realworld problems are of this form, including the stocking of spare parts,
perishable items, style goods, and special seasonal items [Hadley and Whitin, 1963].
SUMMARY:
This chapter introduced simulation concepts via eg in order to illustrate general areas of
application.
Ad hoc simulation tables were used in completing each eg.,
19
3
General Principles
3.1 Concepts in DiscreteEvent Simulation
The concept of a system and a model of a system were discussed briefly in
Chapter1. This chapter deals exclusively with dynamic, stochastic systems (i.e., involving
time and containing random elements) with change in a discrete manner. This section
expands on these concepts and develops a framework for the development of a discrete
event model of a system. The major concepts are briefly defined and then illustrated by
examples:
System A collection of entities (e.g., people and machines) that interact together
over time to accomplish one or more goals.
Model An abstract representation of a system, usually containing structural, logical,
or mathematical relationships which describe a system in terms of state, entities and
their attributers, sets, processes, events, activities, and delays.
System state A collection of variables that contain all the information necessary to
describe the system at any time.
Entity Any object or component in the system, which requires explicit representation
in the model (e.g., a server, a customer, a machine).
Attributes The properties of a given entity (e.g., the priority of a waiting customer,
the routing of a job through a job shop).
List A collection of (permanently or temporarily) associated entities, ordered in some
logical fashion (such as all customers currently in a waiting line, ordered by first
come, first served, or by priority).
Event An instantaneous occurrence that changes the state of a system (such as an
arrival of a new customer).
Event notice A record of an event to occur at the current or some future time, along
with any associated data necessary to execute the event; at a minimum, the record
includes the event type and the event time.
20
Event list A list of event notices for future events, ordered by time of occurrence;
also known as the future even list (FEL).
Activity A duration of time of specified length (e.g., a service time or interarrival
time), which is known when it begins (although it may be defined in terms of a
statistical distribution).
Delay A duration of time of unspecified indefinite length, which is not known until it
ends (e.g., a customer’s delay in a lastin, firstout waiting line which, when it begins,
depends on future arrivals).
Clock A variable representing simulated time, called CLOCK in the examples to
follow.
Different simulation packages use different terminology for the same or similar
concepts. For the same or similar concepts. For example, lists are sometimes called sets,
queues, or chains. Sets or lists are used to hold entities as well as event notices. The
entities on a list are always ordered by some rule, such as firstin, firstout or lastin, first
out, or ranked by some entity attribute, such as priority or due date. The future event list
is always ranked by the event time recorded in the event notice. Section 3.2 discusses a
number of methods for handling lists and introduces some of the methodologies for
efficient processing of ordered sets or lists.
An activity typically represents a service time, an interarrival time, or any other
processing time whose duration has been characterized and defined by the modeler. An
activity’s duration may be specified in a umber of ways:
1. Deterministic – for example, always exactly 5 minutes;
2. Statistical  for example, as a random draw from among 2,5,7 with equal
probabilities;
3. A function depending on system variables and/or entity attributes – for example,
loading time for an iron ore ship as a function of the ship’s allowed cargo weight
and the loading rate in tons per hour.
However it is characterized, the duration of an activity is computable from its
specification at the instant it begins. Its duration is not affected by the occurrence of other
events (unless, as is allowed by some simulation packages, the model contains logic to
cancel an event). To keep track of activities and their expected completion time, at the
simulated instant that an activity duration begins, an event notice is created having an
event time equal to the activity’s completion time. For example if the current simulated
time is CLOCK = 100 minutes and an inspection time of exactly 5 minutes is just
21
beginning, then an event notice is created that specifies the type of event (an end of
inspection event) and the event time (100 + 5 = 105 minutes).
In contrast to an activity, a delay’s duration is not specified by the modeler ahead
of time, but rather is determined by system conditions. Quite often, a delay’s duration is
measured and is one of the desired outputs of a model run. Typically, a delay ends when
some set of logical conditions becomes true or one or more other events occur. 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 as well as the availability of servers
and equipment.
A delay is sometimes called a conditional wait, while an activity is called an
unconditional wait. The completion of an activity is an event, often called a primary event,
that is managed by placing an event notice on the FEL. In contrast, delays are managed
by placing the associated entity on another list, perhaps representing a waiting line, until
such time as system conditions permit the processing of the entity. The completion of a
delay is sometimes called a Conditional or Secondary Event, but such events are not
represented by event notices nor do they appear on the FEL.
A discreteevent simulation is the modeling over time of a system all of whose
state changes occur at discrete points in timethose points when an event occurs. A
discreteevent simulation (hereafter called a simulation) proceeds by producing a
sequence of system snapshots (or system images) which represent the evolution of the
system through time. A given snapshot at a given time (CLOCK = t) includes not only the
system state at time t, but also a list (the FEL) of all activities currently in progress and
when each such activity will end, the status of all entities and current membership of all
sets, plus the current values of cumulative statistics and counters that will be used to
calculate summary statistics at the end of the simulation. A prototype system snapshot is
shown in Figure 3.1. (Not all models will contain every element exhibited in Figure 3.1.
Further illustrations are provided in the examples in this chapter.)
3.1.1 The EventScheduling/TimeAdvance Algorithm
The mechanism for advancing simulation time and guaranteeing that all events occur in
correct chronological order is based on the future event list (FEL). This list contains all
event notices for events that have been scheduled to occur at a future time. Scheduling a
future event means that at the instant an activity begins, its duration is computed or
drawn as a sample from a statistical distribution and the endactivity event, together with
its event time, is placed on the future event list. In the real world, most future events are
not scheduled but merely happensuch as random breakdowns or random arrivals. In the
model, such random events are represented by the end of some activity, which in turn is
represented by a statistical distribution.
At any given time t, the FEL contains all previously scheduled future events and
their associated event times (called t
1
, t
2
, … in Figure 3.1). The FEL is ordered by event
22
time, meaning that the events are arranged chronologically; that is, the event times
satisfy
T < t
1
< t
2
< t
3
< . . .. < t
n
Time t is the value of CLOCK, the current value of simulated time. The event
associated with time t
1
is called the imminent event; that is, it is the next event that will
occur. After the system snapshot at simulation time CLOCK = t has been updated, the
CLOCK is advanced to simulation time CLOCK = t
1
, and the imminent event notice is
removed from the FEL and the event executed. Execution of the imminent event means
that a new system snapshot for time t
1
is created based on the old snapshot at time t and
the nature of the imminent event. At time t
1
, new future events may or may not be
generated, but if any are, they are scheduled by creating event notices and putting them
in their proper position on the FEL. After the new system snapshot for time has been
updated, the clock is advanced to the time of the new imminent event and that event is
executed. This process repeats until the simulation is
The length and contents of the FEL are constantly changing as the simulation
progresses, and thus its efficient management in a computerized simulation will have a
major impact on the efficiency of the computer program representing the model. The
management of a list is called list processing. The major event, addition of a new event to
the list, and occasionally removal of some event (called cancellation of an event). As the
imminent event is usually at the top of the list, its removal is as efficient as possible.
Addition of a new event (and cancellation an old event) requires a search of the list. The
efficiency of this search depends on the logical organization of the list and on how the
search is conducted. In addition to the FEL, all the sets in a model are maintained in
some logical order, and the operations of addition and removal of entities from the set
also require efficient listprocessing techniques. A brief introduction to list processing in
simulation is given in Section 3.2.
We can the removal and addition of events from the FEL is illustrated in Figure
3.2. Event 3 with event time t
1
represents, say, a servicecompletion event at server 3.
Since it is the imminent event at time t, it is removed from the FEL in step 1 (Figure 3.2)
of the eventscheduling/timeadvance algorithm. When event 4 (say, an arrival event)
with event time t* is generated at step 4, one possible way to determine its correct
position on the FEL is to conduct a topdown search:
If t* < t
2
place event 4 at the top of the FEL.
If t
2
< t* < t
3
, place event 4 second on the list.
If t
3
< t* < t
4
, place event 4 third on the list.
:
:
If t
n
< t*, place event 4 last on the list.
(In figure 3.2, it was assumed that t* was between t
2
and t
3
.) Another way is to conduct a
bottomup search. The least efficient way to maintain the FEL is to leave it as an
23
unordered list (additions placed arbitrarily at the top or bottom), which would require at
step 1 of Figure 3.2 a complete search of the list for the imminent event before each
clock advance. (The imminent event is the event on the FEL with the lowest event time.)
The system snapshot at time 0 is defined by the initial conditions and the
generation of the socalled exogenous events. The specified initial conditions define the
system state at time 0. For example, in Figure 3.2, if t = 0, then the state (5,1,6) might
represent the initial number of customers at three different points in the system. An
exogenous event is a happening “outside the system” which impinges on the system. An
important example is an arrival to a queuing system. At time 0, the first arrival event is
generated and is scheduled on the FEL (meaning its event notice is placed on the FEL).
The interarrival time is an example of an activity. When the clock eventually is advanced
to the time of this first arrival, a second arrival event is generated. First, an interarrival
time is generated, a*; it is added to the current time, CLOCK = t; the resulting (future)
event time, t + a* = t*, is used to position the new arrival event
Figure 3.3. Generation of an external arrival stream by bootstrapping.
Notice on the FEL. This method of generating an external arrival stream, called
bootstrapping, provides one example of how future events are generated in step 4 of the
eventscheduling/timeadvance algorithm. Bootstrapping is illustrated in Figure 3.3. The
first three interarrival times generated are 3.7, 0.4, and 3.3 time units. The end of an
interarrival interval is an example of a primary event.
A second example of how future events are generated (step 4 of Figure 3.2) is
provided by a servicecompletion event in a queueing simulation. When one customer
completes service, at current time CLOCK = t, if the next customer is present, then a new
service time, s*, will be generated for the next customer. The next servicecompletion
event will be scheduled to occur at future time t* = t + s* by placing onto the FEL a new
24
event notice of type service completion with event time t*. In addition, a service
completion event will be generated and scheduled at the time of an arrival event,
provided that, upon arrival, there is at least one idle server in the server group. A service
time is an example of an activity. Beginning service is a conditional event, because its
occurrence is triggered only on the condition that customer is present and a server is
free. Service completion is an example of a primary event. Note that a conditional event,
such as beginning service, is triggered by a primary event occurring and certain
conditions prevailing in the system. Only primary events appear on the FEL.
A third important example is the alternate generation of runtimes and downtimes
for a machine subject to breakdowns. At time 0, the first runtime will be generated and an
endofruntime event scheduled. Whenever an endofruntime event occurs, a downtime
will be generated and an endofdowntime event scheduled on the FEL. When the
CLOCK is eventually advanced to the time of this endofdowntime event, a runtime is
generated and an endofruntime event scheduled on the FEL. In this way, runtimes and
downtimes continually alternate throughout the simulation. A runtime and a downtime are
examples of activities, and end of runtime and end of downtime are primary events.
Every simulation must have a stopping event, here called E, which defines how
long the simulation will run. There are generally two ways to stop a simulation:
1. At time 0, schedule a stop simulation event at a specified future time T
E
. Thus,
before simulating, it is known that the simulation will run over the time interval [0,
T
E
]. Example: Simulate a job shop for T
E
= 40 hours.
2. Run length T
E
is determined by the simulation itself. Generally, T
E
is the time of
the 100
th
service completion at a certain service center. T
E
is the time of
breakdown of a complex system. T
E
is the time of disengagement or total kill
(whichever occurs first) in a combat simulation. T
E
is the time at which a
distribution center ships the last carton in a day’s orders.
In case 2, T
E
is not known ahead of time. Indeed, it may be one of the statistics of
primary interest to be produced by the simulation.
3.1.2 World Views
When using a simulation package or even when doing a manual simulation, a
modeler adopts a world view or orientation for developing a model. Those most
prevalent are the eventscheduling world view, as discussed in the previous section,
the processinteraction world view, and the activityscanning world view. Even if a
particular package does not directly support one or more of the world views,
understanding the different approaches may suggest alternative ways to model a
given system.
To summarize the previous discussion, when using the eventscheduling
approach, a simulation analyst concentrates on events and their effect on system
25
state. This world view will be illustrated by the manual simulations of Section 3.1.3
and the C++ simulation in Chapter 4.
When using a package that supports the processinteraction approach, a
simulation analyst thinks in terms of processes. The analyst defines the simulation
model in terms of entities or objects and their life cycle as they flow through the
system, demanding resources and queueing to wait for resources. More precisely, a
process is the life cycle of one entity. This life cycle consists of various events and
activities. Some activities may require the use of one or more resources whose
capacities are limited. These and other constraints cause processes to interact, the
simplest example being an entity forced to wait in a queue (on a list) because the
resource it needs is busy with another entity. The processinteraction approach is
popular because of its intitive appeal, and because the simulation packages that
implement it allow an analyst to describe the process flow in terms of highlevel block
or network constructs, while the interaction among processes is handled
automatically.
In more precise terms, a process is a timesequenced list of events, activities,
and delays, including demands for resources, that define the life cycle of one entity
as it moves through a system.
An example of a “customer process” is shown in Figure 3.4. In this figure, we
see the interaction between two customer processes as customer n + 1 is
delayed until the previous customer’s “endservice event” occurs. Usually
many processes are simultaneously active in amodel, and the interaction
among processes may be quite complex.
Underlying the implementation of the processinteraction approach in a
simulation package, but usually hidden from a modeler’s view, events are being
scheduled on a future event list and entities are being placed onto lists whenever
they face delays, causing one process to temporarily suspend its execution while
other processes proceed. It is important that the modeler have a basic understanding
26
of the builtin but hidden rules of operation. Schriber and Brunner [1998] provide
understanding in this area.
Both the eventscheduling and the processinteraction approaches use a variable
time advance; that is, when all events and system state changes have occurred at
one instant of simulated time, the simulation clock is advanced to the time of the next
imminent event on the FEL. The activityscanning approach, in contrast, uses a fixed
time increment and a rulebased approach to decide whether any activities can begin
at each point in simulated time.
With the activityscanning approach, a modeler concentrates on the activities of a
model and those conditions, simple or complex that allows an activity to begin. At
each clock advance, the conditions for each activity begin. Proponents claim that the
activityscanning approach is simple in concept and leads to modular models that are
more maintainable and easily understood and modified by other analysts at later
times. They admit, however, that the repeated scanning to determine whether an
activityscanning approach has been modified (and made conceptually somewhat
more complex) by what is called the threephase approach, which combines some of
the features of event scheduling with activity scanning to allow for variable time
advance and the avoidance of scanning when it is not necessary, but keeping the
main advantages of the activityscanning approach.
In the threephase approach, events are considered to be activities of duration
zero time units. With this definition, activities are divided into two categories, called B
and C.
B activities Activities bound to occur; all primary events and unconditional activities.
C activities Activities or events that are conditional upon certain conditions being
true.
The Btype activities and events can be scheduled ahead of time, just as in the
eventscheduling approach. This allows variable time advance. The FEL contains only B
type events. Scanning to check if any Ctype activities can begin or Ctype events occur
happens only at the end of each time advance, after all Btype events have completed. In
summary, with the threephase approach, the simulation proceeds with repeated
execution of the three phases until it is completed:
Phase A Remove the imminent event from the FEL and advance the clock to its
event time. Remove any other events from the FEL that have the same event time.
Phase B Execute all Btype events that were removed from the FEL. (This may free
a number of resources or otherwise change system state.)
27
Phase C Scan the conditions that trigger each Ctype activity and activate any whose
conditions are met. Rescan until no additional Ctype activities can begin or events
occur.
The threephase approach improves the execution efficiency of the activity
scanning method. In addition, proponents claim that the activityscanning and three
phase approaches are particularly good at handling complex resource problems, in which
various combinations of resources are needed to accomplish different tasks. These
approaches guarantee that resources being freed at a given simulated time will be freed
before any available resources are reallocated to new tasks.
List processing
List processing deals with methods for handling
lists of entities & the failure event list. Simulation
packages provide both explicitly for an analysts use as
well as hidden in the simulation machanism behind the
language, facilities for an analyst or the model itself to
use lists & perform the basic operations on lists.
Section 3.2.1 describes the basic properties and operations performed on lists.
Section 3.2.2 discusses the use of arrays for processing lists and the use or array indices
to create linked lists, arrays being a simpler mechanism for describing the basic
operations than the more general dynamically allocated linked lists discussed in Section
3.2.3. Finally, Section 3.2.4 briefly introduces some of the more advanced techniques for
managing lists.
The purpose of this discussion of list processing is not to prepare the reader to
implement lists and their processing in a generalpurpose language such as FORTRAN,
C, or C++ but rather to increase the reader’s understanding of lists and the underlying
concepts and operations.
3.2.1. Lists: Basic Properties and Operations
As previously discussed, lists are a set of ordered or ranked records. In
simulation, each record represents one entity or one event notice.
Since lists are ranked, they have a top or head (the first item on the list); some
way to traverse the list (to find the second, third, etc, items on the list); and a bottom or
28
tail (the last item on the list). A head pointer is a variable that points to or indicates the
record at the top of the list. Some implementations of lists may also have a tail pointer
that points to the bottom item on the list.
For purposes of discussion, an entity along with its attributes or an event notice
will be referred to as a record. An entity identifier and its attributes are fields in the entity
record; the event type, event time, and any other eventrelated data are fields in the
eventnotice record. Each record on a list will also have a field that holds a “next pointer”
that points to the next record on the list, providing a way to traverse the list. Some lists
may also require a “previous pointer” to allow traversing the list from bottom to top.
For either type of list, the main activities in list processing are adding a record to
a list and removing a record from a list. More specifically, the main operations on a list
are:
1. Removing a record from the top of the list.
2. Removing a record from any location on the list.
3. Adding an entity record to the top or bottom of the list.
4. Adding a record to an arbitrary position on the list, determined by the ranking
rule.
While the first and third operations, removing or adding a record to the top or
bottom of the list, can be carried out in minimal time by adjusting two record pointers and
the head or tail pointer, the other two operations require at least a partial search through
the list. Making these two operations efficient is the goal of list processing techniques.
In the eventscheduling approach, when time is advanced and the imminent
event is due to be executed, the removal operation takes place first, namely, the event at
the top of the FEL is removed from the FEL. If an arbitrary event is being canceled, or an
entity is removed from a list based on some of its attributes (say, for example, its priority
and due date) to begin an activity, then the second removal operation is performed.
When an entity joins the back of a firstin, firstout queue implemented as a list, then the
third operation, adding an entity to the bottom of a list, is performed. Finally, if a queue
has a ranking rule of earliest due date first, then upon arrival to the queue, an entity must
be added to the list, not at the top or bottom, but at the position determined by the due
date ranking rule.
When simulating on a computer, whether using a generalpurpose language
such as FORTRAN, C, or C++, or a simulation package, each entity record and event
notice is stored in a physical location in computer memory. There are two basic
possibilities: (a) All records are stored in arrays. Arraya hold successive records in
contiguous locations in computer memory. They therefore can be referenced by an array
index that can be thought of as a row number in a matrix. (b) All entities and event
notices are represented by structures (as in C) or classes (as in C++), allocated from
RAM as needed, and tracked by pointers to a record or structure.
29
Most simulation packages use dynamically allocated records and pointers to
keep track of lists of items. As arrays are conceptually simpler, the concept of linked lists
is first explained through arrays and array indices in Section 3.2.2 and then applied to
dynamically allocated records and pointers in Section 3.2.3.
3.2.2. Using Arrays For List Processing
The array method of list storage is typical of FORTRAN but may be used in other
procedural languages. As most versions of FORTRAN do not have actual recordtype
data structures, a record may be implemented as a row in a twodimensional array or as
a number of parallel arrays. For convenience, we use the notation R(i) to refer to the i th
record in the array, however it may be stored in the language being used. Most modern
simulation packages do not use arrays for list storage but rather use dynamically
allocated records—that is, records that are created upon first being needed and
destroyed when they are no longer needed.
Arrays are advantageous in that any specified record, say the i th, can be
retrieved quickly without searching, merely by referencing R(i). Arrays are disadvantaged
when items are added to the middle of a list or the list must be rearranged. In addition,
arrays typically have a fixed size, determined at compile time or upon initial allocation
when a program first begins to execute. In simulation, the maximum number of record for
any list may be difficult or impossible to determine ahead of time, while the current
numberin a list may vary widely over the course of the simulation run. Worse yet, most
simulations repuire more than one list, and if kept in separate arrays, each would have to
be dimensioned to the largest the list would ever be, potentially using excessive amounts
of computer memory.
3.2.3. Using Dynamic Allocation and Linked Lists
In procedural languages such as C and C++, and in most simulation languages,
entity records are dynamically created when an entity is created and event notice records
are dynamically created whenever an event is scheduled on the future event list. The
languages themselves, or the operating systems on which they are running, maintain a
linked list of free chunks of computer memory and allocate a chunk of desired size upon
request to running programs. (Another use of linked lists!) When an entity “dies” – that is,
exits from the simulated system – and also after an event occurs and the event notice is
no longer needed, the corresponding records are freed, making that chunk of computer
memory available for later reuse; the language or operating system adds the chunk to the
list of free memory.
In this text, we are not concerned with the details of allocating and freeing
computer memory, and we will assume that the necessary operations occur as needed.
With dynamic allocation, a record is referenced by a pointer instead of an array index.
When a record is allocated in C or C++, the allocation routine returns a pointer to the
allocated record, which must be stored in a ariable or a field of another record for later
30
use. A pointer to a record can be thought of as the physical or logical address in
computer memory of the record.
In our example, we will use a notation for records identical to that in the previous
section (3.2.2):
Entities: [ID, attributes, next pointer]
Event notice: [event type, event time, other data, next pointer]
but we will not reference them by the array notation R(i) as before, because it would be
misleading. If for some reason we wanted the third item on the list, we would have to
traverse the list, counting items until we reached the third record. Unlike arrays, there is
no way to retrieve directly the ith record in a linked list, as the actual records may be
stored at any arbitrary location in computer memory and are not stored contiguously as
are arrays.
Summary
This chapter introduced the major concepts & building blocks in simulations the
most important being entities & attributes, events & activities.
Exercises
1) Prepare a banking system model with the future event list if the 4 customers & 2
solvers and model the clock for 2 days
2) Prepare 1. System state 2. System entities & their attributes 3. Sets & the entities
that may be put into the sets. 4. Events & activities for any 5 systems (either single
server or double server).
3) Prepare a table in the until the clock reaches time 15, _________the international &
service times given below in the order shown. The stopping event will be at time 30.
International times 1 5 6 3 8
Service time 5 3 4 1 5.
31
4
Simulation Software
In this chapter we first discuss the history of simulation software – a history that
is just reaching middle age. We base this history on our collective experience, articles
written by Richard Nance, and panel discussions at the annual Winter Simulation
Conference.
Next, we discuss features and attributes of simulation software. If you were about
to purchase simulation software, what would concern you? Would it be the cost, the ease
of learning, the ease of use, or would it be the power to model the kinds of system with
which you are concerned? Or would it be the animation capabilities? We then discuss
other issues and concerns related to the selection of simulation software.
Software that is used to develop simulation models can be divided into three
categories. First, there are the general – purpose programming languages, such as
FORTRAN, C, and C++. Second, there are simulation programming languages,
examples being GPSS/H
TM
, and SIMAN V. Third, there are the simulation environments.
This category includes many products that are distinguished one way or another (by, for
example, cost, application area, or type of animation) but have common characteristics
such as a graphical user interface and an environment that supports all (or most) aspects
of a simulation study. Many simulation environments contain a simulation programming
language, while some take a graphical approach similar to process flow diagramming.
In the first category, we discuss simulation in C++. C++ is a general purpose
programming language that was not specifically designed for use in simulation. C++ was
chosen since it is widely used and widely available. Today very few people are writing
discreteevent simulation models using programming languages alone. However, in
certain application areas, some people are
4.2 Selection of Simulation Software
This chapter includes a brief introduction to a number of simulation software packages.
There are guides to simulation software published in at least two sources. In May of each
year, IIE Solutions (Institute of Industrial Engineers) presents a “Simulation Software
Buyer’s Guide.” The 1999 guide had 39 products in it. Every two years, OR/MS Today
publishes a simulation software survey [Swain, 1999]. The 1999 issue had 54 products,
including simulation support packages such as input data analyzers.
32
There are many features that are relevant when selecting simulation software [Banks,
1996]. Some of these features are shown, along with a brief description, in Tables 4.1 to
4.5. We offer the following advice when evaluating and selecting simulation software:
1. Do not focus on a single issue such as ease of use. Consider the accuracy and
level of detail obtainable, ease of learning, vendor support, and applicability to
your problems.
2. Execution speed is important. Do not think exclusively in terms of experimental
runs that take place at night and over the weekend. Speed affects development
time. During debugging, an analyst may have to wait for the model to run up to
the point in simulated time where an error occurs many times before the error is
identified.
3. Beware of advertising claims and demonstrations. Many advertisements exploit
positive features of the software only. Similarly, the demonstrations solve the test
problem very well, but perhaps not your problem.
4. Ask the vendor to solve a small version of your problem.
5. Beware of “checklists” with “yes” and “no” as the entries. For example, many
packages claim to have a conveyor entity. However, implementations have
considerable variation and level f fidelity. Implementation and capability are what
is important. As a second example, most packages offer a runtime license, but
these vary considerably in price and features.
6. Simulation users ask if the simulation model can link to and use code or routines
written in external languages such as C, C++, or FORTRAN. This is a good
feature, especially when the external routines already exist ad are suitable for the
purpose at hand. However, the more important question is whether the simulation
package and language are sufficiently powerful to avoid having to write logic in
any external language.
7. There may be a significant tradeoff between the graphical modelbuilding
environments and ones based on a simulation language. While graphical model
building removes the learning curve due to language syntax, it does not remove
the need for procedural logic in most realworld models and the debugging to get
it right. Beware of “no programming required” unless either the package is a near
perfect fit to your problem domain, or programming (customized procedural
logic) is possible with the supplied blocks, nodes, or process flow diagram, in
which case “no programming required” refers to syntax only and not the
development of procedural logic.
33
4.3 An Example Simulation
EXAMPLE 4.1 (The Checkout Counter: A Typical SingleServer Queue)
The system, a grocery checkout counter, is modeled as a single – server queue. The
simulation will run until 1000 customers have been served. In addition, assume that the
inter arrival times of customers are exponentially distributed with a mean of 4.5 minutes,
and that the service times are (approximately) normally distributed with a mean of 3.2
minutes and a standard deviation of 0.6 minute. (The approximation is that service times
are always positive). When the cashier is busy, a queue forms with no customers turned
away. This example was manually simulated in Examples 3.3 and 3.4 using the event
scheduling point of view. The model contains two events, the arrival and departure
events. Figures 3.5 and 3.6 provide the event logic.
The following three sections illustrate the simulation of this single – server queue in C ++,
GPSS/H, and CSIM. Although this example is much simpler than models that arise in the
study of complex systems, its simulation contains the essential components of all
discreteevent simulations.
4.4 Simulation in C ++
C ++ is a widely used programming language that has been used extensively in
simulation. (The definitive book on C ++ is its designer’s [Stroustup, 1997]. It does not,
however, provide any facilities directly aimed at aiding the simulation analyst, who
therefore must program all details of the event – scheduling/time – advance algorithm,
the statistics – gathering capability, the generation of samples from specified probability
distributions, and the report generator. However, the runtime library does provide a
random – number generator. Unlike FORTRAN or C, the object – orientedness of C ++
does support modular construction of large models. For the most part, the special –
purpose simulation languages hide the details of event scheduling, whereas in C ++ all
the details must be explicitly programmed. However, to a certain extent simulation
libraries such as CSIM [Schwetman, 1987] alleviate the development burden by providing
access to standardized simulation functionality and hiding lowlevel scheduling minutiae,
Any discreteevent simulation model written in C ++ contains the components discussed
in Section 3.1: system state, entites and attributes, sets, events, activities and delays,
plus the component listed below. To facilitate development and debugging, it is best to
organize the C ++ model in a modular fashion using subroutines. The following
components are common to almost all models written in C ++:
Clock A variable defining simulated time
Initialization subroutine A routine to define the system state at time 0
Mintime event subroutine A routine that identifies the imminent event – that is, the
elements of the future event list (Future Event List) which has the smallest time – stamp
34
The simulation begins by setting the simulation Clock to zero, initializing cumulative
statistics to zero, generating any initial events (there will always be at least one) and
placing them on the Future Event List, and defining the system state at time 0. The
simulation program then cycles, repeatedly passing the current leasttime event to the
appropriate event subroutines until the simulation is over. At each step, after finding the
imminent event but before calling the event subroutine, the simulation Clock is advanced
to the time of the imminent event. (Recall that during the simulated time between the
occurrence of two successive events, the systems state and entity attributes do not
change in value. Indeed, this is the definition of discrete – event simulation: The system
state changes only when an event occurs.) Next, the appropriate event subroutine is
called to execute the imminent event, update cumulative statistics, and generate future
events (to be placed on the Future Event List). Executing the imminent event means that
the system state, entity attributes, and set membership are changed to reflect the fact
that the event has occurred. Notice that all actions in an event subroutine takes places at
one instant of simulated time. The value of the variable Clock does not change in an
event routine. If the simulation is not over, control passes again to the timeadvance
subroutine, then to the appropriate event subroutine, and so on. When the simulation is
over, control passes to the report generator, which computes the desired summary
statistics from the collected cumulative statistics and prints a report.
The efficiency of a simulation model in terms of computer runtime is determined to a
large extent by the techniques used to manipulate the Future Event List and other sets.
As discussed in Section 3.1, removal of the imminent event and addition of a new event
are the two main operations performed on the Future Event List. Virtually every C ++
system now includes the “C ++ standard libraries,” whose priorityqueue data structure
we will use in this example to implement the event list and whose generic queue we will
use to implement the list of waiting customers. The underlying priorityqueue organization
is efficient, in the sense of having access costs that grow only in the logarithm of the
number of elements in the list.
EXAMPLE 4.2 (SingleServer Queue Simulation C ++)
The grocery checkout counter, defined in detail in Example 4.1, is now simulated using C
++. A version of this example was simulated manually in Examples 3.3 and 3.4, where
the systems state, entities and attributes, sets, events, activities, and delays were
analyzed and defined.
Class Event represents an event. It stores a code for the event type (arrival or departure),
and the event time – stamp. It has associated methods (functions) for creating an event
and accessing its data. It also has associated special functions, called operators, which
provide semantic meaning to relational operators < and = = between events. These are
used by the C ++ standard library queue implementations. The subroutines for this model
and the flow of control are shown in Figure 4.2, which is an adaptation of Figure 4.1
35
be used to model any situation where transactions (entities, customers, units of traffic)
are flowing through a system (e. g., a network of queues, with the queues preceding
scarce resources). The block diagram is converted to block statements, control
statements are added, and the result is a GPSS model.
The first version of GPSS was released by IBM about 1961. Since is was the first process
– interaction simulation language, and due to its popularity, it has been implemented
anew and improved by many parties since 1961, with GPSS/H being the most widely
used version in use today. Example 4.3 is based on GPSS/H.
GPSS/H is a product of Wolverine Software Corporation, Annandale, VA (Banks, Carson,
and Sy, 1995; Crain and Henriksen, 1999). It is a flexible, yet powerful tool for simulation.
Unlike the original IBM implementation, GPSS/H includes builtin file and screen I/o, use
of an arithmetic expression as a block operand, an interactive debugger, faster execution,
expanded control statements, ordinary variables and arrays, a floatingpoint clock, builtin
math functions, and built – in random – variate generators.
The animator for GPSS/H is Proof Animation
TM
, another product of Wolverine Software
Corporation (Henriksen, 1999). Proof Animation provides a 2D animation, usually based
on a scale drawing. It can run in post processed mode (after the simulation has finished
running) or concurrently. In post processed mode, the animation is driven by two files: the
layout file for the static background, and a trace file that contains commands to make
objects move and produce other dynamic events. It can work with any simulation
package that can write the ASCII trace file. Alternately, it can run concurrently with the
simulation by sending the tracefile commands as messages, or can be controlled directly
when using its DLL (dynamic link library) version.
EXAMPLE 4.3 (SingleServer Queue Simulation in GPSS/H)
Figure 4.10 exhibits the block diagram and figure 4.11 the GPSS program for the grocery
store checkout –counter model described in Example 4.2. Note that the program (Figure
4.11) is a translation of the block diagram together with additional definition and control
statements.
In figure 4.10, the GENERATE block represents the arrival event, with the interarrival
times specified by RVEXPO (1, &IAT). RVEXPO stands for “random variable,
exponentially distributed,” the 1 indicates the randomnumber stream to use, and &IAT
indicates that the mean time for the exponential distribution comes from a socalled
ampervariable &IAT. Ampervariable names begin with the “&” character; Wolverine
added ampervariables to GPSS because the original IBM implementation had limited
support for ordinary global variables, with no user freedom for naming them. (In the
discussion that follows all nonreserved words are shown in italics.)
The next block is a QUEUE with a queue named SYSTIME. It should be noted that the
QUEUE block is not needed for queues or waiting lines to form in GPSS. The true
36
purpose of the QUEUE block is to work in conjunction with the DEPART block to collect
data on queues or any other subsystem.
Figure 4.10. GPSS block diagram for single – server queue simulation.
37
In Example 4.3, we want to measure the system response time – that is, the time a
transaction spends in the system. By placing a QUEUE block at the point where
transactions enter the system, and the counter part of the QUEUE block, the DEPART
block, at the point where the transactions complete their processing, the response times
will be automatically collected. The purpose of the DEPART block is to signal the end of
data collection for an individual
SIMULATE
Define Ampervariables
INTEGER &LIMIT
REAL &IAT, &MEAN,&STDEV, &COUNT
LET &IAT = 4.5
LET &MEAN = 3.2
LET &STDEV = .6
LET &LIMIT = 1000
Write Input Data to File
PUTPIC FILE = OUT, LINES = 5, (&IAT, &MEAN, &STDEV, &LIMIT)
Mean interarrival time **.** minutes
Mean service time **.** minutes
Standard deviation of service time **.** minutes
Number of customers to be served *****
GPSS/H Block Section
GENERATE RVEXPO (1, &IAT) Exponential arrivals
QUEUE SYSTIME Begin response time data collection
QUEUE LINE Customer joins waiting line
SEIZE CHECKOUT Begin checkout at cash register
DEPART LINE Customer starting service leaves queue
ADVANCE RVNORM(1,&MEAN, Customer’s service time
&STDEV)
RELEASE CHECKOUT Customer leaves checkout area
DEPART SYSTIME End response time data collection
TEST GE M1, 4, TER Is response time GE 4 minutes?
BLET &COUNT =&COUNT+1 If so, add 1 to counter
TER TERMINATE 1
38
START &LIMIT Simulate for required number
Write Customized Output Data to File
PUTPIC FILE = OUT, LINES = 7, (FR (CHECKOUT) / 1000, QM (LINE), 
QT (SYSTIME), &COUNT/N(TER), ACL, N(TER))
Server utilization .***
Maximum line length **
Average response time **.** minutes
Proportion who spend four minutes .***
Or more in the system
Simulation run length ****.** minutes
Number of departures ****
END
Figure 4.11 GPSS/H program for single – server queue simulation.
transaction. The QUEUE and DEPART block combination is not necessary for queues to
be modeled, but rather is used for statistical data collection.
The next QUEUE block (with name Line) begins data collection for the waiting –
line before the cashier. The customers may or may not have to wait for the cashier. Upon
arrival to an idle checkout counter or after advancing to the head of the waiting line, a
customer captures the cashier as represented by the SEIZE block with the resource
named CHECKOUT. Once the transaction representing a customer captures the cashier
represented by the resource CHECKOUT, the data collection for the waiting line statistics
ends, as represented by the DEPART block for the queue named LINE. The transaction’s
service time at the cashier is represented by an ADVANCE block. RVNORM indicates
“random variable, normally distributed.” Again, random – number stream 1 is being used,
the mean time for the normal distribution is given by ampervariable & MEAN, and its
standard deviation is given by ampervariable & STDEV. Next,/ the customer gives up the
use of the facility CHECKOUT with a RELEASE block. The end of the data collection for
response times is indicated by the DEPART block for the queue SYSTIME.
Next, there is a TEST block that checks to see if the time in the system, M1, is
greater than or equal to 4 minutes. (Note that M1 is a reserved word in GPSS/H; it
automatically tracks transaction total time in system.) In GPSS/H, the maxim is “if true,
pass through.” Thus, if the customer has been in the system 4 minutes or longer, the next
BLET block (for block LET) adds one to he counter & COUNT. If not true, the escape
route is to the block labeled TER. That label appears before the TERMINATE block,
whose purpose is the removal of the transaction from the system. The TERMINATE block
39
has a value “1” indicating that one more transaction is added toward the limiting value, or
“transactions to go.”
The control statements in this example are all of those lines in Figure 4.11 that
precede or follow the block section. (There are eleven blocks in the model from the
GENERATE block to the TERMINATE block). The control statements that begin with an
asterisk are comments, some of which are used for spacing purposes. The control
statement SIMULATE tells GPSS/H to conduct a simulation; if omitted, GPSS/H compiles
the model and checks for errors only. The ampervariables are defined as integer or real
by control statements INTEGER and REAL. It seems that the ampervariable & COUNT
should be defined as an integer; however, it will be divided later by the number of
customers to obtain a proportion. If it were integer, the result of an integer divided by an
integer would be truncation, and that is not desired in this case. The four assignment
statements (LET) provide data for the simulation. These four values could have been
placed directly in the program; however, the preferred practice is to place them in
ampervariables at the top of the program, so that changes can be made more easily, or
the model modified to read them from a data file.
To insure that the model data is correct, and for the purpose of managing
different scenarios simulated. It is good practice to echo the input data. This is
accomplished with a PUTPIC (for “put picture”) control statement. The five lines following
PUTPIC provide formatting information, with the asterisks being markers (called picture
formatting) in which the values of the four ampervariables replace the asterisks when
PUTPIC is executed. Thus, “**.**” indicates a value that may have two digits following the
decimal point.
Mean interarrival time 4.50 minutes
Mean service time 3.20 minutes
Standard deviation of service time 0.60 minutes
Number of customers to be served 1000
Server utilization 0.676
Maximum line length 7
Average response time 6.33 minutes
Proportion who spend four minutes 0.646
Or more in the system
Simulation runlength 4767.27 minutes
Number of departures 1000
Figure 4.12 Customized GPSS/H output for singleserver queue simulation.
The START control statement controls simulation execution. It starts the
simulation, sets up a “termination togo” counter with initial value its operand (&LIMIT),
and controls the length of the simulation.
40
After the simulation completes, a second PUTPIC control statement is used to
write the desired output data to the same file OUT. The printed statistics are all
automatically gathered by GPSS. The first output in the parenthesized list is the server
utilization. FR (CHECKOUT)/1000 indicates that the fractional utilization of the facility
CHECKOUT is printed. Since FR (CHECKOUT) is in parts per thousand, the
denomination is provided to computer fractional utilization. QM(LINE) is the maximum
value in the queue LINE during the simulation. QT(SYSTIME) is the average time in the
queue SYSTIME. & COUNT/N(TER) is the number of customers who had a response
time of four or more minutes divided by the numbers of customers that went through the
block with label TER, r N (TER). AC1 is the clock time, whose last value gives the length
of the simulation.
The contents of the custom output file OUT are shown in Figure 4.12. The
standard GPSS/H output file is displayed in Figure 4.13. Although much of the same data
shown inj the file OUT can be found in the standard GPSS/H output, the custom file is
more compact and uses the language of the problem rather than GPSS jargon. There are
many other reasons that customized output files are useful. For example, if 50
replications of the model are to be made and the lowest, highest, and average value of a
response are desired, this can be accomplished using control statements with the results
in a very compact form, rather than extracting the desired values from 50 standard output
reports.
4.6 Simulation in CSIM
CSIM is a system for using the C or C ++ language for modeling, along with a
rich library of predefined objects to support processoriented simulation modeling. It is an
exepensive commercial product sold and maintained by Mesquite. Software [Shwetman,
1996]; it has a wide user base in industry and academia, principally to model computer
and communication systems. CSIM is fast, owing to careful implementation and being a
compiled language.
* quired customers, it calls the wait function associated with CSIM event done. This
causes it to suspend until done is set by the last customer process of interest. The call to
done. Set ( ) in turn releases sim to call Report Generation to give its report. Our CSIM
implementation of Report Generation can be essentially that illustrated in Figure 4.7, with
the exception of calling CSIM provided facility routine util to get server utilization, and
resp to get the average response time :
double RHO = f. util ( );
double AVGR = f. resp ( )
CSIM bridges the gap between models developed in pure C ++ and models
developed in languages specifically designed for simulation. It provides the flexibility
offered by a general programming language, with essential support for simulation.
41
4.7 Simulation Packages
All the simulation packages described in later subsections run on a PC under
Microsoft Windows 95/98 and/or NT. Some also run on various UNIX workstations and a
few on Apple machines. Although in terms of specifics the packages all differ, generally
they have many things in common.
Common characteristics include a graphical user interface, animation, and
automatically collected outputs to measure system performance. In virtually all packages,
simulated results may be displayed in tabular or graphical form in standard reports and
interactively while running a simulation. Outputs from different scenarios can be
compared graphically or in tabular form. Most provide statistical analyses that include
confidence intervals for performance measures and comparisons, plus a variety of other
analysis methods. Some of the statistical analysis modules are described in Section 4.8.
All the packages described here take the process – interaction world view. A few
also allow event scheduling and mixed discrete – continuous models. For animation,
some emphasize scale drawings in 2 – D or 3D, while other emphasize iconic – type
animations based on schematic drawings or process flow diagrams. A few offer both
scaledrawing and schematic – type animations. Almost all offer dynamic business
graphing in the form of timelines, bar charts, and pie charts.
4.7.1 Arena
Arena Business, Standard, and Professional Editions are offered by Systems
Modeling Corporation [Sadowski and Bapat, 1999]. Arena can be used for simulating
discrete and continuous systems. A recent addition to the Arena family of products is
OptQeust for Arena, an optimization software package (discussed in Section 4.8.2).
The Arena Business Edition is targeted at modeling business processes and
other systems in support of highlevel analysis needs. It represents process dynamics in
a hierarchical flow chart and stores system information in data spreadsheets. It has built
– in activitybased costing and is closely integrated with the flowcharting software Visio
R
.
The Arena Standard Edition is designed for more detailed models of discrete and
continuous systems. First released in 1993, Arena employs an object based design for
entirely graphical model development. Simulation models are built using graphical objects
called modules to define system logic and physical components such as machines,
operators, and clerks. Modules are represented by icons plus associated data entered in
a dialog window. These icons are connected to represent entity flow. Modules are
organized into collections called templates. The Arena template is the core collection of
modules providing general – purpose features for modeling all types of applications. In
42
addition, to standard features, such as resources, queues, process logic, and system
data, the Arena template includes modules focused on specific aspects of manufacturing
and material handling systems. Arena SE can also be used to model combined discrete/
continuous systems, such as pharmaceutical and chemical production, through its builtin
continuous modeling capabilities.
The Arena Professional Edition enhances Arena SE with the capability to craft
custom simulation objects that mirror components of the real system, including
terminology, process logic, data, performance metrics, and animation. The Arena family
also includes products designed specifically to model call centers and highspeed
production lines, namely Arena Call Center and Arena Packaging.
At the heart of Arena is the SIMAN simulation language. For animating simulation
models, Arena’s core modeling constructs are accompanied by standard graphics for
showing queues, resource status, and entity flow. Arena’s 2D animations are created
using Arena’s builtin drawing tools and by incorporating clipart, AutoCAD, Visio, and
other graphics.
Arena’s Input Analyzer automates the process of selecting the proper distribution
and its parameters for representing existing data, such as process and interarrival times.
The Output Analyzer and Process Analyzer (discussed in Section 4.8.2) automate
comparison of different design alternatives.
4.7.2 Auto Mod
The Auto Mod Product Suite is offered by Auto Simulations [Rohrer, 1999]. It
includes the Auto Mod simulation package, AutoStat for experimentation and analysis,
and AutoView for making AVI movies of the builtin3D animation. The main focus of the
AutoMod simulation product is manufacturing and material handling systems.
Auto Mod has built – in templates for most common material handling systems,
including vehicle systems, conveyors, automated storage and retrieval systems, bridge
cranes, power and free conveyors, and kinematics for robotics. With its Tanks and Pipes
module, it also supports continuous modeling of fluid and bulk material flow.
The Path Mover vehicle system can be used to model lift trucks, humans walking
or pushing carts, automated guided vehicles, trucks and cars. All the movement
templates are based on a 3D scale drawing (drawn or imported from CAD as 2D or 3
D). All the components of a template are highly paramterized. For example, the conveyor
template contains conveyor sections, stations for load induction or removal, motors, and
photoeyes. Sections are defined by length, width, speed, acceleration and type
(accumulating or nonaccumulating), plus other specialized parameters. Photoeyes have
blocked and cleared timeouts that facilitate modeling of detailed conveyor control logic.
43
In addition to the material handling templates, Auto Mod contains a full simulation
programming language. Its 3D animation can be viewed from any angle or perspective in
real time. The user can freely zoom, pan, or rotate the 3D world.
An Auto Mod model consists of one or more systems. A system can be either a
process system, in which flow and control logic are defined, or a movement system
based on one of the material handling templates. Each model must contain one process
system and may contain any number of movement systems. Processes can contain
complex logic to control the flow of either manufacturing materials or control messages,
to contend for resources, or to wait for user – specified times. Loads can move between
processes with or without using movement systems.
In the Auto Mod world view, loads (products, parts, etc.) move from process to
process and compete for resources (equipment, operators, vehicles and queues). The
load is the active entity, executive action statements in each process. To move between
processes, loads may use a conveyor or vehicle in a movement system.
Auto Stat, described in Section 4.8.2, works with Auto Mod models to provide a complete
environment for the user to define scenarios, conduct experimentation, and perform
analyses. It offers optimization based on an evolutionary strategies algorithm.
4.7.3 Deneb/QUEST
QUEST is offered by Deneb Robotics [Donald, 1998]. Deneb also offers a
number of workcell simulators including IGRIP for robotics simulation and programming
and ERGO Sim for ergonomics analyses. QUEST (Queuing Event Simulation Tool) is a
manufacturingoriented simulation package. Robots and workcells simulated in IGRIP
and ERGO Sim can be imported into QUEST models.
QUEST models are based on 3D CAD geometry. QUEST combines a simulation
environment with graphical user interface and material flow modules for labor, conveyors,
automated guided vehicles, kinematics, power and free conveyors, and automated
storage and retrieval systems.
For Deneb/IGRIP users, existing robot work cell models and robot or other
complex machinery cycle times can be directly imported to Deneb/QUEST. Similarly,
model of human operators in a workcell developed in Deneb\ERGO Sim can be
incorporate into a QUEST process model both visually and numerically.
A QUEST model consists of elements from a number of element classes. Builtin
element classes include AGV and transporters, buffer, conveyor, labor, machine, parts
and process. Each element has associated geometric data and parameters that define its
behavior. Parts may have a route and control rules to govern part flow. Commonly
needed behavior logic is selected from comprehensive menus, many parameterdriven.
For unique problems, Deneb/QUEST’s Simulation Control Language can be used. This
44
structured simulation programming language provides distributed processing with access
to all system variables. SCL allows expert users to define custom behaviors and to gain
control over the simulation.
Deneb/QUEST’s open architecture allows the advanced user to perform batch
simulation runs to automatically collect and tabulate data using the Batch Control
Language (BCL). Replications and parameter optimization are controlled with batch
common files.
4.7.4 Extend
Extend offered by Imagin That, Inc. [Krahl, 1999]. Extend combines a block
diagram approach to model building along with an authoring environment for creating
new blocks or complete vertical market simulators. It is process oriented but it also
capable of continuous and combined modeling. It provides iconic animation of the block
diagram plus an interface to Proof Animation [Henriksen, 1999] from Wolverine Software
for 2D scale – drawing animation.
Elemental blocks in Extend include Generator (for arrivals), Queue, Activity,
Resource Pool, and Exit. In Extend, the active entities, called items, are created at
Generator blocks and move from block to block by way of connectors. Connectors are
also used for “value flows” – that is, for attaching a calculation to a block parameter or
retrieving statistical information from a block for reporting purpose.
Each block has an icon and encapsulates code, parameters, user interface, and
online help. Extend comes with a large set of elemental blocks; in addition, libraries of
blocks for general and specific application areas, such as manufacturing and BPR
(business process reengineering), are available. Thirdparty developers have created
Extend libraries for vertical market applications, including supply chain analysis chemical
processing, pulp and paper processing, and radiofrequency analysis.
End users can build models by placing and connecting blocks and filling in the
parameters on the dialog window associated with a block. Collections of blocks can be
grouped into a hierarchical block representing a submodel such as a particular machine,
a workstation, or a subassembly line. In this way, a higherlevel block diagram can be
displayed to the end user, hiding many of the details. Parameters from the submodel
network of blocks that an end user desires to control can be grouped and displayed at the
level of the hierarchical block. Using this capability, a firm could build a set of customized
blocks representing various components of their manufacturing facility.
For creating new blocks, Extend comes with a compiled Clike simulation
programming language called Modl. It contains simulation support, as well as support for
custom user interfaces and message communication. Extend has an open architecture,
so that in most cases the source code for blocks is available to advanced model builders.
45
The statistics library of blocks is used to collect and analyze output data, such as
computing confidence intervals.
4.7.5 Micro Saint
Micro Saint is offered by Micro Analysis and Design, Inc. [Bloechle and
Laughery, 1999]. With Micro Saint, a model builder develops a model by creating a flow
chat diagram to describe a network of tasks. The animation is iconic and is based on the
flowchart representation. Through menus and parametrized icons, the network can have
branching logic, sorted queues, and conditional task execution. Micro Saint is used in
manufacturing, health care, retail, and military applications. It supports ergonomics and
human performance modeling. It works with Opt Quest to provide optimization capability.
4.7.6 Pro Model
Pro Model is offered by PROMODEL Corporation [Price and Harrell, 1999]. It is a
simulation and animation tool designed to model manufacturing systems. The company
also offers MedModel for health care systems, Service Model for service systems, and
Process Model, a flow – chart – based simulation product for business processes. Pro
Model offers 2D animation with an optional 3D like perspective view.
Pro Model has manufacturing – oriented modeling elements and rule – based
decision logic. Some systems can be modeled by selecting from Pro Model’s set of highly
parameterized modeling elements. In addition, its simulation programming language
provides for modeling special situations not covered by the built in choices.
The modeling elements in ProModel are parts or entities, locations, resources,
path networks, routing and processing logic, and arrivals. Parts arrive and follow the
routing and processing logic from location to location. Resources are used to represent
people, tools or vehicles that transport parts between locations, perform an operation on
a part at a location, or perform maintenance on a location or other resource that is down.
Resources may travel on path networks with given speeds, accelerations, and pick up
and setdown times. The routing and processing element allows user – defined procedural
logic in Pro – Model’s simulation programming language.
Pro Model’s runtime interface allows a user to define multiple scenarios for
experimentation. Sim Runner (discussed in Section 4.8.2.) adds the capability to perform
an optimization; it is based on an evolutionary strategy algorithm, a variant of the genetic
algorithm approach.
4.7.7 Taylor ED
Taylor Enterprise Dynamics (ED) is offered by F & H Simulations [Hullinger,
1991]. It is built on different concepts than its predecessor package, Taylor II. Taylor ED
46
is used to model manufacturing, werehousing, and material handling processes plus
service and data flow processes. It can also be used to monitor flow processes in real
time. It offers both 2D and 3D animation.
Taylor ED is based on the concept of an atom. Atoms are Taylor ED’s smart
objects and modelbuilding resources. Model builders can access standard libraries of
atoms as well as create new atoms using Taylor ED’s Atom Editor. Atoms are used to
represent the products or entities flowing through the system as well as the resources
acting on these entities. In fact, everything in Taylor ED is an atom, whether it is a
resource, a product, a model (or submodel), a table, a report, a graph, a record, or a
library.
To build a model, a user first creates a model layout by selecting atoms from the
atom library and placing them on the screen. Next the user connects the atoms and
defines the routing of products or entities (also atoms) flowing through the model. Next
the use assigns logic, including routing logic, to each atom by editing its parameter fields.
An atom is an object with four dimensions (x, y, z, and time). Each atom can
have a location, speed, and rotation and dynamic behavior over time. Atoms can inherit
their behavior from other atoms and contain other atoms; atoms can be created and
destroyed. Atoms can be viewed simultaneously in 2D and 3D animation.
One of the hallmark characteristics of the atom is its reusability. For example, a
workcell can be created by using the Atom Editor or by combining several existing atoms.
The workcell can be saved as an atom, included in a standard atom library, then reused
in a new model or shared with other Taylor ED modelers.
Taylor ED includes both an experiment module and the Opt Quest Optimizer
(discussed in Section 4.8.2).
4.7.8 WITNESS
WITNESS is offered by The Lanner Group [Mehta and Rawles, 1999]. WITNESS
is strongly machine oriented and contains many elements for discrete part manufacturing.
It also contains elements for continuous processing such as the flow of fluids through
processors, tanks and pipes.
WITNESS models are based on template elements. Elements may be combined
into a designer element module to be reused. The machine element can be single, batch,
production, assembly, multisation or multicycle. The behavior of each element is
described on a tabbed detail from in the WITNESS user interface.
It offers a 2D layout animation plus a process flow view. The 2D graphics offers
a walkthrough capability controlled by a mouse or a camera attached to an entity.
47
4.8 Experimentation and Statistical Analysis Tools
4.8.1 Common Features
Virtually all simulation packages offer various degrees of support for statistical
analysis of simulation outputs. In recent years, many packages have added optimization
as one of the analysis tools. To support analysis, most packages provide scenario
definition, run management capability, as well as data export to spreadsheet and other
external applications.
Optimization is used to find a “near – optimal” solution. The user must define an
objective or fitness function, usually a cost or costlike function that incorporates the trade
– off between additional throughput and additional resources. Until recently, the methods
available for optimizing a system had difficulty coping with the random and nonlinear
nature of most simulation outputs. Advances in the field of metaheuristics have offered
new approaches to simulation optimization, based on artificial intelligence, neural
networks, genetic algorithms, evolutionary strategies, tabu search, and scatter search.
4.8.2 Analysis Tools
This section briefly discusses the Arena Output and Process Analyzers AutoStat
for AutoMod, Sim Runner for ProModel, and OptQuest, which is used in a number of
simulation products.
Arena’s Output and Process Analyzer
Arena comes with the Output Analyzer and Process Analyzer. In addition, Arena
uses Opt Quest for optimization.
The Output Analyzer provides confidence intervals, comparison of multiple
systems, and warm up determination to reduce initialcondition biases. It creates various
plots, charts, and histograms, smoothes responses, and performs correlation analysis. To
compute accurate confidence intervals, it does internal batching (both within and across
replication, with no user intervention) and data truncation to provide stationary,
independent and normally distributed data sets.
The Process Analyzer adds sophisticated scenariomanagement capabilities to
Arena for comprehensive design of experiments. It allows a use to define scenarios,
make the desired runs, and analyze the results. It allows an arbitrary number of controls
48
and responses. Responses can be added after runs have been completed. It will rank
scenarios by any response and provide summaries and statistical measures of the
responses. A user can view 2D and 3D charts of response values across either
replications or scenarios.
AutoStat
AutoStat is the run manager and statistical analysis product in the AutoMod
product family [Rohrer, 1999]. AutoStat provides a number of analyses, including warm
up determination for steadystate analyses, absolute and comparison confidence
intervals, design of experiments, sensitivity analysis, and optimization using an
evolutionary strategy. The evolutionary strategies algorithm used by AutoStat is well
suited to finding a nearoptimal solution without getting trapped at a local optimum.
With AutoStat, an end user can define any number of scenarios by defining
factors and their range of values. Factors include single parameters such as resource
capacity or vehicle speed, single cells in a data file, and complete data files. By allowing
a data file to be a factor, a user can experiment with, for example, alternate production
schedules, customer orders for different days, different labor schedules, or any other
numerical inputs typically specified in a data file. Any standard or custom output can be
designated as a response. For each defined response, AutoStat computes descriptive
statistics (average, standard deviation, minimum and maximum) and confidence
intervals. New responses can be defined after runs are made, because AutoStat archives
and compresses the standard and custom outputs from all runs. Various charts and plots
are available to provide graphical comparisons.
AutoStat is capable of distributing simulation runs across a local area network
and pulling back all results to the user’s machine. Support for multiple machines and
CPUs gives users the ability to make many more runs of the simulation tan would
otherwise be possible by using idle machines during off hours. This is especially useful in
multifactor analysis and optimization, both of which may require large numbers of runs.
AutoStat also has a diagnostics capability that automatically detects “unusual” runs,
where the definition of “unusual” is user – definable.
Auto Stat also works with two other products from Auto Simulations: the AutoMod
Simulator, a spreadsheet – based jobshop simulator, and AutoSched AP, a rule – based
simulation package for finite – capacity scheduling in the semi conductor industry.
Opt Quest
49
Opt Quest was developed by Fred Glover, University of Colorado and cofounder
of Optimization Technologies, Inc. [Glover et al., 1999]. It is available for Arena, CSIM,
Micro Saint, QUEST, and Taylor ED.
Opt Quest is based on a combination of methods: scatter search, tabu search
with adaptive memory, and a neural network component. Scatter search is a population
based approach, in some ways similar to genetic algorithms; existing solutions are
combined to make new solutions. Tabu search is then superimposed to prohibit the
search from reinvestigating previous solutions and neural networks to screen out
solutions likely to be poor.
When using OptQuest, a user defines an objective function to minimize or
maximize. Simulation examples include throughout or a cost function. Opt Quest allows a
user to specify the range of variable parameters as well as constraints on parameters,
responses, and combinations of parameters – in fact, any set of conditions that can be
represented by a mixedinteger programming formulation.
SimRunner
Sim Runner works with ProModel [Prive and Harrell, 1999]. Its optimization is
based on evolutionary strategy, a variant of the genetic algorithm approach. A user
specifies an objective function (a response to minimize or maximize) and the input factors
to vary. In its Stage One Optimization Analysis, Sim Runner performs a factorial design of
experiments to determine which input factors have a significant effect on the objective
function. Those factors that have no significant effect can be eliminated from the search
for an optimum. The Stage Two Simulation Optimization uses the evolutionary strategy
algorithm to conduct a multivariable optimization search.
4.9 Trends in Simulation Software
This section is based on a plenary address given by Banks [2000] to the
European Simulation MultiConference 2000. Many of the remarks are reproduced here
with the permission of the Society for Computer Simulation International, European
Council, Ghent, Belgium. Since it is difficult to predict software developments for even
one year, the trends predicted here may be little more than more speculation!
4.9.1 HighFidelity Simulation
Highfidelity simulation is exceptional graphics quality and very accurate
emulation. The term “Virtual” is often used, implying that the emulation is nearly the same
as that which is being modeled, i.e., it looks and acts like the real thing. However, the
model is in the computer and the actual object is real. In terms of manufacturing and
material handling, consider a virtual machine, a virtual factory, and a virtual warehouse. If
50
you are looking at a virtual machine on your computer monitor, it looks very much like
that machine. If the machine is updated, it is only necessary to update the simulation
model. You don’t have to spend $1,000,000 for a modern centerless grinder, you just
simulate it in the computer to study its operation. Of course, it you want to make
bearings, you will need to buy the grinder.
Another dimension of high fidelity simulation is to make it selective. You could
have varying levels of detail. If you wanted the model to run fast and the animation and
solution to be approximate, you could set the dial on low. Or, you could set the dial on
high and get the opposite result. You could also set the dial between the two extremes.
4.9.2 Data Exchange Standards
Engineering Animation Incorporated, Inc. (EAI), has developed a simulation interface
called SDX for Simulation Data Exchange. David Sly (1999) of EAI says:
The main function of the tool is to communicate to the simulation
Package all that is known about the layout in an effort to reduce the
Redundant tasks of redefining equipment in the layout importation
To the simulation tool and that equipment’s interconnectivity and
Attributes. This interface adds value in that it can cut considerable
Time from the process of creating detailed layouts in the simulation
tool and defining equipment properties (such as conveyor speeds,
etc.) The interface is best applied to applications that have a
significant amount of automated material handling equipment such
as conveyors, AGVs, fork trucks and cranes, all typically found in
automotive plants and distribution centers.
Several simulation software firms have worked with EAI to accept SDX. This data
exchange format could emerge as a standard. Rather than redraw the conveyor system
with all of its parameters, it is just imported through SDX.
SDX is not the only data exchange format vying for attention. He Worldwide Web
Consortinum (W3C) is developing XML for extensible markup language. XML is a set of
rules, guidelines, or conventions for designing text formats for data such that the files are
easy to generate and read, they are unambiguous, and they are extensible. It aids in
putting information on the Web and in the retrieval of that information.
XML has a large and growing community. A project coordinated through the
Manufacturing Engineering Laboratory at the U. S. National Institute of Standards and
Technology is to “explore the use of XML as a standard for structured document
interchange on the Web, for exchanging complex data objects between tasks in a
distributed workflow application.”
51
So, groups are developing XML standards for all types of documentation.
Eventually, some group will want to develop XML standards for representation of
manufacturing and material handling systems.
4.9.3 The Internet
The Internet can deliver modeling capability to the user. The interface can be at
the client (local computer), with the models run on a server. However, this server is not in
a local area network (LAN). It is at the software vendor’s or some other host’s site. The
server can always have the latest version of the model. The interface can be in Java,
which is independent of the computer and has applets for displaying results. Currently,
the speed of Java is not sufficient to serve as the simulation engine.
Another way that we can use the Internet is to have models run on many
computers. Thus, if the model is extremely large or if many replications are needed, the
computing power can be greatly extended via the Internet by distributing the
computational needs.
4.9.4 Old Paradigm versus New Paradigm
In the past, models were always constructed with a limited purpose in mind and
to answer specific questions. That would be called the old paradigm. But, it takes time to
build models in response to questions.
The new paradigm is to have models built at different levels of detail, but
without knowing all of the questions to be asked. This will speed up the
response time, since the model already exists. Under the new paradigm, the
models become an asset. The firm with more prebuilt models will be able to
answer questions faster – but may have more outofdate models. Indeed,
model maintenance becomes a big issue.
4.9.5 Component Libraries
Consider component libraries stored in a neutral file format. This requires that a
format can be designed and accepted by numerous software vendors, which is in itself a
challenge. System providers could be contributors of modules. For example, a robot
manufacturer could contribute a module for a specific type of robot. The result of having
module libraries is more rapid development of models. The modules could be prepared
so that all that they require is parameterization.
4.9.6 Distributed Manufacturing Simulation/High Level
Architecture
52
Many years ago, the U. S. Department of Defense (DOD) began a development
process to enable various simulations located throughout the world to exchange data
dynamically during simulation of largescale military exercises. This is known as
distributed simulation. There can be aircraft maneuvers simulated in one computer
model, tanks simulated in another, ground troops in yet another, and the supply chain in
still another. Also, the models may be at different levels of fidelity. The computers hosting
these models are geographically dispersed, but interacting over the Internet.
The technology has matured to the point where it can now be tried in other
domains. This technology is collectively called High Level Architecture (HLA). HLA has
been designed so that the minimum amount of information is exchanged between the
various simulations sufficient to effect clock synchronization and the exchange of data
objects.
4.9.7 Embedded Simulation
Embedded simulation occurs when simulation models are placed in other
software. This already happens in simulationbased scheduling. It is anticipated that there
will be many other cases in which the simulation becomes invisible. For example, in
maintenance management software, a policy could be entered, and a very short time
later, the user would see the anticipate result of that policy. The user might not know that
the output resulted from a simulation.
4.9.8 Optimization
The main problem with optimization is that of computer time. It takes a lot of it
when running an optimization on a complex model. This is related to the number of
variables, the types of variables (discrete or continuous), the number of constraints on
the solution space, the type of constraints (simple bound, linear, or nonlinear), and the
type of objective function (linear, quadratic, or nonlinear). Assume that a simulation takes
10 minutes per replication and that 5 replications are conducted at each combination of
factor values. Further, assume that the optimization algorithm calls for 1000 scenarios
(not unusual). To obtain a nearoptimal solution would take 50,000 minutes. That is
approximately one month of elapsed time. Decision makes usually do not have the luxury
of this amount of time.
The time can be decreased by using fractional factorial experiments to reduce
the number of combinations. Another technique, currently in use by at least one software
vendor, is to distribute the simulation runs over the computers on a local area network.
For example, if there are ten computers available on your network, roughly ten times as
many runs can be made overnight or over the weekend. The results are fed back to the
user’s computer.
53
As far as simulation research is concerned, optimization is an area that will continue to
receive attention.
REFERECNES
Banks, J., J. S. CARSON, AND J. N. SY [1995], Getting Started with GPSS/H, 2d ed.,
Wolverine Software Corporation, Annandale, VA.
BANKS, J. [1996], “Interpreting Software Checklists,” OR/MS Today, June.
BANKS, J. [1998], “The Future of Simulation Software: A Panel Discussion,” Proceedings
of the 1998 Winter Simulation Conference, D. J. Medeiros, E. Watson, J. Carson,
S. Manivannan, eds., Washington, DC, Dec. 1316.
BANKS, J. [2000], “The Future of Simulation,” Proceedings of the European Simulation
MultiConference, Ghent, Belgium, May 2326, to appear.
54
5
Statistical Models in Simulation
Review of terminology and Concepts
1. Discrete random variable: Let X be a r, v. If the no. of possible values of is finite.
Or countable infinite, X is called a discrete r. v.
Note: Let X be a discrete r, v, P(X) = P (X=x) gives the probability that
r, v, equals the value of x, The collection of pairs (xi, P(xi), I = 1,2,… is
called the probability distribution of X, and P (Xi) is called the
probability mass function (p.m.l.) of X. The Possible values of X are
given by the range space of X, denoted by Rx.
2. Continuous r,v. : If the range space Rx of the random variable X is
an interval or collection of intervals, X is called a continuous r.v. for
a continuous r, v, X. the probability that X lies in the interval [a, b,]
is given by.
P (a < X < b) = f(x) dx
The function, f (x) is called the p.d.f. of the r.v.X.
Proportion of p.d.f.
(i) f(x) > 0 Ax E Rx (ii)
í
= 1 ) ( dx x f
(iii) P(X=x) =0, if X is continuous r.v.
(iv) P(a<X<b)=P(a<X<b)= P(a<X<b)
3. Cumulative distribution function (edl) : The edf, denoted by F(x),
measures the probability that the r,v,X assumes value less than or
equal to x. That is
55
F(x) = P (X < x).
If X is discrete, then F(x) = (xi) P ¯
If X is continuous, then F(x) = f (x) dx
Proportion of cdf :
(i) if a < b, F(a) < F(b)
(ii) lim F(x) = 1. Lim F(x) = 0
(iii) for discrete r. v. X.
P (a< X < b) = F(b) –F (a)
(iv) For continuous r. v. X.
P(a< X < b) = P (a< X < b) = F (b) – F (a).
4. Expectation and variance :
If X is a r, v., the expected value of X, denoted by E (X), is given by E
(X) = E x.P(x)
If x is discrete
x.f(x) = ¯ x.p(x) if x is discrete
=
í
x.f(x)dx if x is continuous
E (X) is also called mean of X. It is also denoted by .
The variance of r. v. x. denoted by v(x) or o2, is defined by
V(X) = E[XE(X)]
2
= E (X
2
) – (E(X))
2
56
V(X) is the measure of spread or variation of the possible values of X
around mean E(X). Standard deviation = s.d = 0 ) ( = x V
Mode: In the desecrate case, the mode is the value of the r. v. that
occurs most frequently. In the continuous case, the mode is the value
at which the pdf is maximized
Discrete Distribution
1. Bernoulli distribution let X = 1 if a Bernoulli trial results in success. X >
O if a Bernoulli trial results in a failure.
P(X =1) = p and P (X = 0)= q
E (X) = 1.p + 0.q = p
V (X) = [1
2
.p + o
2
.q] – p
2
= p – p
2
=pq
2. Binomial distribution :
The r. v. X that denotes the no, of success in n Bernoulli trials has a
Binomial distribution given by
P(x) = (n/x) P
x
q
nx
x = 0,1,2…., n.
We have, E(X) = np, V(X) = npq.
Note : Let X
1
, X
2
, …, X
n
be n index. Berroulli r. vs each with mean p
and variance pq. Then X = X
1
+ X
2
+….X
n
follows Binomial distribution.
3. Geometric Distribution :
Let X be the no. Of trials requital to achieve the first success in a
sequence of Bernoulli trials.
: P (x) = P (X=x) = q
x1
.p x = 1,2…
57
E (x) = 1/p, V(X) = q/p2
4. Poisson Distribution: If the no. Of Bernoulli trials becomes very large (n
– oo) and probability of success becomes very small (p0) then X the
no, of successes follows Poisson distribution. We have
P (x) = e
ì
ì
x
/x!’ x = 0,1,2,…
u = E(x) = ì = V(x).
Graded Questions
1. An industrial chemical that will retard the spread of fire in paint has been developed.
The local sales representative has determined, from past experience, that 48 % of
the sales calls will result in an order.
a) What is the probability that the first order will come on the fourth
sales call of the day ?
b) If eight sales calls are made in a day, what is the probability of
receiving exactly six orders ?
c) If four sales calls are made before lunch, what is the probability that
one or less results in an order ?
2. The Hawks are currently winning 0.55 of their games. There are 5
games in the next two weeks. What is the probability that they will win
more games than they lose ?
3. For the random variables, X
1
and X
2
, which are exponentially
distributed with parameter L =1, compute P(X
1
+X
2
> 2).
4. Arrivals at a bank teller’s cage are Poisson distributed at the rate of 1.2
per minute.
(a) What is the probability of zero arrivals in the next minute ?
(b) What is the probability of zero arrivals in the next 2 Minutes ?
58
5. Records indicate that 1.8 % of the entering students at a large state
university drop out of school by midterm. Using the Poisson
approximation, what is the probability that three or fewer students will
drop out of a random group of 200 entering students ?
6. The lifetime, in years of a satellite placed in orbit is given by the
following pdf :
F(x) = 0.4e
–0.4x
x > 0
0 Otherwise
(a) What is the probability that this satellite is still “alive” after 5 years ?
(b) What is the probability that this satellite dies between 3 and 6 years
from the time it is placed in orbit ?
7. (The Poisson distributior ; can be used to approximate the binomial
distribution when n is large and p is small , say p less than 0.1 in
utilizing the Poisson approximation, Let L = np.) In the production of
ball bearings bubbles or depressions occur rendering the ball bearing
unfit for sale. It has been determined that, on the average, one in every
800 of the ball bearing has one or more of these defects. What is the
probability that a random sample of 4000 will yield fewer than three ball
bearing with bubbles or depressions ?
8. for an exponentially distributed random variable, X, find the value of L
that satisfies the following relationship :
P (X s 3) = 0.9 P (X s 4)
9. Accident at an industrial site occurs one at a time, independently, and
completely at random at a mean rate of one per week. What is the
probability that no accidents occurs in the next three weeks ?
10. Suppose that a DieHardly Ever battery has an exponential timeto
failure distribution with a mean of 48 months. At 60 manths, the battery
is still operation.
59
11. The daily use of water, in thousands of liters, at the hardscrabble Tool
and Die works follows a gamma distribution with a shape parameter of
2 and a scale parameter of ¼ . what is the probability that the demand
exceeds 4000 liters on any given day?
12. When Admiral Byrd went to the north Pole, he wore batterypowered
thermal wear. The batteries failed instantaneously rather than
gradually. The batteries had a life that was exponentially distributed
with a mean of 12 days. tHe trip took 30 days, Admiral Byrd packed
three batteries, what is the probability that three batteries would be a
sufficient number to keep the Admiral warm?
13. Find the probability that 6<X<8 for each, of the distribution :
Normal (10,4)
Triangular (4,10,16)
Uniform (4,16)
14. Professor Dipsy Doodle gives six problems on each exam. Each
problem requries an average of 30 minutes grading time for the entire
class of 15 students. The grading time for each problem is
exponentially distributed and the problems are independent of each
year.
(a) What is the probability that the Professor will finish the grading in 2
½ hours or less?
(b) What is the most likely grading time?
(c) What is the expected grading time?
1.5 Three shafts are made and assembled in a linkage. The length of
each shaft, in centimeters, is distributed as follows:
Shaft 1: N(60, 0.09)
Shaft 2: N(40,0.05)
60
Shaft3 : N(50, 0.11)
(a) what is the distribution of the linkage?
(b) What is the probability that the linkage will be longer than
150.2 centimeters?
(c) The tolerance limit for the assembly are (149.83, 150.21).
What proportion of assemblies are within the tolerance
limits? [Hint : If (X1) are n independent normal Random
variables, and if Xi has mean and variance o2I, then the
sum
Y =X
1
+X
2
+…+X
n
Is normal with mean
¯
=
n
i
i
1
u and variance 2
1
¯
=
n
i
i o ]
15. The time to failure of a nickel –cadmium battery is Weibull
distributed with parameter, v = 0,
B = ¼ , and a = ½ years,
(a) Find the fraction of batteries that are expected to fail prior to 1.5
years.
(b) What fraction of batteries are expected to last longer than the
mean life?
(c) What fraction of batteries are expected to fail between 1.5 and
2.5 years?
16. Explain in detail the 3step approach of Naylor and finger in the
validation process.
AREA UNDER STANDARD NORMAL CURVE :
Z 0.0 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09
0.0 0.0000 0.0040 0.0080 0.0120 0.0160 0.0199 0.0239 0.0279 0.0319 0.0359
61
0.1 0.040 0.0438 0.0478 0.0517 0.0557 0.0596 0.0638 0.0675 0.0714 0.7530
0.2 0.0783 0.0832 0.0871 0.0910 0.0948 0.9870 0.1026 0.1064 0.1103 0.1141
0.3 0.1179 0.1217 0.1255 0.1293 0.1331 0.1368 0.1406 0.1443 0.1480 0.1517
0.4 0.1554 0.1591 0.1628 0.1664 0.1700 0.1736 0.1772 0.1808 0.1844 0.1879
0.5 0.1915 0.1950 0.1985 0.2019 0.2054 0.2088 0.2123 0.2157 0.2190 0.2224
0.6 0.2257 0.2291 0.2324 0.2357 0.2389 0.2422 0.2454 0.2486 0.2517 0.2549
0.7 0.2580 0.2611 0.2642 0.2673 0.2704 0.2734 0.2764 0.2794 0.2823 0.2852
0.8 0.2881 0.2910 0.2939 0.2967 0.2995 0.3023 0.3051 0.3078 0.3106 0.3133
0.9 0.3159 0.3186 0.3212 0.3238 0.3264 0.3289 0.3315 0.3340 0.3365 0.3389
1.0 0.3413 0.3438 0.3461 0.3485 0.3508 0.3531 0.3554 0.3577 0.3599 0.3621
1.1 0.3643 0.3685 0.3686 0.3708 0.3729 0.3749 0.3770 0.3790 0.3810 0.3830
1.2 0.3849 0.3869 0.3888 0.3907 0.3925 0.3944 0.3962 0.3980 0.3997 0.4015
1.3 0.4032 0.4049 0.4066 0.4082 0.4099 0.4115 0.4131 0.4147 0.4162 0.4177
1.4 0.4192 0.4207 0.4222 0.4236 0.4251 0.4265 0.4279 0.4292 0.4306 0.4319
1.5 0.4332 0.4345 0.4357 0.4370 0.4382 0.4394 0.4406 0.4418 0.4429 0.4441
1.6 0.4452 0.4463 0.4474 0.4484 0.4495 0.4505 0.4515 0.4525 0.4535 0.4545
1.7 0.4554 0.4564 0.4573 0.4582 0.4591 0.4599 0.4686 0.4616 0.4625 0.4633
1.8 0.4641 0.4649 0.4656 0.4664 0.4671 0.4678 0.4686 0.4693 0.4699 0.4706
1.9 0.4713 0.4719 0.4726 0.4732 0.4738 0.4744 0.475 0.4756 0.4761 0.4757
2.0 0.4772 0.4778 0.4783 0.4788 0.4793 0.4798 0.4803 0.4808 0.4812 0.4817
2.1 0.4821 0.4826 0.4830 0.4834 0.4838 0.4842 0.4846 0.4850 0.4854 0.4857
2.2 0.4861 0.4864 0.4868 0.4871 0.4875 0.4878 0.4881 0.4884 0.4887 0.4890
2.3 0.4893 0.4896 0.4898 0.4901 0.4904 0.4906 0.4909 0.4911 0.4913 0.4916
2.4 0.4918 0.4920 0.4922 0.4925 0.4927 0.4929 0.4931 0.4932 0.4934 0.4936
2.5 0.4938 0.4940 0.4941 0.4943 0.4945 0.4946 0.4948 0.4949 0.4951 0.4952
2.6 0.4953 0.4955 0.4956 0.4957 0.4959 0.4960 0.4961 0.4962 0.4963 0.4964
2.7 0.4965 0.4966 0.4967 0.4968 0.4969 0.4970 0.4971 0.4972 0.4973 0.4974
2.8 0.4974 0.4975 0.4976 0.4977 0.4977 0.4978 0.4979 0.4979 0.4980 0.4981
2.9 0.4981 0.4982 0.4982 0.4983 0.4984 0.4984 0.4985 0.4985 0.4986 0.4986
3.0 0.4987 0.4987 0.4987 0.4988 0.4988 0.4989 0.4989 0.4989 0.4990 0.4990
STATISTICAL MODELS IN SIMULATION
62
In real world phenomena these are few setuations where the actions of
the entities with in the system under study can be completely predicted in
advance.
An appropriate model can be developed by considering the samples
of interest.
Terminology & concepts.
1. discus random variables : let us consider X as a random variable. Of
the no of values of X is finite or countably inficiate then X is called a
discrete random variable.
Let X be a discrete random variable with each possible outcome x, in
Rx then P(x i) = P(x = xi)Gives the probability that the random variable
equals the value of xi.
The no. P(xi), I=1,2… must satisfy the following two conditions.
1) P (Xi) > 0 I
2) 1 ) (
1
=
¯
=
o
i
i x p
The collection of pair (Xi, P (Xi) ), I = 1,2…, is called the probability
distribution of X. & P (xi) is called the Probability more function (pmf) of X.
2. Continuous random variables:  Of the range space RX of the
random variables X is an interest or a collection of intervals X is an interval
or a collection of intervals, X is called a continuous random variable.
For a continuous random variable X, the probability that X lies in the
interval [a, b,] is given by –
P (a s X s b) =
í
b
a
dx x f ) ( (1)
63
The function f (x) is called the probability density function (pdf) of the
random variable X. the pdf satisfies the following conditions.
(a) f(x) > 0 for all x in Rx.
(b) Rx f(x) dx = 1
(c) F (x) = 0 if x is not in Rx.
As a result eq n (1) for any specified value xo
P (x = Xo) = Oxo
í
0
0
) (
x
x
dx x f =0
.: f (x) dx = O
.: P ( X = Xo) = o, the following eqn becomes
P(as X s b) = P (a < x s b) = P (a s x < b) = P (a < x < b) 
(2)
it can be graphically represented as :
f(x)
x=a x=b x
the shaded area represents the probability that X lies in the interval [a, b]
64
3) Cumulative distribution function : the cumulative distribution
function (Cdf), denoted by F(x) measures the probability that the
random variable X assumes a value less than or equal is X. that
is F(x) = P (x < x)
Of X is discrete then
F (x) = E p (xi)  (3)
xi s x
Of X is continuous then
F (x) =
í
÷
x
dt t f
ì
) ( f(x) dt (4)
Some properties of the cdf are :
i) F is a nondecresing f n of a<b then F(a) s F(b).
ii) it F (x) = 1
iii) it f(x) = o
the probability of X can be defined using cdf
P (a< x s b) = f (b) – f (a) , a < b  (5)
If X is a discrete random variable with possible values x1, x2,where
x1<x2<…,the cdf is a stepfth. The value of the cdf is constant in the
interval [xi1,xi] and take the size of p (xi) at xi.
(4) Expectation:  An important concept in probability theory is that of
the expectation of a random variable of x is a random variable the
expected value of x denoted by E (X), for discrete and continuous
variables is defined as follows :
E(X) = XiP (xi) is X is discrete & E (X) =
¯
i v
xif(xi) dx if X is discrete.
(6)
65
E(X) = XiP (xi) is X is discrete & E (X) =
í
÷
o
o
xf(x) dx if X is continuous 
(7)
The expected value E(x) of a random variable X is also referred to as the
mean X, or the first moment of X. the quantity E (Xn), n>1. Is called the
Nth moment of X & is computed as follows :
E (X
n
) =
¯
i v
X
n
P (Xi) if X is discrete (8)
& E (X
n
) =
í
÷
o
o
X
n
f(x) dx if X is Continues (9)
the variance of a random variable, X, denoted by V(x) or var ( X) or is
defined by
V(X) = E [X –E(x)
2
]
A useful identify in computing V(X) is given by
V(X)=E (X
2
) – [ E(X)
2
]  (10)
Where E(x) is central tendency of a random variable.
The variance of x measures the expected value of the rquared
difference between the random variable & its mean.
V(x) is a variation of the possible values of X around the mean E(x).
The standard deviation, is defined to be the rquare root of the
variance , o2 the mean E(X) & std deviation ) (x v = o 
(11) is defined by eqn. (11)
66
(5) The Mode : In the discrete case, the mode is the value of the random
variable that occurs most frequently, in the continuous case, the mode is
the value of which the pdf is marimized. The mode may not be unique. Of
the modal value occurs at two values of the random variable, the
distribution is said to be bimodal.
Useful statistical models
In a queucing system, interarrival and service times are often probabilitic.
In an inventory model, the time between demand and had times may be probabilitic .in a
reliability model, the time to failure may be probabilistic. In each of these instances the
simulation analyst desires to generale random extents and to use a known statistical
model if the underlying distribution can be found.
1) Queuing Systems:  In the queuing examples, interarrival and
service times are given. The times between arrivals and service times
were always probabilistic time or a constant service time.
Service times may be constant or probabilitic. Of service times are
completely randam, the expenetial distribution is often used for simulation purpose.
But these are several possibilities. At may be possible that the service times are
constant but some random variability causes fluctuations in either a positive or
negative way.
The gamma and weibull distibutions are also used to model
interarrival and service times. The difference between the experential.
Gamma and welbull distributions involve the location of the models of the
pdf’s and shapes of these fails for large & small times. The experential
distribution has its mode at the origin but the gamma & weibull
distributions have there modes at some pt (>o) which is a function of the
parameter values selected.
2) Inventory Systems : In realistic inventory systems there are three
random variables:
i) the no of units demanded per order or per line period.
ii) The time between demands:
iii) The lead time
67
In very simple mathematical models of inventory systems demand
is a constant over time & lead time is zero or a constant.
Hence, in simulation models, demand occurs randomly in time.
The geometric distribution, which is a special case of the –ve
benomical, has its mode at unity, given that affeart one demand has
occurred. Of demand data are characterized by a long, the –ve binomical
distribution may be appropriate.
The poison distribution is often used to model demand becouse it is
simple, it is extensively tabulated & it is well known. The fail of the passion
distribution is generally shorter than that of the negative binomial. Is for
the same set, fewer large demands will occur if a poisson model is used
than if a negative binomial distribution is used.
3) Reliability and Maintainability : Time to failure has been
modeled with numerous distributions. Including the expenential, gamma &
weibull. If only random failures occur, the time to failure distribution may
be modeled as expenential. The gamma distribution arises from modeling
standlay redundancy where each component has an expenential time to
failure. The weibull distribution has been extensively used to represent
time to failure & he nature is such that it may be made to approcimate
many obsorved phenomena.
4) Limited Data : In many instances simulations begin before data
collection has been completed. Three distribution have application to in
complete or limited data. These are the uniform, triangular & beta
distributions. The uniform distribution can be used when an interarrival or
service time is known to be random, but no information is immediately
available about the distribution the triangular distribution can be used
when atsumptions are mode about the minimum, maximum & modal
values of the random variable. Beta distribution provides a variety of
distributional farms an the unit intervals
5) Other Distributions : Several other distributions may be useful in
discrete system simulation. The bernouli & binomial distributions are two
discrete distributions which may describe phenomena of interest.
68
DISCRETE DISTRIBUTIONS
Discrete random variables are used to describe random phenomena in
which only integer values can occur.
1. Bernoulli trials and the Bernoulli Distribution : Consider in trials
each of which can be a success or a failure.
Let Xj =1 if j
th
is a Success.
Xj = 0 if j
th
is a failure.
The n Bernoulli trials are called a Bernoulli process if the trials are independent. Trial
has only two possible outcomes is success or failure.
There fore, probability can be defined as: P (x1, x2 … xn) = P1 (x1). P2 (x2)…
Pn (xn) & Pj (Xj) = P (Xj) = { P ,
Xj = 1, j = 1,2 …n
{ 1P = q, Xj = 0 , j = 1,2…n
{ O, othervise )
(11)
for one trial, given (eq n 11) distribution is called the bernoulli distributions.
: Means & variance of Xj are defined as –
E(Xj) = 0.q + 1.p = p
& V(Xj) = [ (O2.q) + (12.P) ] – P2
= P (1P)
BINOMIAL DISTRIBUTION : The random variable X denotes the no of
success in n Bernoulli trials has a binomial distribution given by P(X) where
P(x) = { ) (
n
x
p
x
q
nx
, x=0,1,2…..n
, otherwise (12)
The probability of eq n (12) in calculated as :
P(SSS…SS FF…FF ) = Px qnx
x values nx values
69
Where q = 1p
The Bernoulli random variables X with mean P & variance P (1P) = pq
can be expressed as –
X = X1 + X2+….+ Xn
: mean E (X) = P + P+ … +P = np 13)
Variance V(x) = pq + pq+…+pq = npq  (14)
GEOMETRIC DISTRIBUTION : This distribution is related to a sequerce
of bernoulli trials, the Random variable of interest X is defined to be the no
of trials to achieve the first success.
: . P(x) = { q
x1
p , x=1, 2…
{ 0, otherwise (15)
The event { X=x
2
} occurs when these are x1 failure followed by a success.
Probability of failure = q = 1p
Probability of success = p
P(FFF…..FS) = q
x1
p
Mean = E(X) = 1/p (16)
& Variance = V(x) = q/p
2
(17)
POISSON DISTRIBUTION : The poisson probability mass f n is given by
 P(x) =
\

÷
! x
e
x
o
o
, x=0,1,…… 
(18)
Generally poisson distribution descrebes random processes & generally it
is simple sample. Where a < o.
mean = E (X) = x = V(x)
and cumulative distribution f n is given by
70
¯
=
÷
=
x
o i
i
i
e
x F
!
) (
o
o
(19)
Continuous Distributions : Continuous random variables can be used
to discribe random phenomena in which the variable of interest can take on
any value in same interval. ( I )
Uniform Distribution : A random variable X is uniformaly distributed on
the interest (a,b) if its pdf is given by –
F(X) = { 1/ba, a s x s b _____(20)
{ o , otherwise
The cdf is given by 
f(x) = { o, x s a
{ xa/xa, a s x s b ________(21)
{1, x > b
P (X1 < X < X2) = F(X2) – F (X1) =
a b
x x
÷
÷ 1 2
Which is propertional to the length of the interval for all X1 & X2 satisfying a
< X1 <X2 < b. :. Mean & variance can be defined as .
E(X) =
2
b a ÷
(22)
V(X) =
12
) (
2
b a ÷
(23)
(ii) EXPENENTIAL DISTRIBUTION : A random variable X is said to be
expenentially distributed with parameter X > O if its pdf is given by 
f (X) = {
x
e
ì
ì
÷
, x > o 
(24) { o, else
where
71
The exponentical distribution has been used to model intervival
times when arrivals are completely random and to model service times
which are highly variable.
In these instances is a sate; arrivals per hr service per min.
The exponential distribution has mean & variance given by
E(X) = 1/ì & V(X) = 1/ì
2
 (25)
Thus the mean and standard deviation are equal. Cdf can be expressed
as –
F(X) = { o, X < O (26)
{
x t
e dt
ì ì
ì
÷ ÷
÷ =
í
1
0
0
, x > 0
(iii) Gamma Distribution A function used in defining the gamma
distribution is the gamma function which is defined for all  > o as
I () = dx e x
x ÷ ÷
í
o

0
1
(27)
by integrating equation (27) it became
I () = (1) I (1) (28)
If  is an integer, then using I (1) = 1, equation (28) becomes,
I () = (1) ! (29)
The gamma Fn can be thought of as generalization of the factorial notion
which applies to all the nos. not just integers.
A random variable X is gamma distributed with parameters  & u if its pdf is given by
f(x) =
u; 
u;
 t
u
÷ ÷
¹
´
¦
e
1
) (
) (
, X>O
72
{ O, otherwise (30)
The parameter  is called the shape parameter and u is called the scale
parameter.
The mean and variance of the gamma distribution are given by –
E(x) = 1/u (31)
& V(x) = 1/Bu

(32)
The cdf of X is given by 
F(x) = dt e t
t u 
o
;
u
 t
u
÷ ÷
¦
¹
¦
´
¦
÷
í
1
) (
) (
1 , x>0
{ 0, X s 0 (33)
When  is an integer, the gamma distribution is related to the exponential distribution in
the following manner :
If the random variable, X is the sum of B independent, exponentially distributed random
variables, each with parameter BQ, then X has a gamma distribution with parameters B &
Q
X = X
1
+ X
2
+ …. + X

(34)
73
where the pdf of Xj is given by 
{
xj
e Xj g
u
u) ( ) ( = , x > 0
{ 0, otherwise
and Xj are matually independent.
(iv) Erlang Distribution : The pdf of equation,
x
e x f
u 
u;
 t
u
÷ ÷
¹
´
¦
=
1
) (
) (
) ( , x > 0
{ 0, otherwise
is often referred to as the Erlang distribution of order K when B = K, an integer.
The mean & variance of gamma distribution can be used to define the mean & variance
but regardless of the value of B.
Ie. E(X) = 1/u & V(X) = 1/ u
2
if  = k, an integer
Mean of the distribution can be difined as –
E(X) = E(X
1
) + E(X
2
) + …. + E(X
k
)
The expected values of the exponentially distributed Xj are each given by 1/ku.
74
Thus,
u u u u
1 1
......
1 1
) ( = + + + =
K K K
X E
If the random variables Xj are independent the variance of their sum is the sum of the
variance or
2 2 2 2
1
) (
1
......
) (
1
) (
1
) (
u u u u K K K K
X V = + + + =
when B=k , a +ve integer, the cdf can be defined as 
¦
¹
¦
´
¦
÷ =
¯
÷
=
1
0
) ( 0
!
1 ) (
k
i
x k x k
i
e
x F
i
u u
, x>0 (35)
Which is the sum of poisson terms with mean o = Kux.
75
6
Queuing Models
 Characteristics of Queuing systems :
The key elements of queuing systems are the customes and servers. The
term customer can refer to anything that arrives at a facility and requires
service (e.g. people, machines, patienes, email etc.) the term “server”
might refer to any resource which provides the requested service. (e.g.
receptionist, mechanics, medical personnel, CPU in a computer etc.)
1. The calling population :
The population of potential customers, referred to as the calling
population, may be finite or infinite. Examples of infinite population may be
finite but large we may use infinite population models provided that the
number of customers being served or waiting for service at any given time
is a small proportion of the population of potential customers.
As an example of finite population
consider, a bank of five machines which may break down and single
mechanic is available for service.
In an infinite population model, the arrival rate is not affected by the
number of customers who have left the calling population and joined the
queuing system. For the finite calling population models, the arrival rate to
the queuing system does depend on the number of customers being
served and waiting.
2. System capacity :
In many queuing systems there is a limit to the number of
customers that may be in the waiting line or systems. An arriving customer
76
who finds the system full does not enter but returns immediately to the
calling population e.g. waiting room of a clinic.
Some systems may be considered as having unlimited capacity.
E.g. Ticket counters at a railway station.
3. The arrival process :
The arrival process for the models is characterized in terms of
interarrival times of successive customers. Arrivals may occur at
scheduled times or at random times. When arrivals are at random, the
interararrival times are usually characterized by a probability distribution.
The most important model for random arrivals is the Poisson arrival
process. For a Poisson arrival rate is customer per unit time. If An
represent interarrival time between customer n1 and n, then for a Poisson
arrival process, An is exponentially distributed with mean 1/ time units.
4. Queue Behavior and Queue Discipline :
Queue behavior refers to customer actions while in a queue waiting
for service to begin. There is possibility that incoming customers may balk
(i.e. leave if the line is too long ), renege (i.e. leave after being in the line if
the line is moving too slowly), or jockey (move from one line to another),
Queue discipline refers to the logical ordering of customers in a queue,
common queue disciplines are firstin, firstout (FIFO); lastin, firstout
(LIFO); service in random order (SIRO); Shortest processing time first
(SPT); and service according to priority (PR).
5. Service Times and Service Mechanism :
The service times of successive arrivals are denoted S1, S2, S3,….
They may be constant or of random duration. If service times are random,
then { S1, S2,…} is usually a sequence of independent and identically
distributed random variables. The exponential. Erlang, Weibull etc. are
77
used to represent service times in different situations.
Queuing Notation :
Kendall [1953] proposed a notational system for parallel server
systems. It is in the format A/B/C/N/K.
A : the interarrival – time distribution
B : the sercice – time distribution
C : the number of parallel servers
N : system capacity
K : the size of the calling population.
Common symbols for A and B are :
M : Exponential or Markov
D : constant or deterministic
Ek : arbitary or general
GI : general independent.
Let
Pn : Steadystate probability of having n customers in system.
Pn(t): Probability of n customers in system at time t.
L : Arrival rate
Le : Effective arrival rate
U : Service rate of one server
P : Server utilization
An : Interarrival time between customers n1 and n
Sn : Service time of the n
th
arriving customer.
Wn : Total time spent in system by the n
th
arriving customer.
Wn
q
: Total time spent in the waiting line by customer n
L (t) : The number of customers in system at time t.
Lq(t) : The number of customers in queue at time t.
L : longrun timeaverage number of custmers in system.
Lq : Longrun timeaverage number of customers in queue.
78
W : Longrun average time spent in system per customer.
Wq : Longrun average time spent in queue per customer.
Note :
(I) All systems will be assumed to have a FIFO queue discinline.
(II) The term system usually refers to the waiting line plus the service
mechanism; whereas the term ‘queue’ refers to the waiting line
alone.
 Longrun Measures of performance of Queuing system.
1. TimeAverage number in System, L :
Consider, a queuing system over a period of time T.
Let L (t) denote the number of customers in the system at time t.
Let Ti denote the total time during [o,T,] in which the system contained
exactly I customers. In
General,
¯
=
=
o
0 i
T Ti
The timeweightedaverage number in the system is defined by
¯ ¯
= =

.

\

= =
o o
0 0
^
.
1
i i
T
Ti
i Ti i
T
L ………………………… (1)
We Have,
¯
í
=
=
o
0
) ( .
i
T
O
dt t L Ti i
í
=
T
O
dt t L
T
L ) (
1
^
………………………………. (2)
The expression in equations (1) and (2) are always equal for any queuing system,
regardless of the number of servers, the queue discipline, or any other special
circumstances. This average is also called timeintegrated average.
79
As time T gets large, the observed value L approaches a limiting value,
say L, which is called the longrun timeaverage number in the system.
That is
· ÷ ÷ =
í
LasT dt t L
T
L
T
O
) (
1
^
……………….. (3)
Equation (1)and (2) can also be applied to any subsystem of queuing
system.
Let Lq(t) denote the number of customers waiting in line, and Tiq denote
the total time during [0,T] in which exactly I customers are waiting in line,
then
í
¯
= =
=
T
O
q
q
i
q dt t L
T
Ti i
T
L ) (
1
1
q
0
^
…………………. (4)
And · ÷ ÷ asT L L q q
^
with probability 1 ….(5)
Where Lq is the observed timeaverage number of customers waiting in line from time 0
to T and Lq is the longrun timeaverage number of customers waiting in line.
2. Average Time spent in system per customer, w;
Consider, a queuing system over a period of time T.
Let Wi be the time spent by customer I in the system during [0, T]. The
average time spent in the system per customer, called the average system
time, is given by
1
i
1
^
¯
=
=
N
i
q W
N
w ……………………………………….(6)
Where N is the number of arrivals in [0, T].
80
Let Wi
q
denote the total time customer I spends waiting in queue. Let Wn
q
be the observed average time spend in the queue(called delay) and Wq
be the longrun average delay per customer. Then
1
1
^
¯
=
=
N
i
q
i
q W
N
w ……………………………… (7)
And
^
· ÷ ÷ asN w w
q
q ……………. (8)
Example :
Consider a simulation of queuing system as shown below, Obtain L, Lq and Wq
Customer Time of
Arrival
Time of
Departur
e
1 0 2
2 3 8
3 5 10
4 7 14
5 16 20
Graded Questions
1. A tworunway (one runway for landing, one for taking off) airport is being designed for
propellerdriven aircraft. The time to land an airplane is known to be exponentially
Distributed with a mean of 1 ½ minutes. If airplane arrivals are
assumed to occur at random.
What arrival rate can be tolerated if the average wait in the sky is not to
exceed 3 minutes?
2. The port of Trop can service only one ship at a time. However, there is
mooring space for three more ships. Trop is a favorite port of call, but if
81
no mooring space is available, the ships have to go to the Port of
Poop. An average of secen ships arrive each week, according to a
Poisson Process. The port of Trop has the capacity to handle an
average of eight ships a week, with service times exponentially
distributed. What is the expected number of ships waiting or in service
at the Port of Trop?
3. At Tony and Cleo’s bakery, one kind of birthday cake is oftered. It
takes 15 minutes to decorate this particular cake, and the job is
performed by one particular baker, in fact, this is all this baker does,
what mean time between arrivals (exponentially distributed) can be
accepted if the mean length of the queue for decorating is not to
exceed five cakes?
4. Patients arrive for a physical examination according to a Poisson
process at the rate of one per hour. The physical examination requires
three stages, each one independently and exponentially distributed
with a service time of 15 minutes. A patient must go through all three
stages before the next patient is admitted to the treatment facility.
Determine the average number of delayed patients, Lq for this system.
[Hint : The variance of the sum of independent random variables is the
sum of variance.
5. Suppose that mechanics arrive randomly at a tool crib according to a
Poisson process with rate L = 10 per hour. It is known that the single
tool clerk services a mechanic in 4 minutes on the average. With a
standard deviation of approximately 2 minutes. Suppose that
mechanics make $15 per hour. Determine the steadystate average
cost per hour of mechanics waiting for tools.
6. Arrivals to an airport are all directed to the same runway. At a certain
time of the day, these arrivals form a Poisson process with rate 30 per
hour. The time to land an aircraft is a constant 90 seconds. Determine
Lq, (I), L and (I) for this airport. If a delayed aircraft burns $5000 worth
of fuel per hour on the average, determine the average cost per aircraft
of delay waiting to land.
82
7. A machine shop repairs small electric motors which arrive according to
a Poisson process at a rate of 12 per week (5day, 40hours work
week). An analysis of past data indicates that engines can be repaired
or an average, in 2.5 hours, with a variance of 1 hour2, I low many
working hours should a customer expect to leave a motor at the repair
shop (not krowing the status of the system)? If the variance of the
repair time could be controlled, what variance would reduce the
expected waiting time to 6.5 hours?
8. Arrivals to a selfservice gasoline pump occur at a Poisson fashion at a
rate of 12per hour. Service time has a distribution which averages 4
minutes with a standard deviation of 11/3 minutes. What is the
expected number of vehicles in the system?
9. A large customer shopping mall is to be constructed. During busy time
the arrival rate of cars is expected to be 1000 per hour. And based on
studies at other malls, it is believed that customers will spend 3 hours,
on average, shopping, the mall designers would like to have sufficient
parking so that there enough spaces 99.9% of the time. How spaces
should they have?
10. A small copy shop has a selfservice copier. Currently there is room for
only 4 people to line up for the machine (including the person using the
machine); when there are more than 4 people, then the additional
people must line up outside the shop as much as possible. For that
reason they are thinking about a second selfservice copier. Self
service customers have been observed to arrive at a rate of 24 per
hour, and they use the machine 2 minutes, on average. Assess the
impact of adding another copier. Carefully state any assumption or
approximations you make.
[Note : For Q.11 to Q16, Assume exponential service time]
11. Customers arrive at a one man barber shop according to a Poisson process with a
mean interarrival time of 20min. Customers spend an average of 15 min in the
barber’s chair,
83
(a) what is the expected number of customers in the barber shop? In the
queue?
(b) What is the probability that a customers in the barber shop? In the
queue?
(c) How much can a customer expect to spend in the barber shop?
(d) Management will put another chair and hire another barber when a
customer’s average waiting time in the shop exceeds 1.25 h. how
much must the average rate of arrivals increase to warrant a second
barber?
(e) What is average time customers spend in the queue?
(f) Obtain the probability that waiting time in system is greater than 30
minutes
(g) Obtain the probability that there are more than three customers in the
system.
Ans : [3, 2.25; 0.25; 1h; 3.2phr; 0.75h; 0.61; 0.32]
12. If customers arrive for service according to a Poisson distribution at the
average rate of 5 per day, how fast must they be serviced on the
average (assume exponential service time) in order to keep the
average number of customers in the system less than 4?
Ans : [3.84
h/service]
13. If the mean arrival rate is 24 per hour, find from the customer’s point of
view of the time spent in the system, whether 3 channels in parallel
with a mean service rate of 10 per hour is better or worse than a single
channel with mean service rate of 30 per hour.
Ans : [single
channel is
better.]
84
7
Random Number Generation
Random numbers are necessary basic ingredient in the simulation of
almost all discrete system. Most computer languages have a subroutine or
function that will generate a random number.
1. Properties of Random Numbers.
A sequence of random number R1, R2,…, must have two statistical properties,
uniformity, and independence. Each random number R1 is an independent sample drawn
from a continuous uniform distribution between zero and 1. That is, the pdf is given by.
F(x) = 1, 0 < x < 1
0, otherwise
The expected value of each Ri is given by
í
= =
1
1
0
2
2
) (
O
x
xdx R E
=
2
1
and the variance is given by,
 
í
÷ =
1
2 2
) ( ) (
O
R E dx x R V
2
1
0
3
2
1
3

.

\

÷ =
x
12
1
4
1
3
1
= ÷ =
85
Note :
1. If the interval (0,1) is divided into n classes, or subinterval of equal length, the
expected number of observations in each interval is N/n, where N is the total no. of
observation.
2. The probability of observing a value in a particular interval is
independent of the previous value drawn.
2. Generation of PseudoRandom Number
The word “pseudo” is used to imply that the very act of generating random numbers by a
known method removes the potential for true randomness. If the method is known the set
of random numbers can be replicated, that is the numbers are not truly random.
The goal of any generation scheme, however, is to produce a sequence of
numbers between zero and 1 which simulate, or imitates, the ideal
properties of uniform distribution and independence as closely as
possible.
When generating pseudorandom numbers certain problems or erros can
occur.
1. The generated numbers may not be uniformly distributed.
2. The generated numbers may be discretevalued instead of continuous
valued.
3. The mean of the generated numbers may be too high or too low,
4. The variance of the generated nos. may be too high or too low,
5. There may be dependence.
e.g.
(a) Autocorrelation between numbers.
86
(b) Nos. successively higher or lower than adjacent nos.
(c) Several numbers above the mean followed by several nos. below
the mean.
Departures from uniformity and independence for a particular generation
scheme may be detected by statistical tests. If such departures are
detected, the generation scheme should be dropped in favour of an
acceptable generator.
14. A telephone exchange has 2 long distance operators. The telephone
company finds that during the park load, long distance calls arrives in a
Poisson fashion at an average rate of 15 per hour. The length of
service on these calls is approximately exponentially distributed with
mean length 5 min.
(a) What is the probability that a subscriber will have to wait for his long
distance call during the park hours of the day?
(b) If the subscribers will wait and are serviced in turn, what is the
expected waiting time?
Ans : [ 0.48; 3.2
min]
15. A oneperson barber shop has 6 chairs to accommodate people
waiting for a hair cut. Assume that customers who arrive when all the 6
chairs are full leave without entering the barber shop. Customer arrive
at the average rate of 3 per hour and spend an average of 15 min in
the barber’s chair.
(a) What is the probability that a customer can get directly into the
barber’s chair upon arrival?
(b) What is the expected number of customers waiting for a hair cut?
(c) How much time can a customer expect to spend in the barber
shop?
87
(d) What fraction of potential customers are turned away?
Ans : [ 0.2778;
1.3878; 43.8 min;
3.7%]
16. A Barber shop has 2 barbers and 3 chairs for waiting customers.
Assume that customers arrive in Poisson fashion at a rate of 5 per
hour and that each barber services customers. According to
exponential distribution with mean of 15 min. further, if a customer
arrives and there are no empty chairs in the shop, he will leave. Find
the steadystate probabilities. What is the probability that the shop Is
empty? What is the expected number of customers in the shop?
17. Two attendants manage the tool crib while mechanics, assumed to be
from an infinite calling population, arrive for service. Assume poisson
arrivals at rate of 2 meehanics per minute and exponentially distributed
service times with mean 40 seconds.
(a) Obtain the number of mechanics in the system and waiting time in
the queue.
(b) Suppose service takes on an average 40 seconds with s.d. of 30
seconds. Obtain the number of mechanics in the system.
18. What are the characteristics of queueing system and how would you
determine the costs in queueing problems.
19. Name and explain some of the useful statistical models for queuing
systems
20. What are the long run measures of performance of queuing systems?
Explain briefly.
Usually, random numbers are generated by a digital computer as a part of
the simulation. Numerous methods can be used to generate the values. In
88
selecting among these methods. Or routines, there are a number of
important considerations:
1. The routine should be fast, individual computations are inexpensive,
but simulation may require many hundreds of thousands of random
numbers. The total cost can be managed by selecting a
computationally efficient methodnumber generation.
2. The routine should be portable to different computers, and ideally to
different programming languages. This is desirable so that the
simulation program produces the same results wherever it is
executed.
3. The routine should have a sufficiently long cycle. The cycle length or
period, represents the length of the randomnumber sequence before
previous numbers begin to repeat themselves in an earlier order. Thus,
if 10,000 events are to be generated, the period should be many times
that long.
A special case of cycling is degenerating. A routine degenerates when
the same random numbers appear repeatedly. Such an occurrence is
certainly unacceptable. This can happen rapidly with some methods.
4. The random numbers should be replicable. Given the starting point (or
conditions), it should be possible to generate the same set of random
numbers, completely independence of the system that is being
simulated. This is helpful for debugging purposes and is a mean of
facilitating comparisons between systems. For the same reasons, it
should be possible to easily specify different starting points, widely
separated, within the sequence.
5. Most important, and as indicated previously, the generated random
numbers should closely approximate the ideal statistical properties of
uniformity and independence.
3. Techniques for Generating Random Numbers
(a) Linear Congruential method
89
The linear congruential method produces a sequence of integers
X1, X2,…. Between zero and m1 according to the following
recursive relationship :
X
I+1
= (a Xi + C) mod m, I = 0,1,2…
The initial value Xo is called the seed, a called the constant
multiplier, C is the increment, and mds the modulus. If C# O, the
form is called the mixed congruential method. When C = O, the
form is known as the multiplicative congruential method. Random
numbers between zero and 1 can be generated by
,..... 2 , 1 , 0 ,
1
= = i
m
X
R
i
Note : The ultimate test of any generation scheme is how closely
the generated numbers R1, R2 … approximate uniformity and
independence. Consideration must also be given to maximum
density and maximum period.
Maximum density means that the values assumed by Ri, I = 1,2,…
leave no longer gaps [0,1]. This can be achieved by making m
suitably large (e.g. 2
31
1 or 2
48
)
To avoid cycling (i.e. recurrence of the same sequence of generated numbers) the
generator should have the largest possible period. This can be achieved by proper
choice of a, c, m, and Xo.
(b) Combined linear congruential generators
Let Xi,1 , Xi2, …. Xi k be the i
th
output from k different
multiplicative congracuential generators, Let mj be the prime
modulus of the j
th
generator and multiplier aj is chosen so that the
period is mj1.
Let ( ) 1 mod 1
1
1
,
1
1
÷


.

\

÷ =
¯
÷
÷
m X X
k
j
j i
j
90
And 0 ,
1
1
1
1
> = X
m
X
R
0 ,
1
1
1
1
=
÷
= X
m
m
The maximum possible period for such a generator is
P =
1
2 1
2
) 1 )......( 1 )( 1 (
÷
÷ ÷ ÷
k
k
m m m
4. Test for Random Numbers
The desirable properties of random numbers are uniformity and
independence.
(1) Frequency test :
This is a test for checking uniformity, here,
 Ho : Ri ~ U[0,1]
 H
1
: Ri ~ U[0,1]
(a) The kolmogorovsimirnov test :
This test compares the continuous cdf, F(x), qf the uniform distribution
to the campirical cdf, S
N
(x) of the sample of N observations. We have,
F(x) = x, 0 s x s 1
Let R
1
, R
2
…., R
N
be the sample from random number generator.
Then SN (x) is defined by
S
N
(x) =
N
X S R R R
x N
,...., , of number
2 1
91
As N becomes larger, S
N
(x) is better approximation to F(x).
Let D = max ) ( ) ( x S x F
N
÷
The sampling distribution of D is known and is tabulated.
Test procedure :
Step 1: Rank the data from the smallest to largest. Let R
(i)
denotes the
i
th
smallest observation.
Let R
(i)
s R
(2)
s…sR
(N)
Step 2 : Compute
D
+
= max [i/N – R
(i)
]
D

= max
N
i
R
1
) 1 (
÷
÷
D = max (D

, D
+
)
Step 3: Determine critical value,
o
D , for the specified significance
level o and the given sample size N.
Step 4: If D >
o
D ,
0
H is rejected.
(b) The chisquare test.
Suppose the observed values are divided into n classes.
Let O
i
= observed number in the i
th
class.
e
i
= expected number in the i
th
class.
Then,
( )
¯
=
÷
= ÷
n
i i
i i
e
e o
X chi
1
2
2 2
92
for the uniform distribution e
i
=
n
N
d.f. = n1
if X
2
> X
2
n1, a,
we reject Ho
Run : A run is defined as succession of similar events preceded and
followed by a different event.
(2) Runs test : This is a test for checking independence Ho: Ri ~
independently Hi : Ri ~ independently.
(a) Runs up and Runs down:
Here, we are concerned with number of runs. Too few or too many
runs would indicate nonrandom behaviour of data.
An up run is a sequence of numbers each of which is succeeded by a
large number. A down run is sequence of numbers each of which is
succeeded by a smaller number. A ‘+’ (‘_’) sign will indicate an observation
which is fallowed by a larger (smaller) number.
Then, u = E® =
3
1 2 ÷ N
o = V(R) =
90
29 16 ÷ N
For N > 20, R~ N(u , o)
The test statistic is Z =
o
u ÷ R
~ N(0,1)
o
Reject H
o
if Z < Z
a/2
or Z > Z
a/2
where o is the level of significance.
(b) Runs above and below the mean :
93
A ‘+’ sign will be used to denote an observation above mean, and a ‘_’
sign will denote an observation below the mean.
Let, n
1
= no. of observation above the mean.
n
2
= no. of observation below the mean.
R = no. of runs.
Then , u = E(R) =
2
1 2
2 1
+
N
n n
; N = n
1
+n
2
o
) 1 (
) 2 ( 2
) (
2
2 1 2 1 2
÷
÷
= =
N N
N n n n n
R V o
For n1 > 20 or n2 > 20, R~ N (u, o )
Let Z =
o
u ÷ R
Reject Ho if Z < Za/2 or Z > Za/2 where o is the level of signnificance.
Colmogorov –Smirnov Critical Values
Degrees of 105.50%
Freedom D D D
(N) 0.10 0.05 0.01
1 0.95 0.975 0.995
2 0.776 0.842 0.929
3 0.642 0.708 0.828
4 0.564 0.624 0.733
5 0.51 0.565 0.669
6 0.47 0.521 0.618
7 0.438 0.486 0.577
8 0.411 0.457 0.543
9 0.388 0.432 0.514
10 0.368 0.41 0.49
11 0.352 0.391 0.468
94
12 0.338 0.375 0.45
13 0.325 0.361 0.433
14 0.314 0.349 0.418
15 0.304 0.338 0.404
16 0.295 0.328 0.392
17 0.286 0.318 0.381
18 0.278 0.309 0.371
19 0.272 0.301 0.363
20 0.264 0.294 0.356
25 0.24 0.27 0.32
30 0.22 0.24 0.29
35 0.21 0.23 0.27
Over
35
N
22 . 1
N
36 . 1
N
63 . 1
Percentage Points of the ChiSquare Distribution with v Degrees of
Freedom
o
X
2
95
u ;
2
0.005 ;
2
0.01 ;
2
0.025 ;
2
0.05 ;
2
0.10
1 7.88 6.63 5.02 3.84 2.71
2 10.6 9.21 7.38 5.99 4.61
3 12.84 11.34 9.35 7.81 6.25
4 14.96 13.28 11.14 9.49 7.78
5 16.7 15.1 12.8 11.1 9.2
6 18.5 16.8 14.4 12.6 10.6
7 20.3 1805 16 14.1 12
8 22.0 20.1 17.5 15.5 13.4
9 23.6 21.7 19 16.9 14.7
10 25.2 23.2 20.5 18.3 16
11 26.8 24.7 21.9 19.7 17.3
12 28.3 26.2 23.3 21 18.5
13 29.8 27.7 24.7 22.4 19.8
14 31.3 29.1 26.1 23.7 21.1
15 32.8 30.6 27.5 25 22.3
16 34.3 32 28.8 26.3 23.5
17 35.7 33.4 30.2 27.6 24.8
18 37.2 34.8 32.5 28.9 26
19 38.6 36.2 32.9 30.1 27.2
20 40.0 37.6 35.2 31.4 28.4
21 41.4 38.9 35.5 32.7 29.6
22 42.8 40.3 36.8 33.9 30.8
23 44.2 41.6 38.1 35.2 32
24 45.6 43 39.4 36.4 33.2
25 49.6 44.3 40.6 37.7 34.4
26 48.3 45.6 41.9 38.9 35.6
27 49.6 47 43.2 40.1 36.7
28 51.0 48.3 44.5 41.3 37.9
29 52.2 49.6 45.7 42.6 39.1
30 53.7 50.9 47 43.8 40.3
40 66.8 63.7 59.3 55.8 51.8
50 79.5 76.2 71.4 67.5 63.2
60 92.0 88.4 83.3 78.1 74.4
70 104.2 100.4 95 90.5 85.5
80 116.3 112.3 106.6 101.9 96.6
90 128.3 124.1 118.1 113.1 107.6
96
100 140.2 135.8 129.6 124.3 118.5
Graded Questions
1. Use the chisquare test with o=0.05, to test whether the data shown below are
uniformly.
Distributed.
0.34 0.90 0.25 0.89 0.87 0.44 0.12 0.21 0.46 0.67
0.83 0.76 0.79 0.64 0.70 0.81 0.94 0.74 0.22 0.74
0.96 0.99 0.77 0.67 0.56 0.41 0.52 0.73 0.99 0.02
0.47 0.30 0.17 0.82 0.56 0.05 0.45 0.31 0.78 0.05
0.79 0.71 0.23 0.19 0.82 0.93 0.65 0.37 0.39 0.42
2 Use the linear congruential method to generate a sequence of three twodigit random
integers. Let Xo = 27, a = 8, c = 47 and m = 100.
3. Do we encounter a problem in the previous exercise if Xo = O?
4. Use the multiplicative congruential method to generate a sequence of
four three digit random integers. Let Xo = 117, a = 43 and m = 1000.
5. The sequence of numbers 0.54, 0.73, 0.98, 0.11 and 0.68 has been generated. Use
the kolmogorov
Smirnov test with o = 0.05 to determine if the hypothesis that the numbers are
uniformly distributed
on the interval [0, 1] can be rejected.
6. Consider the first 30 two digit values in Example 1. Based on runs up
and runs down, determine whether the hypothesis of independence
can be rejected, where o = 0.05.
7. Consider the first 30 two digit values in Example 1. Determine whether
there is an excessive number of runs above or below the mean. Use o
= 0.05.
97
8. Consider the first 30 two digit values in Example 1. Test whether the
2
nd
, 9
th
, 16
th
, … numbers in the sequence are autocoerrelated, where o
=0.05.
9. A sequence of 1000 fourdigit numbers has been generated and an
analysis indicates the following combinations frequencies. Four
different digits, 565; one pair 392; two pair 17; 3 like digit, 24; 4 like
digit, 2. Based on the Poker test, Test whether these numbers are
independent. (Use o = 0.05)
10. Use the mixed congruential method to generate a sequence of
three twodigit random numbers with Xo = 37, a = 7, c = 29, and m =
100.
11. Use the mixed congruential method to generate a sequence of three
twodigit random integers between 0 and 24 with Xo = 13, a = 9, c= 35.
12. Consider the multiplicative congruential generator under the
following circumstances:
(a) a = 11, m = 16, Xo = 7.
(b) A = 11, m= 16, Xo = 8.
(c) A = 7, m = 16, Xo = 7.
(d) A = 7, m = 16, Xo = 8.
Generate enough values in each case to complete a cycle. What
inference can be drawn? Is maximum period achieved?
13. For 16bit computers, combine three multiplicative generators with m1
= 32363, a1 = 157, m2 = 31727, a2 = 146, m3 = 31657 and a3 = 142.
Generate 5 random numbers with the combined generator using intial
seeds Xi,o = 100, 300, 500 for the individual generators i = 1,2,3.
14. Test the following sequence of numbers for uniformity and
independence using produres you learned in this chapter: 0.574,
0.928, 0.515, 0.055, 0.507, 0.351, 0.262, 0.797, 0.788, 0.442, 0.097,
0.798, 0.227, 0.127, 0.474, 0.825, 0.007, 0.182, 0.929, 0.852.
98
15. Consider the data in example 1. Can the hypothesis that the numbers
are. Independent be rejected no the basis of the length of the runs up
and down when o = 0.05.
16. State the various test for random numbers and explain briefly any two
of them.
17. Mention the properties of random numbers, and give the methods of
generating pseudo random numbers.
Summary :
In the chapter the desoubtion of the generation of random nos. are given and the
generated nos. are uniform & independent.
Of the many types of random no. generaters available, the linear
congruential method is the most widely used. Many types of statistical
tests are used in testing random number generators, same of these tests
are for uniformity & others for testing independence.
99
8
Random Variate Generation
Here we deal with procedures for sampling from a variety of continuous
and discrete distributions, it is assumed that a distribution has been
completely specified.
Inverse Transform Techniques:
The Inverse transform technique can be used to sample from a variety of distributions.
The technique is described in the following steps.
Step 1: Compute the cdf of the desired r, v, x.
Step 2 : Set F(x) = R on the rance of , X, where R represents random
number which is uniformly
distributed on (0,1).
Step 3 : Solve the equation F(x) = R
i.e. X = F
1
(R)
Step 4 : Generate uniform random numbers R1, R2, … and compute the
desired random variates by
Xi = F
1
(Ri)
(a) Exponential distribution :
The exponential sdistribution has pdf
F(x) = ì eìx, x > 0
= 0 otherwise
the parameter ì can be interpreted as the mean number of occurances
per unit time. We with to generate values X1, X2,…which have an
exponential distribution.
100
Step 1 : F(x) = P (X s x) = 1  eìx, x > 0
Step 2 : set, 1 – eìx = R, x > 0
Step 3 : 1 – e
ìx
= R.
e
ìx
= 1R
ìx = log
e
(1R)
x =
ì
1
log
e
(1R)
Step 4 : Generate uniform random numbers R1, R2, … and compute the
desired random variates by Xi = F
–1
(Ri)
Here, Xi =
ì
1 ÷
log
e
(1Ri), i = 1,2,3,….
(b) Uniform distribution:
Consider a random variable X that is uniformly distributed on the
interval [a,b]. The pdf of X is given by
f(x) = 1/ba, a s x s b
= 0, otherwise
Step 1 : The cdf is given by
0, x < a
F (x) = x – a/ b – a , a s x s b
= 1, x > b
Step 2 : set F(x) = xa / ba = R.
101
Step 3 : Solving for X we get, x = a + (ba) R
( c ) Weibull distribution :
the weibull distribution may be used as a model for time to failure
machinics or electronic components. If v = 0, its pdf is given by
f (x) =



ì

) / ( 1 a x
e x
÷ ÷
, x > 0
= 0, otherwise
10. Data have been collected on service times at a driveinbank window at the Shady
Lane National Bark. This data are summarized into intervals as follows:
Interval
(Seconds)
Frequency
1530 10
3045 20
4560 25
6090 35
90120 30
120180 20
180300 10
Set up a table for generating service times by the tablelook up method and generate
five values of service time using fourdigit random numbers.
11. For a preliminary version of a simulation model, the number of pallets,
X to be loaded onto a truch at a loading dock was assumed to be
uniformly distributed (discrete) between 8 and 24. Devise a method
for generating X, assuming that the load of successive trucks are
independent. Generate load for 4 successive trucks by using four digit
random numbers.
12. The weekly demand, X for a slow moving item has been found to be
well approximated by a geometric distribution on the range { 0,1,2,…}
102
with mean weekly demand of 2.5 items. Generae 10 values of X,
demand per week, using random numbers from Table.
13. Suppose that the demand has been found to have a Poisson
distribution with mean 0.5 items per week. Generate 3 values of X,
Demand per week, using random numbers from table. Use four digit
random numbers.
14. Lead times have been found to be exponentially distributed with mean
3.7 days. Generate five random lead times from this distribution.
15. Develop a technique for generating a binomial random variable, X,
using the convolution technique.
16. The beta (4,3) distribution has pdf (X) = 60x
3
(1x)
2
, 0 s x s 1
= 0, otherwise
Generate two variate values from the above distribution using
acceptancerejection technique. Use three digit random numbers.
Random Digits
94737 08225 35614 24826 88319 05595 58701 57365 74759
87259 85982 13296 89326 74863 99986 68558 06391 50248
63856 14016 18527 11634 96903 52146 53496 51730 03500
66612 54714 46783 61934 30258 61674 07471 67566 31635
30712 58582 05704 23172 86689 94834 99057 55832 21012
69607 24145 43886 86477 05317 30445 33456 34029 09603
37792 27282 94107 41967 21425 04743 42822 28111 09757
01488 56680 73847 64930 11108 44834 45390 86043 23973
66248 97697 38244 50918 55441 51217 54786 04940 50807
51453 03462 61157 65366 61130 26204 15016 85665 97714
92168 82530 19271 86999 96499 12765 20926 25282 39119
36463 07331 54590 00546 03337 41583 46439 40173 46455
47097 78780 04210 87084 44484 75377 57753 41415 09890
80400 45972 44111 99708 45935 03694 81421 60170 58457
94554 13863 88239 91624 00022 40471 78462 96265 55360
31567 53597 08490 73544 72573 30961 12282 97033 13676
103
07821 24759 47266 21747 72496 77755 50391 59554 31177
09056 10709 69314 11449 40531 02917 95878 71587 60906
19922 37025 80731 26179 16039 01518 82697 73227 13160
29923 02570 80164 36108 73689 26342 35712 49137 13482
29602 29464 99219 20308 82109 03898 82072 85199 13103
94135 94661 87724 88187 62191 70607 63099 40494 49069
87926 34092 34334 55064 43152 01610 03126 47312 59578
85039 19212 59160 83537 54414 19856 90527 21756 64783
66070 38480 74636 45095 86576 79337 39578 40851 53503
78166 82521 79261 12570 10930 47564 77869 16480 43972
94672 07912 26153 10531 12715 63142 88937 94466 31388
56406 70023 27734 22254 27685 67518 63966 33203 70803
67726 57805 94264 77009 08682 18784 47554 59869 66320
07516 45979 76735 46509 17696 67177 92600 55572 17245
43070 22671 00152 81326 89428 16368 57659 79424 57604
36917 60370 80812 87225 02850 47118 23790 55043 75117
03919 82922 02312 31106 44335 05573 17470 25900 91080
46724 22558 64303 78804 05762 70650 56117 06707 90035
16108 61281 86823 20286 14025 24909 38391 12183 89393
74541 75808 89669 87680 72758 60851 55292 95663 88326
82919 31285 01850 72550 42980 57518 01169 01786 98145
31388 26809 77258 99360 92362 21979 41319 75739 98082
17190 75522 15687 07161 99745 48767 03121 20046 28013
00466 88068 68631 98745 97810 35886 14497 90230 69264
Direct transformation for the Normal & Log normal distributions
The standard normal cdf is given by
Ø (x) = ∫
x
∞ 1/ √2 Ï et2/2 dt,  ∞ < x < ∞
An initiatively appealing direct transformation that produces an
independent pair of standard normal varieties with mean zero & variance
1.
Transformation is required to transform standard normal
variety into a normal variety with mean x & variance 62.
104
Acceptance – Rejection technique
Suppose that an analyst needed to devise a method for generating
random variables X uniformly distributed between ¼ & 1.
The steps used are
a) Step 1 Generate a random no. R
Step 2 a) of R > ¼, accept X = R, then go to step 3.
b) Of R < ¼, reject R & return to step 1
Step 3 Of another uniform random variable on [1/4, 1] is needed repeat
the procedure beginning at step 1, or not stop.
Summary:
The basic principles of random variable generation using the inverse
transform technique, the convolution method & acceptance rejection
techniques have been introduced.
105
9
Input Modeling
To carry out a simulation using random inputs, we have to specify their
probability distributions e.g. in the simulation of a queucing system, typical input data are
the distribution of time between arrivals and service times. Given that random variables
follow particular distributions, the simulation proceeds through time by generating random
from these distributions.
Almost all realworld system contains one or more sources of randomness. However,
determining appropriate distributions for input data is a major task from the standpoint of
time and resource requirements. Faulty models of the inputs will lead to outputs whose
interpretation may give rise to misleading conclusions.
There are four in the development of a useful model of input data.
1. Collect data from real system of interest. This requires substantial time and
resources. In some situations it may not be possible to collect data. When data
are not available, expert opinion and knowledge of the process must be used to
make educated guesses.
2. Identify a probability distribution to represent the input process. Here, a
frequency distribution or histogram is developed. Based on the frequency
distribution and structural knowledge of the process, a family of distribution is
chosen.
3. Choose parameters that determine a specific instance of the distribution family.
When data are available, these parameters may be estimated from the data.
4. Evaluate the chosen distribution and the associated parameters for goodnessof
fit. It the chosen distribution is not a good approximation of the data, then the
analyst chosen a different family of distribution, and repeats the procedure. If
several iterations of this procedure fail to yield a fit between an assumed
distributional form and the collected data the empirical form of the distribution
may be used.
Data Collection:
106
Data collection is one of the biggest tasks in solying a real problem. It is one of the most
important and difficult problems in simulation. Even when data are available, they may
not be recorded in a form that is directly useful for simulation input modeling. Even if the
model structure is valid, if the input data are inaccurately collected, inappropriately
analysed or not representative of the environment, the simulation output data will be
misleading when used for policy making.
The following points may help in data collection:
1. Plan the data collection properly. Begin by a practice or preobserving session.
Try to collect data while preobserving. Devise forms for this purpose. It is very
likely that these forms will have to be modified several times before the actual
data collection begins. Watch for unusal circumstances and consider how they
will be handled.
2. Try to analyze the data as they are being collected. Determine if the data being
collected are adequate to provide the distributions needed as input to the
simulation. Determine if any data being collected are useless to the simulation.
There is no need to collect superfluous data.
3. Try to combine homogeneous data sets. Check data for homogeneity in
successive time periods and during the same time period on successive days.
4. Be aware of the possibility of data censoring, in which a quantity of interest is not
observed in its entirety. This problem most often occurs when the analyst is
interested in the time required to complete some process, but the process begins
prior to, or finishes after the completion of, the observation period.
5. To determine whether there is a relationship between two variables, build a
scatter diagram. Sometimes an eyeball scan of the scatter diagram will indicate if
there is a relationship between two variables of interest.
6. Consider the possibility that a sequence of observations which appear to be
independent may possess autocorrelation. Autocorrelation may exist in
successive time periods or for successive customers.
7. Keep in mind the difference between input data and output or performance data,
and be sure to collect input data. Input data typically represent the uncertain
quantities that are largely beyond the control of the system and will not be altered
by changes made to improve the system. Output data on the other hand
represent the performance of the system when subjected to the inputs,
performances that we may be trying to improve.
Identifying the Distribution with data:
107
There are several methods for selecting families of input distributions when data are
available. The specific distributions within a family are specified by estimating its
parameters.
(1) Histograms:
A frequency distributions or histogram is useful in identifying the shape of a distribution. A
histogram is constructed as follow:
1. Divide the range of the data into intervals (intervals are usually of equal width;
however, unequal widths may be used if the heights of the frequencies are adjusted)
2. Label the horizontal axis to conform to the intervals selected.
3. Determine the frequency of occurrences within each interval.
4. Label the vertical axis so that the total occurrences can be plotted for each interval.
5. Plot the frequencies on the vertical axis.
The number of class intervals depends on the number of observations and the
amount of scatter or dispersion in the data. Choosing the number of class intervals
approximately equal to the square root of the sample size often works well in practice. If
the intervals are too wide, the histogram will be coarse, or blocky, and its shape and
other details will not show well. If the intervals are too narrow, the histogram will be
ragged and will not smooth the data.
The histogram for continuous data corresponds to the probability density function of a
theoretical distribution, if continuous, a line through the center point of each class interval
frequency should result in a shape like that of a pdf.
(2) Selecting the family of distributions:
A family of distribution is selected on the basis of what arise in the context being
investigated along with the shape of the histogram.
Binomial: Models the number of successes in n trials, when the trials are independent
with common success probability, p.
Poisson: Models the number of independent events that occur in a fixed amount of time
or space.
Normal: Models the distribution of a process that can be thought of as the sum of a
number of component processes.
Exponential: Models the time between independent events, or a process time which is
memoryless.
Gamma: An extremely flexible distribution used model nonnegative random variables.
108
Beta: An extremely flexible distribution used to model bounded random variables.
Erlang: Models processes that can be viewed as the sum of several exponentially
distributed processes.
Weibull: Models the time to failure for components. The exponential is a special case of
the weibull.
Discrete or continuous Uniform: Models complete uncertainty; since all the outcomes
are equally likely.
Triangular: Model a process when only the minimum, mostlikely, and maximum values
of the distribution are known.
Empirical: Resamples from the actual data collected; often used when no theoretical
distribution seems appropriate.
Do not ignore physical characteristics of the process when selecting distributions. Is the
process naturally discrete or continuous valued? Is it bounded or is there no natural
bound? This knowledge, which does not depend on data, can help narrow the family of
distributions from which to choose.
Graded Questions
1. The following data are randomly generated from gamma distributions:
1.691 1.437 8.221 5.976
1.116 4.435 2.345 1.782
3.810 4.589 5.313 10.90
2.649 2.432 1.581 2.432
1.843 2.466 2.833 2.361
Determine the maximumlikelihood estimators B and A.
2. The highway between Atlanta, Georgia and Athens, Georgia, has a high
incidence of accidents along its 100 km. Public safety officers say that the
occurrence of accident along the highway is randomly (uniformly) distributed, but
the news media says otherwise. [N04] The Georgia department of Public Safety
published records for the month of September.
These records indicated the point at which 30 accidents occurred, as follows:
88.3 40.7 36.3 27.3 36.3
91.7 67.3 7.0 45.2 23.3
98.8 90.1 17.2 23.7 97.4
32.4 87.8 69.8 62.6 99.7
20.3 73.1 21.6 6.0 45.3
76.6 73.2 27.3 87.6 87.2
109
Use the Kolmogorov Smirnov test to determine whether the distribution is
uniformly distributed given D0.05, 30 = 0.24
3. Records pertaining to the monthly number of jobrelated injuries at an
underground coal mine were being studied by a federal agency. The values for
the past 100 months were as follows.
Injuries per Month Frequency of Occurrence
0 35
1 40
2 13
3 6
4 4
5 1
6 1
(a) Apply the chisquare test to these data to test the hypothesis that the underlying
distributions are Poisson. Use a level of significance of a = 0.05.
(b) Apply the chisquare test of these data to test the hypothesis that the distribution is
Poisson with mean 1.0. Again let a = 0.05.
4. The time required for 50 different employees to conpute and record the number of
hours worked during the week was measured with the following results in minutes.
Employee Time (Minutes) Employee Time (Minutes)
1 1.88 26 0.04
2 0.54 27 1.49
3 1.90 28 0.66
4 0.15 29 2.03
5 0.02 30 1.00
6 2.81 31 0.39
7 1.50 32 0.34
8 0.53 33 0.01
9 2.62 34 0.10
10 2.67 35 1.10
11 3.53 36 0.24
12 0.53 37 0.26
13 1.80 38 0.45
14 0.79 39 0.17
110
15 0.21 40 4.29
16 0.80 41 0.80
17 0.26 42 5.50
18 0.63 43 4.91
19 0.36 44 0.35
20 2.03 45 0.36
21 1.42 46 0.90
22 1.28 47 1.03
23 0.82 48 1.73
24 2.16 49 0.38
25 0.05 50 0.48
Use the chisquare test to test the hypothesis that these service times are exponentially
distributed. Let the number of class intervals be k = 6. Use a level of significance of a =
0.05.
5. 200 electric High bulbs were tested and the average lifetime of the bulbs was found to
be 25 hrs. Using the summary given below, test the hypothesis that the lifetime is
exponentially.
Lifetime in hrs: 020 2040 4060 6080 80
No. of bulbs : 104 56 24 12 4
6. Explain time series input models with suitable examples. [N04]
7. The following data were available for the past 10 years on demand and leadtime.
[N04]
Lead time: 6.5 4.3 6.9 6.9 6.9 6.9 5.8 7.3 4.5 6.3
Demand: 103 83 116 97 112 104 106 109 92 96
Estimate correlation and covariance.
8. Discuss the steps involved in the development of a model of input data. [M05]
Parameter Estimation: 
1) Sample Mean & Sample variance
In a number of instances the sample mean or the sample variance are used to estimates
the parameters of a hypothesized distribution.
The data are discrete & have been grouped in a frequency distribution.
Of the observations in a sample of size n are X1, X2….Xn the sample mean (X)
111
By
n
Xi
X
n
i
¯
÷
=
1
& the sample variance S
2
is defined by
1
1
2
2
2
÷
÷
=
¯
÷
n
X n X
S
n
i
i
And if the data are direct & grouped in a frequency distribution then sample mean can be
computed by
n
fiXj
X
k
j
¯
÷
=
1
& sample variance by
1
1
2
2
÷
÷
=
¯
=
n
X n fiXj
S
k
j
Where k is the no. of distinct values of X &
fi is the observed frequency of the value Xj of X?
11. Suggested Estimators for distributions often used in simulation
Distribution Parameter Suggested Estimator
Poisson o x =
.
o
Exponential ì X 1 = ì
Gamma u , X 1 =
.
u
Normal
2
,o u x =
.
u
2
S =
.
o
112
Lognormal
2
,o u x =
.
u
2
S =
.
o
Weibull  o, S X =
.
0

Taking 0 = ¸
Goodness of Fit Tests
For the goodness of fit tests, kolmogorov& mirnov test and the chisquare test
were introduced these two tests are applied in this section to hypotheses about
distributional forms of input data.
(i) Chi square test 
One procedure for testing the hypotheses that a random sample of size n of the random
variable X follows a specific distributional form is the chi square goodness of fit test.
The test is valid for large sample sizes for both discrete & continuous distributional
assumptions.
The test statistic is given by
¯
=
÷
=
K
i
Ei
Ei Oi
X
1
2
2
0
) (
Oi is observed frequency in the ith class Ei is the expected frequency in the class interval.
Ei = npi
Pi is the theoretical hypothesized probability associated with the ith class interval.
(ii) KolmogorovSmirnov Goodness of fit test –
The chi square goodness of fit test cans a common date the estimation of parameters
from the data with resulted decreases in the degree of random.
The ks test is particularly useful when sample sizes are small and when no parameters
have been estimated from the data.
Ks test is also applicable to the explain distribution.
Covariance & Correlation
Let X1 & X2 be two random variables, & let
113
) var( & ) (
2
Xi Xi E i
i
= =
o
u be the mean & variance of Xi respectively.
The covariance and correlation are measures of the linear dependence between X1 &
X2.
) ( ) (
2
2
1
1
u u
 ÷ = ÷
x
X + E
Where E is a random variable with mean O that is independent of X2.
.
) ( ) (
2
2
1
1
u u
 ÷ = ÷
x
X
Then the model is perfect.
And if
1
X &
2
X are independent then B=0.
The covariance between X1 & X2 is defined to be
C or (
1
X ,
2
X ) = E )] )( [(
2
2
1
1
u u
÷ ÷
x
X
= E
2 1 2 1
) ( u u ÷ X X
A value of cove ) (
2 1
X X = 0 implies B=0 then our model is dependent
The covariance can take any value between. X and x. The correlation standardizes the
covariance to bet between 1 & 1
2 1
2 1
2 1
) cov(
) (
o o
X X
X X corr P = =
Summary –
Input data collection and analysis require major time and resources commitments in a
discrete event simulation project.
In this chapter, four steps in the development of models of input data is discussed
1) Collecting the raw data
2) Identifying the underlying statistical distribution.
3) Estimating the parameters.
4) Testing for goodness of fit.
114
10
Verification and Validation of Simulation Model
One the most difficult problems facing a simulation analyst is that of trying to determine
whether a simulation model is an accurate representation of the actual being studied, i.e.
whether the model is valid.
Verification is concerned with determining whether the conceptual simulation model
(model assumptions) has been correctly translated into a computer program.
Validation is the process of determining whether a simulation model is an accurate
representation of the system, for the particular objectives of the study.
Model Building, Verification and Validation
The first step in model building consists of observing the real system and the interactions
among its various components and collecting data. Observation alone rarely gives
sufficient understanding of system behavior. Persons familiar with the system should be
interviewed to get information about the system. Model building is a continuous process.
The second step in model building is the construction of a conceptual model. This
includes assumptions on the components and the structure of the system and the values
of input parameters.
The third step is the translation of the operational model into a computer recognizable
form that is a computerized model.
The model builder will repeat these three steps many times, till an acceptable model is
achieved.
Verification of Simulation Model
The purpose of model verification is to assure that the conceptual model is reflected
accurately in the computerized representation.
115
Some observations to help the process of verification:
1. Get the computer representation checked by an independent and knowledgeable
person.
2. Make a detailed flow diagram.
3. Closely examine the model output for reasonableness under a variety of setting
of the input parameters. Computer model should print a variety of output
statistics along with input parameters.
4. Prepare a detailed documentation. Give precise definition of every variable used.
5. An interactive run controller (IRC) or debugger is an important for simulation
model building. One of the most powerful techniques to debug a discreteevent
simulation is a trace in a trace; the contents of the event list, the state variables,
certain statistical counters etc. are displayed just after each event occurs. These
values value are compared with hand calculations to see if the program is
operating as intended.
Calibration and Validation of Models
Validation is the overall process of comparing the model and its behavior to the real
system and its behavior. Calibration is the iterative process of comparing the model to the
real system. Making adjustment or changes to the model, comparing the revised model to
reality and so on.
The comparison of the model to reality is carried out by subjective and objective tests. A
subjective test involves talking to people, who are knowledgeable about the system,
making models and forming the judgment. Objective tests involve one or more statistical
tests to compare some model output with the assumptions in the model.
Naylor and Finger formulated a three step approach to the validation process.
1. Build a model that has high face validity.
2. Validate model assumptions.
3. Compare the model inputoutput transformations to corresponding inputoutput
transformations for the real system.
Face Validity
116
The first goal of the simulations modeler is to construct a model that appears reasonable
on its face to model users are others who are knowledgeable about the real system being
simulated. The potential users of a model should be involved in model construction from
its conceptualization to its implementation to ensure that a high degree of realism in built
into the model through reasonable assumptions regarding system structure, and reliable
data. Potential users and knowledgeable persons can also evaluate model output for
reasonableness and can aid in identifying model deficiencies. Thus the users can be
involved in the calibration process as the model is iteratively improved, based on the
insights gained from the initial model deficiencies. Another advantage of user
involvement is the increase in the model’s perceived validity, or credibility, without which
a manager would not be willing to trust simulation results as a basis for decision making.
Sensitivity analysis can also be used to check a model’s face validity. The model user is
asked if the model behaves in the expected way when one or more input variables are
changed.
Validation of Model Assumptions
Model assumptions fall into two general classes. Structural assumptions and data
assumptions. Structural assumptions involve questions of how the system operates and
usually involve simplifications and obstructions of reality.
Data assumptions should be based on the collection of reliable data and correct
statistical analysis of the data.
When combining two or more data sets collected at different times, data reliability can be
further enhanced by objective statistical tests for homogeneity of data.
Additional tests may be required to test for correlation in the data. As soon as the analyst
is assured of dealing with a random sample (i.e. correction is not present), the statistical
analysis can begin.
The procedures for analyzing input data from a random sample were discussed in detail
in chapter 9. Whether by hand, or using computer software for the purpose, the analysis
consists of three steps.
1. Identifying the appropriate probability distribution.
2. Estimating the parameters of the hypothesized distribution.
3. Validating the assumed statistical model by a goodnessffit test, such as the chi
square or KolmogorovSmirnov test, and by graphical methods.
The use of goodnessoffit tests is an important part of the validation of the model
assumptions.
117
Validating InputOutput Transformations
The ultimate, test of a model, and in fact the only objective test of the model as a whole,
is its ability to predict the future behavior of the real system when the model input data
match the real inputs and when a policy implemented in the model is implemented at
some point in the system. Furthermore, if the level of some input variables (e.g. the
arrival rate of customers to a service facility) were to increase of decrease, the model
should accurately) predict what would happen in the real system under similar
circumstances. In other words, the structure of the model should be accurate enough for
the model to make good predictions, not just for one input data set, but for the range of
input data sets which are of interest.
In this phase of the validation process, the model is viewed as an inputoutput
transformation. That is the model accepts values of the input parameters and transforms
these inputs into output measures of performances. It is this correspondence that is being
validated. Instead of validating the model inputoutput transformations by predicting the
future, the modeler may use past historical data which have been reserved for validation
purposes only; that is, if one data set has been used to develop and calibrate the model,
it is recommended that a separate data set be used as the final validation test. Thus,
accurate “prediction of the past” may replace prediction of the future for the purpose of
validating the model.
A necessary condition for the validation of inputoutput transformation is that some
version of the system under study exists, so that system data under at least one set of
input conditions can be collected to compare to model predictions. If the system is in the
planning stages and no system operating data can be collected complete inputoutput is
not possible.
InputOutput Validation Using Historical Input Data
An alternative to generating input data is to use the actual historical record, {An, Sin, n=1,
2….} to drive the simulation model and then to compare model output to system data.
When using this technique the modeler hopes that the simulation will duplicate as closely
as possible the important events that occurred in the real system.
To conduct a validation test using historical input data, it is important that all the input
data (An, Sn,) and all the system response data, such as average delay (Z2), be
collected during the same time period. Otherwise, the comparison of model responses to
system responses, such as the comparison of average delay in the model (Y2) to that in
the system (Z2), could be misleading. The responses (Y2 and Z2) depend on the inputs
(An and Sn) as well as on the structure of the system, or model. Implementation of this
technique could be difficult for a large system because of the need for simultaneous data
collection of all input variables and those response variables of primary interest. In some
118
systems, electronic counters and devices are used to ease the datacollection task by
automatically recording certain types of data.
InputOutput Validation Using a Turing Test
In addition to statistical tests, or when no statistical test is readily applicable persons
knowledgeable about system behavior can be used to compare model output to system
output. For example, suppose that five reports of system performances over five different
days are prepared, and simulations output data are used produce five additional reports.
The 10 reports should all be in exactly the same format and should contain information of
the randomly shuffled and given to the engineer, who is asked to decide which reports,
the model builder questions the engineer and uses the information gained to improve the
model. If the engineer cannot distinguish between fake and real reports with any
consistency, the modeler will conclude that this test provides no evidence of model
inadequacy. This type of validation test is called a Turing Test.
Graded Questions
1. A simulations model of a job shop was developed to investigate different
scheduling rules. To validate the model, the currently used scheduling rule was
incorporated into the model and the resulting output compared to observed
system behavior. By searching the previous year’s computerized records it was
estimated that the average number of jobs in the shop was 22.5 on a given day.
Seven independent replications of the model were run each pf 30 days duration,
with the following results for average number of jobs in the shop.
18.9 22.0 19.4 22.1 19.8 21.9 20.2
Develop and conduct a statistical test to determine if model output is consistent with
system behavior. User a level of significance of a=0.05.
2. System data for the job of exercise 1 revealed that the average time spent by a
job in the shop was approximately 4 working days. The model made the following
predictions on seven independent replications, for average time spent in the
shop.
3.70 4.21 4.35 4.13 3.83 4.32 4.05
Is model output consistent with system behavior? Conduct a statistical test using a level
of significance a=0.01. If it is important to detect a difference of 0.5 day, what sample size
is needed?
3. For the job of exercise 1, four sets of input data were collected over four different
10 day periods, together with the average number of jobs in the shop (Zi) for
each period. The input data were used to drive the simulation model for four runs
119
of 10 days each and model predictions of average number of jobs in the shop
(Yi) were collected, with these results:
Conduct a statistical test to check the consistency of system output and model output.
Use a level of significance of a = 0.05.
4. Explain in detail the 3step approach of Naylor and finger in the validation
process.
5. How would you validate simulation models?
Percentage Points for the Students Distribution with V Degrees of Freedom
I 1 2 3 4
Zi 21.7 19.2 22.8 19.4
Yi 24.6 21.1 19.7 24.9
o
lo 0
120
V t0.005 t0.01 t0.025 t0.05 t0.10
121
1 63.66 31.82 12.71 6.31 3.08
2 9.92 6.92 4.30 2.92 1.89
3 5.84 4.54 3.18 2.35 1.64
4 4.60 3.75 2.78 2.13 1.53
5 4.03 3.36 2.57 2.02 1.48
6 3.71 3.14 2.45 1.94 1.44
7 3.50 3.00 2.36 1.90 1.42
8 3.36 2.90 2.31 1.86 1.40
9 3.25 2.82 2.26 1.83 1.38
10 3.17 2.76 2.23 1.81 1.37
11 3.11 2.72 2.20 1.80 1.36
12 3.06 2.68 2.18 1.78 1.36
13 3.01 2.65 2.16 1.77 1.35
14 2.98 2.62 2.14 1.76 1.34
15 2.95 2.60 2.13 1.75 1.34
16 2.92 2.58 2.12 1.75 1.34
17 2.90 2.57 2.11 1.74 1.33
18 2.88 2.55 2.10 1.73 1.33
19 2.86 2.54 2.09 1.73 1.33
20 2.84 2.53 2.09 1.72 1.32
21 2.83 2.52 2.08 1.72 1.32
22 2.82 2.51 2.07 1.72 1.32
23 2.81 2.50 2.07 1.71 1.32
24 2.80 2.49 2.06 1.71 1.32
25 2.79 2.48 2.06 1.71 1.31
26 2.78 2.48 2.06 1.71 1.32
27 2.77 2.47 2.05 1.70 1.31
28 2.76 2.47 2.05 1.70 1.31
29 2.76 2.46 2.04 1.70 1.31
30 2.75 2.46 2.04 1.70 1.31
40 2.70 2.42 2.02 1.68 1.30
60 2.66 2.39 2.00 1.67 1.30
120 2.62 2.36 1.98 1.66 1.29
00 2.58 2.33 1.96 1.645 1.28
Summary –
122
Validation of simulation models is great importance. Decisions are made on the basis of
simulations results thus the accuracy of these results should be subject to question and
investigation.
The same possible validation technique
1. Develop models with high face validity by consulting persons knowledgeable
about system behavior on model structure, model input and model output.
2. Conduct simple statistical tests of input data
3. Conduct a trying tests
4. Compare model o/p to system o/p by means of statistical tests.
123
11
Output Analysis for a Single Model
Output analysis is the examination of data generated by a simulation. Its purpose is to
predict the performance of a system or to compare the performance of two or more
system designs. Usually random number generators are used to produce the values of
the input variables. Therefore, the output data from simulations exhibits random
variability. That is, two different streams of random numbers will produce two sets of
output data which will differ.
If the performance of the system is measured by O, the result of a set of simulations
experiments will be an estimator O of O. The precision of the estimator O can be
measured by the variance or standard error or O. The purpose of the statistical analysis
is to estimate is variance or to determine the number of observations required to achieve
a desired precision.
A typical output variable, Y, should be treated as a random variable with an unknown
distribution. Let Y
1
, Y
2
, Yn be an output from a single simulation run e.g. Yi may be
production in the Itch hour, inventory cost of Itch week etc. The Yi’s are random variables
that will, in general, be neither independent nor identically distributed. Thus, the
sequence of random variables Y
1
, Y
2
….Yn may be auto correlated. Auto correlation is a
measure of a lack of statistical independence. This means that the classical methods
(tests) of statistics which assume independence will have to be properly modified.
The specification of initial condition may influence the output data. That is the initial
conditions may influence the values Y
1
, Y
2
……..Yn.
For the purpose of statistical analysis, the effect of the initial conditions is that the output
observations may not be identically distributed, and the initial observations may not be
representative of steady state behavior of the system. An incorrect choice of initial
condition may lead to an improper estimate of the steady performance of the simulations
model.
Types of Simulation with respect to output Analysis
Simulations may be either terminating or none terminating, depending on whether there
is an obvious way for determining run length.
124
A terminating simulation is one that runs for some duration of time. Te, where E is
specified event or set or events which stops the simulations. Such a simulations system
“Opens” at time zero under specified initial conditions and “Closes” at the stopping time
Te, since the initial conditions for a terminating simulation generally affect the desired
measures of performance. These conditions should be representative of those for the
actual system, e.g. simulations of a Bank from 9.00 a.m. (time 0) to 3.00 p.m. (time
Te=360 minutes)
A non terminating simulations is one for which there is no natural event E to specify the
length of a run. E.g. continuous production systems, telephone systems, internet, OPD of
a Hospital, designing a new system.
A Simulation of non terminating system starts at simulation time zero under initial
conditions defined by the analyst and runs for some analystspecified period of time Te.
The analyst wants to study steadstate or longrun properties of the systemthat is,
properties which are not influenced by the initial conditions of the model at time zero. A
steady state simulation is a simulation whose objective is to study longrun, or steady
state, behavior or a non terminating system.
Whether, a simulation is considered to be terminating or not depending on the objective
of the simulation and the nature of the system.
Stochastic Nature of Output data
Consider one run of a simulation model over a period of time. [è, T]. Since some of the
model inputs are random variables, the model output variables are also random
variables. This indicates stochastic (Probabilistic) nature of output variables.
Measures of performance and their Estimation
Consider the estimation of a performance parameter è (or è), of a simulated system. Let
Y
1
, Y
2
……..Yn be the output data which is called discretetime data. Suppose discrete
time data are used to estimate è. Let {Y(t), è < Te} be the output data which is called
continuoustime data continuoustime are used to estimate è. e.g. Yi may be total time
spent in system by customer i. Y (t) may be the number of customers in the system at
time t.
0 is an arithmetic mean and o is called timeweighted mean.
Point Estimation
The point estimator of O based on Y
1
, Y
2
……..Yn is defined by
¯
=
.
n
m
i
Y
n
1
u
125
The point estimator __ is said to be unbiased for __ if E(_) = __. E(_)  __ is called the
bias in __.
The point estimator o is given by
í
=
.
1
0
) (
T
E
dt t Y
T
i
u
Interval estimation
Let
.
u be a point estimator based on Y
1
, Y
2
, …..Y
n
. Let ó
2
(
.
u ) = v(
.
u ). Let ó
2
(
.
u ) be an
estimator of ó
2
(
.
u ).
If ó
2
(
.
u ) is approximately unbiased, then the statistic
.
.
.
÷
=
) (u o
u u
t is approximately t
distributed with degrees of freedom f(say). An approximate 100(1 o)% confidence
interval for u is given by r t r t
a a
, ), ( . ,
2 2
. . .
± u o u is such that 2 ] , [
2
o = > r t t P
a
.
Output Analysis for Terminating Simulations
The Simulation is repeated R times, each run using a different randomnumber stream
and independently chosen initial conditions.
Let Yn be the n
th
observation with replication r, for I =1, I =2, …. Nr, and r = 1, 2, …. R.
The sample mean for replication r is given by . ,.... 2 , 1 ,
1
1
R r Y
n
n
m
ri
r
r = =
¯
.
u
The R sample means R
. .
u u ,....... 1 are statistically independent and identically distributed
and are unbiased simulators of u .
126
Confidence – Interval estimation for a fixed number of replications.
Suppose that R independent replications are made.
The overall point estimate,
.
u is given by,
¯
=
. .
=
R
r
r r
R
1
1
u u
and
2
1
2
) (
) 1 (
1
) (
¯
=
. . . .
÷
÷
=
R
r
r
r
R R
u u u o
A 100 (1) % confidence interval is calculated with f = R1.
When the output data are of the form ** independent replication, we have,
... ,......, 1 , ) (
1
0
R r dt t Y
T
E
T
r
E
r
= =
í
.
o
¯
=
. .
=
R
r
r r
R
1
1
o o
and
2
1
2
) (
) 1 (
1
) (
¯
=
. . . .
÷
÷
=
R
r
r r
R R
o o o o
A 100(1o) ° confidence interval is obtained with f = R1.
Graded Questions
1. Explain point estimation and interval estimation of è (or è).
2. Discuss the output analysis for terminating simulations and confidence interval
estimation for a fixed number of replications.
3. Discuss output analysis for steady state simulations.
Output Analysis for steady state simulations
The steady state measure of performance to be estimated is defined by
127
¯
=
· ÷
=
n
i
Yi
n n
1
1 u
u
With probability 1, where the value of è is independent of the initial conditions.
1. First the initialization bias in steady state simulation is required.
The first method is to initialize the simulation in a state that is more
representative of long seen conditions this method is sometimes called intelligent
initialization.
2. Statistical Background is required.
¯¯
= =
. . .
= =
n
l
j
n
j
i
Y Y con
n
1 1
2
2
) , (
1
) var( ) ( u o o
where ) var( ) , (
2
i j i
Y Y Y con =
.
3. Replications method for steady state simulations for replication r, define
¯
+ =
÷
=
n
d j
rj r
Y
d n
d n Y
1
,
1
) , (
) , ( )....., , (
, , 1
d n Y d n Y
R
)] , ( [
,
d n Y E
r d n
= u
The overall point estimator is given by
¯
=
=
R
r
r r
d n Y
R
d n Y
1
,
) , (
1
) , (
Sample variance
2
1
2
.....) (
1
1
¯
=
÷
÷
=
R
r
r
Y Y
R
S
128
....) (
1
1
1
2 2
¯
=
÷
÷
=
R
r
r Y R Y
R
The standard error is given by
R
S
Y e s = ..) .( .
4. Sample size in steady state simulations suppose it is desired to estimate a long
run performance measures è within I.E with confidence 100 (1<) %
5. Batch means for internal Estimation in steady state simulation
¯
+ ÷ =
+
=
jm
m j i
d i j
Y
m
Y
1 ) 1 (
1
Sample mean
) 1 ( 1
) (
1
1
2 2
1
2
2
÷
÷
=
÷
÷
= =
¯
¯
=
=
K K
Y K Y
K
Y Y
K K
S
K
j
j
K
j
j
6. Confidence intervals for Quantizes
R quantile estimates Q1….QR are independent & identically distributed. Their average
¯
=
. .
=
R
i
i
R
1
1
u u
Confidence Interval
R
S
R t 1 , 2 ÷ ±
.
o u
When S2 is the usual sample variance of R
. .
u u ........ 1
Summary:
129
This chapter emphasized the idea that a stochastic disccrete event simulation is a
statistical experiment.
The statistical precision of point estimators can be measured by a standard error
estimate or a confidence interval.
The main point is hat simulation o/p data contain some amount of random variability &
without some assessment of its magnitude; the pf estimate cannot be used with any
degree of reliability.
12
Comparison and Evaluation of Alternative System Design
One of he most important uses of simulation is the comparison of alternative system
designs. Since the observations of the response variables contain random variation,
statistical analysis is needed to determine whether any observed differences are due to
differences in design or merely to the random fluctuation inherent in the models.
Comparison of Two System Designs
Suppose that a simulation analyst desires to compare two possible configurations of a
system. In measure for system I will be denoted by èi (I = 1, 2). If it is a steady state
simulation, it will be assumed that deletion of data, or other appropriate techniques, have
been used to assure that the point estimators are approximately unbiased estimators of
the mean performance measures èi. The goal of the simulation experiment is to obtain
point and interval estimates of the difference in mean performance, namely O1O2.
When comparing two systems, the simulation analyst must decide on a run length T (i) E
for each model (i=1, 2) and a number of replication RI to be made of each model. From
replication r of system I, the simulation analyst obtains an estimate Yn of the mean
130
performance measure, èi. Assuming that the estimators Yri are (at least approximately)
unbiased, it follows that
; ,...... 1 ), (
1 1 1
R r Y E
r
= = u ; ,...... 1 ), (
2 2 2
R r Y E
r
= = u
A twosided 100 (1o)% c.i. for
2 1
u u ÷ will always be of the form
) ( , 2 ) (
2 , 1
. .
2 , 1
Y Y v a t Y Y
e s
÷ ± ÷
Where
1
Y is the sample mean performance measure for system I over all replications.
¯
=
=
1
1
1
1
R
r
ri
i
i
Y
R
Y
And v is the degrees of freedom associated with the variance estimator t o/2, v is the 100
(1o/2) percentage point of a tdistribution with v degrees of freedom, and S.E. (.)
represents the standard error of the specified point estimator.
If the confidence interval for u1u2 is totally to the left (right) of zero then we may
conclude that
ui < u
2
(u
1
>u
2
).
If the confidence interval for u
1
 u
contains zero there is no statistical evidence that one
system design is better than the other.
Independent Sampling with Equal Variances
Independent sampling means that different and independent randomnumber streams will
be used to simulate the two systems. This implies that all the observations of simulated
system 1, namely {Yri, r=1, R1}, are statistically independent of all the observations of
simulated system 2, namely {Yr
2
, r=1…... R
2
}. The independence of the replications, the
variance of the sample means Yi is given by
i
i
i
ri
i
R R
Y
Y
o
2
) var(
) var( = = i=1,2
When using independent sampling Y1 and Y2 are statistically independent; hence,
131
) var( ) var( ) var(
2 1 2
Y Y Y Y
i
+ = ÷
2
2
2
1
2
1
R R
o o
+ =
In some cases it is reasonable to assume that the two variances are equal (but unknown
in value) that is
2
1
o =
2
2
o
In a steady state simulation, the variance
2
1
o decreases as the run length
) 1 (
E
T
increases; therefore, it may be possible to adjust the two run length
) 1 (
E
T and
) 2 (
E
T , to
achieve at least approximate equality of
2
1
o and
2
2
o ..
If it is reasonable to assume a1 2 = a 2 2 (approximately), a two sample t confidence
interval approach can be used. The point estimate of the mean performances difference
is
2
u u ÷
i
=
2
Y Y
i
÷
The sample variance for system i is given by

.

\

÷
÷
= ÷
÷
=
¯ ¯
= =
2
1
1
2
1
2
1
1
) (
1
1
1
i i
R
r
ri
i
R
r
i ri
i
i
Y R Y
R
Y Y
R
S
Since by assumption
2 2
2
2
1
o o o = = (say), a pooled estimate of
2
o is obtained by
2
) 1 ( ) 1 (
2 1
2
2 2
2
1 1
2
÷ +
÷ + ÷
=
R R
S R S R
S
p
which has 2
2 1
÷ + = R R v degrees of freedom.
s.e.
2 1
2
1 1
) (
R R
S Y Y
p i
+ = ÷
Correlated Sampling or Common Random Numbers
Correlated sampling means that, for each replication, the same random numbers are
used to simulate both systems. Therefore, R1 and R2 must be equal, say R R R = =
2 1
.
Thus for each replication r, the two estimates Yr1 and Yr2 are no longer independent but
rather are correlated.
132
To compute a 100 (1 o ) % c.i.; with correlated data.
Let,
2 1 r r r
Y Y D ÷ = and
¯
=
=
1
1
1
R
r
r
D
R
D
The sample variance of the differences {Dr} is computed by
¯
=
÷
÷
=
1
1
2 2
) (
1
1
R
r
r D
D D
R
S =


.

\

÷
÷
¯
=
R
r
r
D R D
R
1
2
2
1
1
Which has degrees of freedom v = R – 1
Let s.e. ) (D = s.e.
R
S
Y Y
D
i
= ÷ ) (
2
Comparison of Several System Designs
Suppose that a simulation analyst desires to compare K alternative system designs. The
comparison will be made on the basis of some specified performance measure, Oi of
system i for i = 1, 2, K. Many different statistical procedures have been developed which
can be used to analyze simulation data and draw statistically sound inferences
concerning the parameters Oil. These procedures can be classified as being fixed
sample size procedures, or sequential sampling (or multistage) procedures. In the first
type, a predetermined sample size is used to draw inferences via hypothesis tests or
confidence intervals.
A sequential sampling scheme is one in which more and more data are collected until an
estimator with a prespecified precision is achieved, or until one of several alternative
hypothesis is selected, with the probability of correct selection being larger than a
prespecified value. A two stage 9or multistage) procedure is one in which an initial
sample is used to estimate HW many additional observations are needed to draw
conclusions with a specified precision.
Bonferroni Approach to Multiple Comparisons
Suppose that a total C confidence intervals are computed, and that the ith interval has
confidence coefficient 1 a. Let Si be the statement that the ith confidence interval
contains the parameter (or difference of two parameters) being estimated. This statement
may be true or false for a given set of data, but the procedure leading to the interval is
designed so that statement Si will be true with probability 1 ai. When it is desired to
make statements about several true simultaneously. The Bonferroni inequality states that
133
P (all statements Si are true, I=1, ……, C)
E
C
j
j
o o ÷ = ÷ >
¯
=
1 1
1
Where
¯
=
=
C
j
j E
1
o o is called the overall error probability.
P (one or more statements Si is false I = 1,……… C) <
E
o or equivalently
P (one or more of the confidence intervals does not contain the parameter being
estimated) <
E
o .
Thus
E
o provides an upper bound on the probability of a false conclusion. When
conducting an experiment making C comparisons, first select the overall error probability,
say
E
o = 0.05 or 0.10. The individual aj may be chosen to be equal (
j
o =
E
o /C) or
unequal, as desired. The smaller the value of aj, the wider Jth confidence interval will be.
Metamodeling
Suppose that there is a simulation output response variable, Y that is related to k
independent variables, say
k
x x x ,....... ,
2 1
. The dependent variable, Y, is a random
variable, while the independent variables
k
x x x ,....... ,
2 1
. Are called design variables and
are usually subject to control. The true relationship between the variables Y and x is
represented by the simulation model. Our goal is to approximate this relationship by a
simpler mathematical function relationship between Y and
k
x x x ,....... ,
2 1
.say
Y = f (
k
x x x ,....... ,
2 1
). However, in most cases, the functional relationship is unknown,
and the analyst must select an appropriate function containing unknown parameters from
a set of data (Y, x). Regression analysis is one method for estimating the parameters.
Optimization via Simulation
Optimization is a key tool used by operations researchers and management scientists,
and there are well developed algorithms for many classes of problems.
In stochastic, discreteevent simulations, the result of any simulation run is a random
variable for notation, let
m
x x x ,....... ,
2 1
.be the m controllable design variable, and let Y
(
m
x x x ,....... ,
2 1
) be the observed simulation output performance on one run.
134
What does it mean to optimize Y (
m
x x x ,....... ,
2 1
) with respect to
m
x x x ,....... ,
2 1
? Since
Y is a random variable, we cannot optimize the actual value of Y. The most common
definition of optimization is
Maximize or minimize E (Y(
m
x x x ,....... ,
2 1
))
In other words, the mathematical expectation, or long run average, of performance is
maximized or minimized. This is the default definition of optimization used in all
commercial packages.
Summary:
A basic introduction to the comparative evaluation of alternative system designs based
on data collected from simulation runs.
An introduction to metamodels & optimization via simulation was also provided.
Examples:
1. Experimental design models.
2. Output analysis methods.
3. Variance reduction techniques.
13
135
Simulation of Manufacturing & Material Handling Systems
1. Manufacturing & material handling simulations
(i) Prepare the models of manufacturing systems.
Examples.
a) Physical Layout
b) Labor
c) Equipment
d) Maintenance
e) Workers
f) Product
g) Production control
h) Storage
i) Packing & Shipping
1. Models of Material Handling
Models of material handling system may have to contain some of the following types of
subsystems.
j) Conveyers
ii) Transporters
iii) Storage Systems
2. Some common Material Handling Equipments
There are numerous types of material handling devices common to manufacturing,
warehousing & distribution operations.
Case studies of the Simulation of Manufacturing and material handling systems.
136
An abstract of some of the papers from the 1994 winter simulation conference process
during will provide some insight into the types of problems that can be addresses by
simulation.
(1) Session: Simulation water Manufacturing
Paper: Modeling & simulation of material handling for semiconductor water
manufacturing.
(2) Session: Simulation in Aerospace manufacturing.
Paper: Modeling Aircraft assembly operations
(3) Session: Control of Manufacturing systems
Paper: Discrete event simulation for shop floor control.
(4) Session: Flexible Manufacturing
Paper: Developing & Analyzing Flexible cell systems using simulation.
Summary:
This chapter introduced some of the ideas & concepts most relevant to manufacturing &
material handling simulation.
The advantages of trace driven simulations with respect to some of the inputs &
the need in some models for accurate modeling of material handling equipment & the
control system.
Case Studies:
Do the case studies of the simulation of manufacturing & material handling systems.
University Exam. Papers – November 2004
Computer Simulation & Modeling
N.B. (1) Question No.1 compulsory.
(2) Attempt any four questions out of remaining six questions.
137
3. (a) What is system modeling? Give an example and explain the different types of
models.
(b) Define simulation. When is simulation appropriate and when it is not?
4. (a) State the various test for random numbers and explain briefly any two of
them.
(b) What are the characteristics of queuing system and how would you determine
the costs in queuing problems.
3. (a) Name and explain some of the useful statistical models for queuing systems.
(b) The highway between Atlanta, Georgia and Athens, Georgia, has a high incidence of
accident along its 100 km. Public safety officers say that the occurrence of accident along
the highway is randomly (uniformly) distributed, but the news media says otherwise.
The Georgia department of Public Safety published records for the month of September.
These records indicated the point at which 30 accidents occurred, as follows:
88.3 40.7 36.3 27.3 36.3
91.7 67.3 7.0 45.2 23.3
98.8 90.1 17.2 23.7 97.4
32.4 87.8 69.8 62.6 99.7
20.3 73.1 21.6 6.0 45.3
76.6 73.2 27.3 87.6 87.2
Use the Kolmogorov – Smirnov test to determine whether the distribution is uniformly
distributed given D0.25, 30=0.24
4. (a) Explain time series input models with suitable examples.
(b) The following data were available for the past 10 years on demand and lead time.
Lead time: 6.5 4.3 6.9 6.9 6.9 6.9 5.8 7.3 4.5 6.3
Demand: 103 83 116 97 112 104 106 109 92 96
Estimate correlation and covariance.
5. (a) Explain in detail the 3step approach of Naylor and finger in the validation process.
138
(b) Mention some important points which you would consider in selecting simulation
software.
Write a program for single server queue using any one of the simulation language you
know.
6. (a) Explain point estimation and interval estimation of O (or o).
(b) Discuss the output analysis for terminating simulations and confidence interval
estimation for a fixed number of replications.
7. What are the objectives of simulation in a manufacturing system? Give the block
diagram and explain the sequence of operation in a manufacturing system. Suggest a
suitable simulation language for the same.
2 endogenous is used to describe activities and events occurring within a system and the term endogenous is used to describe activities and events occurring within a system and the term exogenous is used to describe activities and events in the environment that affect the system. In the bank study, the arrival of a customer is an endogenous event, and the completion of service of a customer is an endogenous event. Discrete and Continuous Systems System can be categorized as discrete or continuous. A discrete system is one in which the state variable(s) change only at a discrete set of points in time. The bank is an example of a discrete system, since the state variable, the number of customers in the bank, changes only when a customer arrives or when the service provided to a customer is completed. A continuous system is one in which the state variables(s) change continuously over time. Model of a System A model is defined as a representation of a system for the purpose of studying the system. For most studies, it is necessary to consider only those aspects of the system that affect the problem under investigation. These aspects are represented in a model of the system, and the model, by definition, is a simplification of the system. On the other hand, the model should be sufficiently detailed to permit valid conclusions to be drawn about the real system. Different models of the same system may be required as the purpose of investigation changes. Types of Models Models can be classified as being mathematical or physical. A mathematical model uses symbolic notation and mathematical equations to represent a system. A simulation model is a particular type of mathematical model of system. Simulation models may be further classified as being static or dynamic, deterministic or stochastic, and discrete or continuous. A static simulation model, sometimes called a Monte Carlo simulation, represents a system at a particular point in time. Dynamic simulation models represent systems as they change over time. The simulation of a bank from 9:00 A.M. to 4:00 P.M. is an example of a dynamic simulation. Simulation models that contain no random variables are classified as deterministic. Deterministic model have a known set of inputs, which will result in a unique set of outputs.
3 Steps in Simulation Study Problem formulation: Every study should begin with a statement of the problem. If the statement is provided by the policy makers or those that have the problem, the analyst must ensure that the problem being described is clearly understood. Setting of objectives and overall project plan The objective indicates the questions to be answered by simulation. At this point a determination should be made concerning whether simulation is the appropriate methodology for the problem as formulated and objective as stated. The overall project plan should include the plans for the study in terms of the number of people involved, the cost of the study and the number of days required to accomplish each phase of the work with the anticipated results at the end of each stage. Model conceptualization The construction of a model of a system is probably as much art as science. The art of modeling is enhanced by an ability to abstract the essential features of a problem. To select and modify basic assumptions that characterize the system, and then to enrich and elaborate the model until a useful approximation results, the model complexity need not exceed that required to accomplish the purposes for which the model is intended. Violation of this principle will only add to modelbuilding expenses. It is advisable to involve the model user in model conceptualization. This will both enhance the quality of the resulting model and increase the confidence of the model user in the application of the model. Data collection There is a constant interplay between the construction of the model and the collection of the needed input data. As the complexity of the model changes, the required data elements may also change. Model translation Since most realworld systems result in models that require a great deal of information storage and computation, the model must e entered into a computerrecognizable format. We use the term “program”, even though it is possible to accomplish the desired result in many instance with little or no actual coding. The modeler must decide whether to program the model in a simulation language or to use specialpurpose simulation software.
It is also contingent upon how thoroughly the analyst has involved the ultimate model user during the entire simulation process. verification has been completed. an iterative process of comparing the model to actual system behavior and using the discrepancies between the two.4 Verifications Verification pertains to the computer program prepared for the simulation model. Is the computer program performing properly? If the input parameters and logical structure of the model are correctly represented in the computer. Often. . and so on can be explored without disrupting ongoing operations of the real system. Production runs and analysis Production runs and their subsequent analysis. are used to estimate measures of performance for the system designs that are being simulated. it may be necessary to understand how the program operates. the decision concerning which alternatives to simulate may be function of runs that have been completed and analyzed. Advantages and Disadvantages of Simulation: Advantages are 1. decision rules. If the program is going to be used again by the same or different analysts. This process is repeated until model accuracy is judged acceptable. information flows. organizational procedures. Validation is usually achieved through the calibration of the model. Program documentation is necessary for numerous reasons. Documentation and reporting There are two types of documentation: program and progress. Implementation The success of the implementation phase depends on how well the previous eleven steps have been performed. operating procedures. Experimental design The alternatives that are to be simulated must be determined. New policies. Validation Validation is the determination that a model is an accurate representation of the real system. and the insights gained to improve the model.
Simulation results may be difficult to interpret. 6.5 2. Materials. or even preferable. New hardware designs. 3. 2. 3. it may be hard to determine whether an observation is a result of system interrelationships or randomness. This is particularly useful in the design of new systems. physical layouts. A 9. transportation systems. Disadvantages are 1. 7. . Insight can be obtained about the importance of variables to the performance of the system. they may have similarities. Time can be compressed or expanded allowing for a speedup or slowdown of the phenomena under investigation. if two models are constructed by two competent individuals. “Whatif”. can be tested without committing resources for their acquisition. Model building requires special training. 4. but it is highly unlikely that they will be the same. Furthermore. so on are being excessively delayed. Insight can be obtained about the interaction of variables. and so on. 5. questions can be answered. Bottleneck analysis can be performed indicating where workinprocess information. Simulation is used in some cases when an analytical solution is possible. Hypotheses about how or why certain phenomena occur can be tested for feasibility. Since most simulation outputs are essentially random variables. 8. 4. Simulation modeling and analysis can be time consuming and expensive. Skimping on resources for modeling and analysis may result in simulation model or analysis that is not sufficient for the task. It is an art that is learned over time and through experience. When simulation is the appropriate tool Simulation can be used for the following purposes.
If the problem can be solved using common sense. By changing simulation input and observing the resulting outputs. 6. If system behavior is extremely complex or cannot be defined. If there is no time or skilled personnel are not available to verify and validate the model. 2. Simulation models designed for training allow learning without the cost and efforts of on the job training. If it is easier to perform direct experiment. Simulation can be used to verify analytic solution. organizational and environmental changes can be simulated and their effect on the model can be observed. Informational. we may know which variables are important. Simulation can be used to experiment with new designs or policies so as to estimate its effect. If there is an unreasonable expectation. . 5. 5. 2. Simulation enables the study of the internal interactions of a complex system or a subsystem within a complex system. 4. Many modern systems can be so complex that simulation may be the only way to study them. 7. 4. If the resources and time are not available. 8. If the costs exceed the savings. 1. 3. 6. When simulation is not appropriate? Simulation should not be used.6 1. Using animation we can visualize the system in a particular stage of operation. 8. If the problem can be solved analytically. 3. 7. If proper and sufficient data are not available. 9.
Define model. What is system modeling? Give an example and explain the different types of models. [N04] 2. Define simulation.7 Graded Questions 1. What are the various steps in simulation study? [M05] 4. What are the different types of models? Give example for each. When is simulation appropriate and when it is not? [N04] 3. Define simulation. [M05] .
05 2 0.10 Minutes 1 3 5 7 9 Random numbers (start at NorthWest corner and proceed along the row) 93 81 29 51 14 87 17 40 72 90 11 30 10 38 68 52 21 10 99 71 3. A plant has a large number of similar machines. Obtain average waiting time in the queue and average idle time of the server.8 2 Simulation Examples Graded Questions 1.15 4 0.10 3 0. Using the random number table below.35 0. Observations of past data show the following patterns in respect of interarrival durations and service durations in a single channel queuing system.10 Service Time Probability 0. simulate the queue behaviour for a period of 60 minutes and estimate the probability of the service being idle and the mean time spent by a customer waiting for service.35 8 0. . Each possible value of interarrival time has the same probability of occurrence.10 0. 2.10 Perform the simulation for 10 customers.17 10 0. A small grocery store has only one checkout counter.23 6 0.25 6 0.23 0.20 4 0. Interarrival Time Minutes Probability 2 0. Customers arrive at this checkout counter at random from 1 to 8 minutes apart. The machine breakdowns or failures are random and independent.30 5 0.22 0. The service time distribution is as follows: Service time (minutes) Probability : : 1 0.
5 3 Probability Repair Time Required (hours) Probability 0. The product has a life of only one year.05 0. the plant loses Rs. .21 0.000 Probability 0.40 0. a. determine the average profit from the said investment on the basis of 20 trials.9 The shift incharge of the plant collected the data about the various machines breakdown times and the repair time required on hourly basis. Simulate this maintenance system for 15 breakdowns. Unit Selling Price (Rs. 25.06 0.30 0. and the record for the past 100 observations as shown below was: Time Between Recorded Machine Breakdown (hours) 0.000 4. variable cost and the annual sales volume.) 40 50 60 Probability Unit Variable Cost (Rs.5 2 2.(08.(22.39).50 0.15).(56.30 0. b.(46.20 For each hour that one machine is down due to being or waiting to be repaired.60 0.5 1 1.28 0. 70 by way of lost production.33 0.19 1 2 3 0.85) 4.10 0.) 20 30 40 Probability Sales Volume (units) 3. The management of a company is considering the problem of marketing a new product.28). Obtain the total maintenance cost.(88.87). The management has the past data regarding the possible levels of the three factors.40 Using MonteCarlo simulation technique. Use following pairs of random numbers: (61.20 0.87). 20 per hour. A repairman is paid at Rs.20 0.52).16 0.97).69).(82.(16. The investment or the fixed cost required in the project is Rs. There are three factors that are uncertainselling price.(49.000 5.52 0.52).000. (85.
Depending upon the availability of raw materials and other conditions.15 202 0.67.18.78.23 1 .89.20 201 0. Also find the average demand per week: 35.90.73. A company manufactures 200 motorcycles per day. The average number of motorcycles waiting in the factory? b.34. Using the following random numbers: 82. and perform a simulation for 10 new customers.61. The average number of empty spaces on the lorry? 6.10 5.54. Interarrival times of jobs are distributed as follows: Time between Probability Arrivals (Hours) 0 .12 199 0.37 2 .35.23.56.10.57.52.11 203 0. Consider the following continuously operating job shop.66.45. Assume that when the simulation beings there is one job .12 Processing times for jobs are normally distributed with mean 50 minutes and standard deviation 8 minutes.04.83.60 8.27.50. Demand/week: 0 5 10 15 20 25 Frequency: 2 11 8 21 5 3 Using the following sequence of random numbers. Past data of demand per week (in hundred kilograms) with frequency is given below: 7.23. the daily production has been varying from 196 motorcycles to 204 motorcycies.06 The motorcycles are transported in a specially designed threestoreyed lorry that can accommodate only 200 motorcycles. Construct a simulation table.28 3 . generate the demand for the next 10 weeks.14 200 0.05 197 0. whose probability distribution is as given below: Production/day: 196 Probability: 0.94.08 204 0.52.09 198 0.24. A confectioner sells confectionary items.77. simulate the process to find out: a.53.13.
these independent random variables: Variable A is normally 2 distributed with = 100 and = 400. C. .29 3 0. B. defined as D = (A – 25B) / (2C) Use a sample of size 10.135 1 0.2.288 3 0. The probability distribution for daily for daily demand is known and occurs as show: Daily Demand Probability 0 0. Value of C 10 20 30 40 Probability .05 The distribution of leadtime has been reconstructed from past records as follows: Lead Time (Days) Probability 0 0.39 2 0.1. Variable B is discrete uniformly distributed with probability distribution given by p (b) = 1/5 with b = 0.213 4 0. 10.11 being processed (scheduled to be completed in 25 minutes) and there is one job with a 50minute processing time in the queue.3 and 4. A plumbing supply firm is interested in the distribution of leadtime demand of industrial sinks.118 5 0.10 .023 Develop the distribution of leadtime demand based on 20 cycles of leadtime.18 1 0.15 Use simulation to estimate the mean of a new variable D.25 .223 2 0.50 . Given A.09 4 0. Variable C is distributed in accordance with the following table. (a) What was the average time in the queue for the 10 new jobs? (b) What was the average processing time of the 10 new jobs? (c) What was the maximum time in the system for the 10 new jobs? 9.
36 0.38 0. Time between Arrivals (Minutes) 0 1 2 3 4 5 Probability 0.60 1.18 0.26 1.55 0.66 2.34 0.13 1.184 3 0.23 0.57 0.23 0.29 0.18 1. The first of the 10 new customers arrives at a time determined at random.77 0.49 0.46 1.33 0.95 0. Customers arriving when the queue is full.04 0.17 1.09 0.71 0.70 2.67 1.21 0.367 1 0.63 0. leaving at time 3.00 0.11 1.062 4 0.15 0.08 .15 1.69 0. How many customers went into the bank to transact business? Table Random Normal Numbers 0.72 0.17 0.68 0.80 0.92 1.13 0.35 0.71 0.02 0.72 1.09 1.82 1.20 0.73 0.68 0.94 1.52 0.36 0. and if a negative value results.91 0.02 0.05 0.39 0.04 0.) 12.43 0. park and go inside the bank to transact business.04 7.64 0.83 0.48 0.24 1. and one in the queue.00 0.62 1.26 1.12 Service Time (Minutes) 1 2 3 4 Probability 0. give it a lead time of zero.76 0. The timebetweenarrivals and servicestime distributions are given below.05 2.40 0.83 2.40 1.19 0.12 Simulate the operation of the driveinteller for 10 new customers.368 2 0.02 1. Start the simulation with one customer being served.47 0.44 0.42 1.12 0.61 0.07 2.13 0.98 0.8 0.82 0.15 0.55 0.32 0.43 0.16 0.18 0.92 2.70 0.12 11.17 017 0.90 1.019 Determine the leadtime demand for 20 order cycles.94 0. A bank has one drivein teller and room for one additional customer to wait.02 0.45 1.21 0. (Round off lead time to the closest integer during the simulation.59 1.28 0. Leadtime for a stock item is normally distributed with a mean of 7 days and standard deviation of 2 days.54 1. Daily demand is distributed as follows: Daily Demand Probability 0 0.47 0.91 0.52 0.60 0.61 0.90 0.42 0.75 0.64 1.025 0.27 0.13 0.59 0.20 0.41 1.76 1.
97 0.20 0.00 0.87 0.21 2.19 0.03 1.59 0.47 0.35 1.01 0.78 0.09 2.59 0.17 0.53 0.40 0.99 0.49 1.04 0.77 0.28 0.16 1.19 0.29 1.14 1.81 0.13 1.48 0.51 0.96 0.12 0.82 1.49 1.67 0.12 0.92 0.13 0.94 1.79 0.75 0.68 2.56 0.88 0.15 0.40 0.13 1.08 0.22 0.37 1.87 0.16 1.22 1.33 0.15 0.37 1.24 0.17 0.39 1.19 0.03 0.04 0.15 0.43 0.07 0.71 0.02 1.04 1.47 1.14 2.20 0.97 0.75 0.99 1.19 Simulation Examples Chap – 2 Simulation of Queuing Systems – .16 1.60 1.32 1.24 1.14 0.84 0.07 0.93 0.88 0.06 1.64 0.32 0.40 1.91 1.82 0.60 0.41 0.60 0.28 1.86 0.11 1.40 0.78 0.36 0.55 1.55 0.41 1.28 1.07 0.29 0.68 2.59 1.36 0.78 0.83 0.08 0.70 1.29 0.35 1.03 1.21 0.73 1.54 0.60 0.21 0.54 2.28 0.51 0.75 0.04 1.48 0.99 1.58 0.94 0.84 1.60 1.60 0.10 0.66 0.38 0.44 1.42 0.84 0.20 1.02 0.80 0.13 0.36 1.51 0.89 1.03 1.31 2.19 0.85 0.42 150 0.10 1.68 1.70 0.44 0.19 0.19 1.59 0.97 0.32 0.16 0.250 1.28 0.97 0.98 0.80 0.95 2.87 0.61 0.26 0.33 0.21 0.13 0.04 2.01 0.89 0.18 0.08 1.91 0.25 0.20 1.99 0.16 0.53 1.52 0.65 0.06 0.15 1.80 0.06 0.17 0.95 1.31 1.77 0.05 0.08 0.64 1.09 1.33 0.51 0.67 0.37 2.67 0.16 0.34 0.12 0.53 0.11 0.57 1.19 0.95 0.11 1.23 0.12 1.44 0.93 0.25 0.94 2.22 1.92 0.22 0.63 0.52 0.12 0.12 0.32 0.37 1.89 0.15 0.51 0.24 0.40 1.11 1.69 1.64 0.69 1.13 0.43 0.32 0.95 0.21 0.36 0.24 0.53 0.50 0.78 1.56 0.18 0.78 1.44 0.47 1.28 1.54 0.07 1.68 1.79 0.40 1.04 1.21 0.97 0.73 0.26 1.61 0.21 0.50 1.16 0.54 0.33 0.66 0.04 1.51 0.36 1.37 0.52 0.78 1.17 1.68 0.98 0.83 1.45 0.66 1.08 0.07 0.75 0.39 0.11 0.44 0.56 0.09 2.40 0.08 0.78 1.19 0.98 2.67 0.
8 minutes . This is determined in the following manner: Number of customers who wait Probability (wait) = Total number of customers 13 = 20 = 0. 1.65. When queues grow without bound they are termed explosive or unstable. The average waiting time for a customer 2. Average waiting time = (minutes) total time customers wait in queue (minutes) total numbers of customers 56 = 20 2. resp. The probability that a customer has to wait in the queue is 0.8 minutes. In the single queue. the calling population is infinite ie if a unit leaves the calling population & joins the waiting lines or entire service. there is no change in the arrival rate of other units that may need service. This is determined in the following manner.14 A queuing system is described by its calling population. the service mechanism. Arrivals & services are defined by the distribution by the distribution of service times. Queuing System In the single channel queue. the system capacity & the queuing discipline.65 = 2. Calling population waiting line server Fig. the system works an FIFO by a single server or channel. for any simple single or multi channel queue the overall effective motival sale must be lets than the total service rate or the waiting line wall grow without bound. the nature of the arrivals.
79. This is determined in the following manner: Sum of all times Average time between = between arrivals (minutes) Arrivals (minutes) Number of arrivals – 1 82 = = 4.2 minutes the expected service time is slightly lower that the average service time in the simulation.21.20) + 3 (0.21.05) = 3. The fraction of idle time of the server is 0.3 minutes 19 One is subtracted from the denominator because the first arrival is assumed to occur at time 0. 5.3 minutes. the closer the average will be to E (S). The average time between arrivals is 4.10) + 2 (0.21 The probability of the server being busy is the complement of 0. This result can be compared to the expected time between arrivals by finding the . determined as follows: Average service time (minutes) = total service time (minutes) total number of customers 68 = 20 This result can be compared with the expected service time by finding the mean of the service time by finding the mean of the servicetime distribution using the equation E (S) = s p (s) S=0 = 3. The average service time is 3. The longer the simulation. or 0. This is determined in the following manner: Probability of idle total idle tune if server (minutes) Server = Total run time of simulation (minutes) = 18 86 = 0.4 minutes.25) + 5 (0. 4.7 gives an expected service time of: = 1(0.4 minutes Applying the expectedvalue equation to the distribution in Table 2.10) + 6 (0.15 3.30) + 4 (0.
the computation can be achieved by the following relationship: Total time customers spend in the Average time customer system (minutes) Spends in the system = (minutes) total number of customers 7.4 = 6.3 minutes.5 minutes 2 2 The expected time between arrivals is slightly higher than the average.3 minutes 13 The average time a customer spends in the system is 6. This can be determined in two ways. The average waiting time of those who wait is 4.2 minutes . as the simulation becomes longer.8 + 3.16 mean of the discrete uniform distribution whose endpoints are a = 1 and b = 8.2 minutes = 6. E (A). However. 124 = 20 The second way of computing this same result is to realize that the following relationship must hold: Average time average time average time Customers spends customer spends customer spends In the system = waiting in the + in service (minutes) queue (minutes) (minutes) From finding 1 and 4 this results in: Average time customer spends in the system (minutes) = 2. This is determined in the following manner. the average value of the time between arrivals will approach the theoretical mean.2 minutes. The mean is given by a+b 1+8 E (A) = = 4. First. 6. Average waiting time of total time customers wait in queue (minutes) = those who wait (minutes) total number of customers who wait 56 = = 4.
stock would need to be carried. an order quantity. Q1. Figure 2. At the end of the first review period. Another is that the lead time is random of some positive length. the average waiting time is not excessive. indicating a shortage. a buffer.7 Probabilistic orderlevel inventory systems.) 2. when the order arrives. This inventory system has a periodic review of length N. Since demands are not usually known with certainty. One possibility is that demands all occur at the beginning of the cycle. Notice that in the second cycle. To avoid shortages. An order is made to bring the inventory up to the level M. . are presented as exercises for the reader. the demand for the backordered items is satisfied first. the length of time between the placement and receipt of an order) is zero..7.2 Simulation of Inventory Systems An important class of simulation problems involves inventory systems. Demand is shown as being uniform over the time period in Figure and do fluctuate over time. However. is placed. The server does not have an undue amount of idle time.e. the amount in inventory drops below zero. but a longer simulation would increase the accuracy of the findings. however. the order quantities are probabilistic. as well as implementation in qa spreadsheet. In this inventory system the leadtime (i. at which time the inventory level is checked. In Figure 2.7.17 A decision maker would be interested in results of this type. (Simulations requiring variations of the arrival and service distribution. A simple inventory system is shown in Figure 2. some subjective inferences can be drawn at this point. or safety. Objective statements about the results would depend on balancing the cost of waiting with the cost of additional servers. Most customers have to wait. these units are backordered.
When the leadtime is zero. For example. the review of the inventory position. Ad hoc simulation tables were used in completing each eg. In the following example for deciding how many newspapers to buy. and special seasonal items [Hadley and Whitin. and so on. 1963]. M. These costs must be traded off in order to minimize the total cost of an inventory system. more frequent purchases or replenishments. SUMMARY: This chapter introduced simulation concepts via eg in order to illustrate general areas of application. and consequently. Customers may get angry. N) inventory system. perishable items.18 Carrying stock in inventory has an associated cost attributed to the interest paid on the funds borrowed to buy the items (this also could be considered as the loss from not having the funds available for other investment purposes). and the receipt of an order at the end of each review period. What effect does changing N have on the various costs? In an (M.7. the last two events occur simultaneously. including the stocking of spare parts.7. Also. only a single time period of specified length is relevant and only a single procurement is made. hiring guards. Inventory remaining at the end of the single time period is sold for scrap or discarded.. A wide variety of realworld problems are of this form. Other costs can be placed in the carrying or holding cost column: renting of storage space. This has an associated cost: the ordering cost. with a subsequent loss of good will. the decision maker can control the maximum inventory level. . N. and the length of the cycle. Larger inventories decrease the possibilities of shortages. in Figure 2. An alternative to carrying high inventory is to make more frequent reviews. there is a cost in being short. the events that may ovvur are: the demand for items in the inventory. style goods. This can be affected by the policy alternatives. The total cost (or total profit) of an inventory system is the measure of performance. as in Figure 2.
involving time and containing random elements) with change in a discrete manner. a machine). activities. or by priority).g. Entity Any object or component in the system. . events. or mathematical relationships which describe a system in terms of state. ordered in some logical fashion (such as all customers currently in a waiting line.1 Concepts in DiscreteEvent Simulation The concept of a system and a model of a system were discussed briefly in Chapter1. Model An abstract representation of a system..e. the routing of a job through a job shop). a customer. first served. the priority of a waiting customer.. along with any associated data necessary to execute the event. and delays. entities and their attributers. This section expands on these concepts and develops a framework for the development of a discreteevent model of a system. which requires explicit representation in the model (e. Event An instantaneous occurrence that changes the state of a system (such as an arrival of a new customer). List A collection of (permanently or temporarily) associated entities. The major concepts are briefly defined and then illustrated by examples: System A collection of entities (e. System state A collection of variables that contain all the information necessary to describe the system at any time. sets. Event notice A record of an event to occur at the current or some future time.19 3 General Principles 3. a server. at a minimum. ordered by first come. This chapter deals exclusively with dynamic.. logical. people and machines) that interact together over time to accomplish one or more goals.g. stochastic systems (i. usually containing structural. the record includes the event type and the event time.. Attributes The properties of a given entity (e. processes.g.
or any other processing time whose duration has been characterized and defined by the modeler. an event notice is created having an event time equal to the activity’s completion time.. an interarrival time. at the simulated instant that an activity duration begins.g. or ranked by some entity attribute. Delay A duration of time of unspecified indefinite length. An activity typically represents a service time. The future event list is always ranked by the event time recorded in the event notice. firstout waiting line which.5. However it is characterized. For example. To keep track of activities and their expected completion time. which is known when it begins (although it may be defined in terms of a statistical distribution). a customer’s delay in a lastin. An activity’s duration may be specified in a umber of ways: 1. 3. ordered by time of occurrence. such as firstin. Statistical . firstout. queues. A function depending on system variables and/or entity attributes – for example.20 Event list A list of event notices for future events. also known as the future even list (FEL). as a random draw from among 2. lists are sometimes called sets.g. Clock A variable representing simulated time. or chains. depends on future arrivals). loading time for an iron ore ship as a function of the ship’s allowed cargo weight and the loading rate in tons per hour. firstout or lastin.7 with equal probabilities. Different simulation packages use different terminology for the same or similar concepts. Activity A duration of time of specified length (e. Its duration is not affected by the occurrence of other events (unless.. the model contains logic to cancel an event). Deterministic – for example. For the same or similar concepts. as is allowed by some simulation packages. which is not known until it ends (e. the duration of an activity is computable from its specification at the instant it begins. Section 3. called CLOCK in the examples to follow. a service time or interarrival time). For example if the current simulated time is CLOCK = 100 minutes and an inspection time of exactly 5 minutes is just . such as priority or due date. always exactly 5 minutes. The entities on a list are always ordered by some rule. 2.2 discusses a number of methods for handling lists and introduces some of the methodologies for efficient processing of ordered sets or lists.for example. Sets or lists are used to hold entities as well as event notices. when it begins.
A discreteevent simulation (hereafter called a simulation) proceeds by producing a sequence of system snapshots (or system images) which represent the evolution of the system through time. In contrast. which in turn is represented by a statistical distribution. until such time as system conditions permit the processing of the entity. Further illustrations are provided in the examples in this chapter. but rather is determined by system conditions.21 beginning.) 3. This list contains all event notices for events that have been scheduled to occur at a future time. such random events are represented by the end of some activity. but also a list (the FEL) of all activities currently in progress and when each such activity will end. the status of all entities and current membership of all sets. At any given time t. The FEL is ordered by event . often called a primary event. A prototype system snapshot is shown in Figure 3.1. plus the current values of cumulative statistics and counters that will be used to calculate summary statistics at the end of the simulation. … in Figure 3. perhaps representing a waiting line. its duration is computed or drawn as a sample from a statistical distribution and the endactivity event. a delay ends when some set of logical conditions becomes true or one or more other events occur. a delay’s duration is not specified by the modeler ahead of time.1 The EventScheduling/TimeAdvance Algorithm The mechanism for advancing simulation time and guaranteeing that all events occur in correct chronological order is based on the future event list (FEL). t2. then an event notice is created that specifies the type of event (an end of inspection event) and the event time (100 + 5 = 105 minutes). In the model. In contrast to an activity. A discreteevent simulation is the modeling over time of a system all of whose state changes occur at discrete points in timethose points when an event occurs. that is managed by placing an event notice on the FEL. the FEL contains all previously scheduled future events and their associated event times (called t1. (Not all models will contain every element exhibited in Figure 3. A given snapshot at a given time (CLOCK = t) includes not only the system state at time t. but such events are not represented by event notices nor do they appear on the FEL. Quite often.1). Scheduling a future event means that at the instant an activity begins. Typically. while an activity is called an unconditional wait. most future events are not scheduled but merely happensuch as random breakdowns or random arrivals. a delay’s duration is measured and is one of the desired outputs of a model run. For example.1. In the real world. A delay is sometimes called a conditional wait.1. delays are managed by placing the associated entity on another list. together with its event time. The completion of a delay is sometimes called a Conditional or Secondary Event. is placed on the future event list. The completion of an activity is an event. a customer’s delay in a waiting line may be dependent on the number and duration of service of other customers ahead in line as well as the availability of servers and equipment.
meaning that the events are arranged chronologically. it is the next event that will occur. a servicecompletion event at server 3. < tn Time t is the value of CLOCK.2) of the eventscheduling/timeadvance algorithm. The major event. say. it is removed from the FEL in step 1 (Figure 3.2. As the imminent event is usually at the top of the list. addition of a new event to the list.2. In addition to the FEL. the CLOCK is advanced to simulation time CLOCK = t1. and the imminent event notice is removed from the FEL and the event executed. (In figure 3. If t3 < t* < t4. place event 4 second on the list. After the new system snapshot for time has been updated. place event 4 third on the list. but if any are. the current value of simulated time. and occasionally removal of some event (called cancellation of an event). The management of a list is called list processing. : : If tn < t*. Execution of the imminent event means that a new system snapshot for time t1 is created based on the old snapshot at time t and the nature of the imminent event. and thus its efficient management in a computerized simulation will have a major impact on the efficiency of the computer program representing the model. When event 4 (say. one possible way to determine its correct position on the FEL is to conduct a topdown search: If t* < t2 place event 4 at the top of the FEL. . place event 4 last on the list. The efficiency of this search depends on the logical organization of the list and on how the search is conducted. A brief introduction to list processing in simulation is given in Section 3. If t2 < t* < t3. they are scheduled by creating event notices and putting them in their proper position on the FEL. that is. all the sets in a model are maintained in some logical order.) Another way is to conduct a bottomup search. Event 3 with event time t1 represents. and the operations of addition and removal of entities from the set also require efficient listprocessing techniques.2.. This process repeats until the simulation is The length and contents of the FEL are constantly changing as the simulation progresses. The least efficient way to maintain the FEL is to leave it as an . that is. the clock is advanced to the time of the new imminent event and that event is executed. its removal is as efficient as possible. new future events may or may not be generated. Addition of a new event (and cancellation an old event) requires a search of the list. At time t1. Since it is the imminent event at time t. We can the removal and addition of events from the FEL is illustrated in Figure 3. the event times satisfy T < t1 < t2 < t3 < . . it was assumed that t* was between t2 and t3. an arrival event) with event time t* is generated at step 4.22 time. After the system snapshot at simulation time CLOCK = t has been updated. The event associated with time t1 is called the imminent event.
This method of generating an external arrival stream. Bootstrapping is illustrated in Figure 3. t + a* = t*.) The system snapshot at time 0 is defined by the initial conditions and the generation of the socalled exogenous events. in Figure 3.23 unordered list (additions placed arbitrarily at the top or bottom). The first three interarrival times generated are 3. A second example of how future events are generated (step 4 of Figure 3. provides one example of how future events are generated in step 4 of the eventscheduling/timeadvance algorithm.2. Generation of an external arrival stream by bootstrapping. and 3. The end of an interarrival interval is an example of a primary event. at current time CLOCK = t. When one customer completes service. 0.3 time units.3. called bootstrapping. An important example is an arrival to a queuing system. if the next customer is present. will be generated for the next customer. When the clock eventually is advanced to the time of this first arrival. The next servicecompletion event will be scheduled to occur at future time t* = t + s* by placing onto the FEL a new . a*.3. the resulting (future) event time. a second arrival event is generated.2) is provided by a servicecompletion event in a queueing simulation. which would require at step 1 of Figure 3. First. an interarrival time is generated. The specified initial conditions define the system state at time 0. s*. (The imminent event is the event on the FEL with the lowest event time. For example. then the state (5. Notice on the FEL. An exogenous event is a happening “outside the system” which impinges on the system. CLOCK = t. then a new service time.2 a complete search of the list for the imminent event before each clock advance. The interarrival time is an example of an activity.6) might represent the initial number of customers at three different points in the system. if t = 0.7. it is added to the current time. At time 0.1. is used to position the new arrival event Figure 3. the first arrival event is generated and is scheduled on the FEL (meaning its event notice is placed on the FEL).4.
Note that a conditional event. Whenever an endofruntime event occurs.24 event notice of type service completion with event time t*. and the activityscanning world view. a simulation analyst concentrates on events and their effect on system . Service completion is an example of a primary event. At time 0. is triggered by a primary event occurring and certain conditions prevailing in the system. Only primary events appear on the FEL. there is at least one idle server in the server group. it may be one of the statistics of primary interest to be produced by the simulation. Example: Simulate a job shop for TE = 40 hours. as discussed in the previous section. upon arrival. understanding the different approaches may suggest alternative ways to model a given system. 3. In addition. In this way. 2. TE]. A third important example is the alternate generation of runtimes and downtimes for a machine subject to breakdowns. Those most prevalent are the eventscheduling world view. such as beginning service. At time 0. Run length TE is determined by the simulation itself. it is known that the simulation will run over the time interval [0. Generally. Every simulation must have a stopping event. TE is the time at which a distribution center ships the last carton in a day’s orders. provided that. When the CLOCK is eventually advanced to the time of this endofdowntime event. To summarize the previous discussion. the processinteraction world view.1.2 World Views When using a simulation package or even when doing a manual simulation. Even if a particular package does not directly support one or more of the world views. a runtime is generated and an endofruntime event scheduled on the FEL. because its occurrence is triggered only on the condition that customer is present and a server is free. Beginning service is a conditional event. a downtime will be generated and an endofdowntime event scheduled on the FEL. TE is not known ahead of time. TE is the time of breakdown of a complex system. Indeed. a modeler adopts a world view or orientation for developing a model. Thus. and end of runtime and end of downtime are primary events. A runtime and a downtime are examples of activities. A service time is an example of an activity. In case 2. which defines how long the simulation will run. before simulating. a servicecompletion event will be generated and scheduled at the time of an arrival event. TE is the time of disengagement or total kill (whichever occurs first) in a combat simulation. TE is the time of th the 100 service completion at a certain service center. when using the eventscheduling approach. here called E. There are generally two ways to stop a simulation: 1. the first runtime will be generated and an endofruntime event scheduled. runtimes and downtimes continually alternate throughout the simulation. schedule a stop simulation event at a specified future time TE.
3 and the C++ simulation in Chapter 4. a process is the life cycle of one entity. demanding resources and queueing to wait for resources. but usually hidden from a modeler’s view. the simplest example being an entity forced to wait in a queue (on a list) because the resource it needs is busy with another entity. Some activities may require the use of one or more resources whose capacities are limited. a simulation analyst thinks in terms of processes. An example of a “customer process” is shown in Figure 3. activities.4. The processinteraction approach is popular because of its intitive appeal. These and other constraints cause processes to interact. When using a package that supports the processinteraction approach. Underlying the implementation of the processinteraction approach in a simulation package.1. In this figure. This life cycle consists of various events and activities. causing one process to temporarily suspend its execution while other processes proceed. and the interaction among processes may be quite complex. and delays. we see the interaction between two customer processes as customer n + 1 is delayed until the previous customer’s “endservice event” occurs.25 state. In more precise terms. events are being scheduled on a future event list and entities are being placed onto lists whenever they face delays. More precisely. a process is a timesequenced list of events. and because the simulation packages that implement it allow an analyst to describe the process flow in terms of highlevel block or network constructs. including demands for resources. while the interaction among processes is handled automatically. that define the life cycle of one entity as it moves through a system. This world view will be illustrated by the manual simulations of Section 3. Usually many processes are simultaneously active in amodel. It is important that the modeler have a basic understanding . The analyst defines the simulation model in terms of entities or objects and their life cycle as they flow through the system.
simple or complex that allows an activity to begin. that is. the conditions for each activity begin. activities are divided into two categories. events are considered to be activities of durationzero time units. the simulation clock is advanced to the time of the next imminent event on the FEL. They admit. The activityscanning approach. Phase B Execute all Btype events that were removed from the FEL. but keeping the main advantages of the activityscanning approach. just as in the eventscheduling approach.26 of the builtin but hidden rules of operation. The FEL contains only Btype events. In the threephase approach. With the activityscanning approach. in contrast. all primary events and unconditional activities.) . however. with the threephase approach. Remove any other events from the FEL that have the same event time. C activities Activities or events that are conditional upon certain conditions being true. Both the eventscheduling and the processinteraction approaches use a variable time advance. With this definition. uses a fixed time increment and a rulebased approach to decide whether any activities can begin at each point in simulated time. after all Btype events have completed. The Btype activities and events can be scheduled ahead of time. when all events and system state changes have occurred at one instant of simulated time. (This may free a number of resources or otherwise change system state. Scanning to check if any Ctype activities can begin or Ctype events occur happens only at the end of each time advance. the simulation proceeds with repeated execution of the three phases until it is completed: Phase A Remove the imminent event from the FEL and advance the clock to its event time. a modeler concentrates on the activities of a model and those conditions. which combines some of the features of event scheduling with activity scanning to allow for variable time advance and the avoidance of scanning when it is not necessary. B activities Activities bound to occur. This allows variable time advance. Proponents claim that the activityscanning approach is simple in concept and leads to modular models that are more maintainable and easily understood and modified by other analysts at later times. that the repeated scanning to determine whether an activityscanning approach has been modified (and made conceptually somewhat more complex) by what is called the threephase approach. called B and C. In summary. Schriber and Brunner [1998] provide understanding in this area. At each clock advance.
third.2 discusses the use of arrays for processing lists and the use or array indices to create linked lists.2. The purpose of this discussion of list processing is not to prepare the reader to implement lists and their processing in a generalpurpose language such as FORTRAN. or C++ but rather to increase the reader’s understanding of lists and the underlying concepts and operations. Simulation packages provide both explicitly for an analysts use as well as hidden in the simulation machanism behind the language. facilities for an analyst or the model itself to use lists & perform the basic operations on lists.2. they have a top or head (the first item on the list). 3.2. In addition.1 describes the basic properties and operations performed on lists. Finally.2. in which various combinations of resources are needed to accomplish different tasks. List processing List processing deals with methods for handling lists of entities & the failure event list. Section 3.3.1. In simulation. Rescan until no additional Ctype activities can begin or events occur.27 Phase C Scan the conditions that trigger each Ctype activity and activate any whose conditions are met. each record represents one entity or one event notice. Section 3. Section 3. Lists: Basic Properties and Operations As previously discussed. Since lists are ranked. C. and a bottom or . some way to traverse the list (to find the second. The threephase approach improves the execution efficiency of the activity scanning method. arrays being a simpler mechanism for describing the basic operations than the more general dynamically allocated linked lists discussed in Section 3.2.4 briefly introduces some of the more advanced techniques for managing lists. lists are a set of ordered or ranked records. items on the list). proponents claim that the activityscanning and threephase approaches are particularly good at handling complex resource problems. These approaches guarantee that resources being freed at a given simulated time will be freed before any available resources are reallocated to new tasks. etc.
More specifically. Removing a record from the top of the list. the other two operations require at least a partial search through the list.28 tail (the last item on the list). For purposes of discussion. then the second removal operation is performed. whether using a generalpurpose language such as FORTRAN. Removing a record from any location on the list. an entity along with its attributes or an event notice will be referred to as a record. They therefore can be referenced by an array index that can be thought of as a row number in a matrix. then upon arrival to the queue. When simulating on a computer. 3. each entity record and event notice is stored in a physical location in computer memory. removing or adding a record to the top or bottom of the list. for example. allocated from RAM as needed. . or an entity is removed from a list based on some of its attributes (say. If an arbitrary event is being canceled. an entity must be added to the list. While the first and third operations. Finally. An entity identifier and its attributes are fields in the entity record. and tracked by pointers to a record or structure. determined by the ranking rule. the removal operation takes place first. There are two basic possibilities: (a) All records are stored in arrays. not at the top or bottom. Adding an entity record to the top or bottom of the list. or a simulation package. C. 4. firstout queue implemented as a list. In the eventscheduling approach. is performed. but at the position determined by the duedate ranking rule. 2. when time is advanced and the imminent event is due to be executed. Some implementations of lists may also have a tail pointer that points to the bottom item on the list. event time. Arraya hold successive records in contiguous locations in computer memory. the event at the top of the FEL is removed from the FEL. namely. its priority and due date) to begin an activity. Each record on a list will also have a field that holds a “next pointer” that points to the next record on the list. For either type of list.processing techniques. A head pointer is a variable that points to or indicates the record at the top of the list. Some lists may also require a “previous pointer” to allow traversing the list from bottom to top. and any other eventrelated data are fields in the eventnotice record. adding an entity to the bottom of a list. Adding a record to an arbitrary position on the list. the main activities in list processing are adding a record to a list and removing a record from a list. providing a way to traverse the list. if a queue has a ranking rule of earliest due date first. the main operations on a list are: 1. or C++. the event type. (b) All entities and event notices are represented by structures (as in C) or classes (as in C++). Making these two operations efficient is the goal of list. When an entity joins the back of a firstin. then the third operation. can be carried out in minimal time by adjusting two record pointers and the head or tail pointer.
a record may be implemented as a row in a twodimensional array or as a number of parallel arrays. and we will assume that the necessary operations occur as needed. the corresponding records are freed. the language or operating system adds the chunk to the list of free memory. can be retrieved quickly without searching. When a record is allocated in C or C++.2. Arrays are advantageous in that any specified record. the allocation routine returns a pointer to the allocated record.29 Most simulation packages use dynamically allocated records and pointers to keep track of lists of items. records that are created upon first being needed and destroyed when they are no longer needed. For convenience. In this text. say the i th. maintain a linked list of free chunks of computer memory and allocate a chunk of desired size upon request to running programs. the maximum number of record for any list may be difficult or impossible to determine ahead of time. (Another use of linked lists!) When an entity “dies” – that is. which must be stored in a ariable or a field of another record for later .2. while the current numberin a list may vary widely over the course of the simulation run. most simulations repuire more than one list. we use the notation R(i) to refer to the i th record in the array. arrays typically have a fixed size.2. In addition. The languages themselves. 3. Arrays are disadvantaged when items are added to the middle of a list or the list must be rearranged. each would have to be dimensioned to the largest the list would ever be. 3.2. a record is referenced by a pointer instead of an array index. making that chunk of computer memory available for later reuse.3. we are not concerned with the details of allocating and freeing computer memory. Using Dynamic Allocation and Linked Lists In procedural languages such as C and C++.2. In simulation. however it may be stored in the language being used. As most versions of FORTRAN do not have actual recordtype data structures. and if kept in separate arrays. entity records are dynamically created when an entity is created and event notice records are dynamically created whenever an event is scheduled on the future event list. As arrays are conceptually simpler. With dynamic allocation. determined at compile time or upon initial allocation when a program first begins to execute. Using Arrays For List Processing The array method of list storage is typical of FORTRAN but may be used in other procedural languages. the concept of linked lists is first explained through arrays and array indices in Section 3. exits from the simulated system – and also after an event occurs and the event notice is no longer needed. and in most simulation languages. potentially using excessive amounts of computer memory.2 and then applied to dynamically allocated records and pointers in Section 3. or the operating systems on which they are running.3. merely by referencing R(i). Most modern simulation packages do not use arrays for list storage but rather use dynamically allocated records—that is. Worse yet.
Events & activities for any 5 systems (either single server or double server). In our example. other data. we will use a notation for records identical to that in the previous section (3. If for some reason we wanted the third item on the list. we would have to traverse the list. Unlike arrays. event time. System state 2. next pointer] but we will not reference them by the array notation R(i) as before. events & activities.2. 3) Prepare a table in the until the clock reaches time 15. System entities & their attributes 3. counting items until we reached the third record. 4. International times 1 5 6 3 8 Service time 5 3 4 1 5. Sets & the entities that may be put into the sets. A pointer to a record can be thought of as the physical or logical address in computer memory of the record. next pointer] [event type. there is no way to retrieve directly the ith record in a linked list. Summary This chapter introduced the major concepts & building blocks in simulations the most important being entities & attributes. because it would be misleading. attributes.30 use. . Exercises 1) Prepare a banking system model with the future event list if the 4 customers & 2 solvers and model the clock for 2 days 2) Prepare 1. The stopping event will be at time 30.2): Entities: Event notice: [ID. _________the international & service times given below in the order shown. as the actual records may be stored at any arbitrary location in computer memory and are not stored contiguously as are arrays.
1999]. including simulation support packages such as input data analyzers. and C++. In May of each year. and panel discussions at the annual Winter Simulation Conference. If you were about to purchase simulation software. Third. This category includes many products that are distinguished one way or another (by. the ease of use. OR/MS Today publishes a simulation software survey [Swain. In the first category. IIE Solutions (Institute of Industrial Engineers) presents a “Simulation Software Buyer’s Guide. for example. or would it be the power to model the kinds of system with which you are concerned? Or would it be the animation capabilities? We then discuss other issues and concerns related to the selection of simulation software. There are guides to simulation software published in at least two sources. articles written by Richard Nance. or type of animation) but have common characteristics such as a graphical user interface and an environment that supports all (or most) aspects of a simulation study.” The 1999 guide had 39 products in it. Software that is used to develop simulation models can be divided into three categories. First.2 Selection of Simulation Software This chapter includes a brief introduction to a number of simulation software packages. We base this history on our collective experience. such as FORTRAN. cost. we discuss features and attributes of simulation software. Next. Today very few people are writing discreteevent simulation models using programming languages alone. Every two years. C++ is a general purpose programming language that was not specifically designed for use in simulation. application area. . in certain application areas. some people are 4. what would concern you? Would it be the cost. there are the simulation environments. while some take a graphical approach similar to process flow diagramming. there are the general – purpose programming languages. Many simulation environments contain a simulation programming language.31 4 Simulation Software In this chapter we first discuss the history of simulation software – a history that is just reaching middle age. the ease of learning. Second. there are simulation programming languages. The 1999 issue had 54 products. TM examples being GPSS/H . we discuss simulation in C++. However. and SIMAN V. C++ was chosen since it is widely used and widely available. C.
. C++. Similarly. many packages claim to have a conveyor entity. most packages offer a runtime license. For example. Speed affects development time. especially when the external routines already exist ad are suitable for the purpose at hand. Many advertisements exploit positive features of the software only. Some of these features are shown. the more important question is whether the simulation package and language are sufficiently powerful to avoid having to write logic in any external language. There may be a significant tradeoff between the graphical modelbuilding environments and ones based on a simulation language. or FORTRAN. 4. Implementation and capability are what is important. along with a brief description.5. As a second example. We offer the following advice when evaluating and selecting simulation software: 1. This is a good feature. Beware of “checklists” with “yes” and “no” as the entries. 2. the demonstrations solve the test problem very well. Beware of advertising claims and demonstrations. Beware of “no programming required” unless either the package is a nearperfect fit to your problem domain. in Tables 4. or process flow diagram. an analyst may have to wait for the model to run up to the point in simulated time where an error occurs many times before the error is identified. 5. it does not remove the need for procedural logic in most realworld models and the debugging to get it right. However. ease of learning. but perhaps not your problem. Consider the accuracy and level of detail obtainable. vendor support. implementations have considerable variation and level f fidelity. or programming (customized procedural logic) is possible with the supplied blocks. 7.32 There are many features that are relevant when selecting simulation software [Banks. Do not focus on a single issue such as ease of use. While graphical model building removes the learning curve due to language syntax. 6. However. Execution speed is important. 1996]. nodes. in which case “no programming required” refers to syntax only and not the development of procedural logic. but these vary considerably in price and features. Do not think exclusively in terms of experimental runs that take place at night and over the weekend. 3.1 to 4. Ask the vendor to solve a small version of your problem. During debugging. Simulation users ask if the simulation model can link to and use code or routines written in external languages such as C. and applicability to your problems.
the runtime library does provide a random – number generator. however. The simulation will run until 1000 customers have been served. activities and delays. a queue forms with no customers turned away.4 using the event scheduling point of view. the special – purpose simulation languages hide the details of event scheduling. a grocery checkout counter.6 minute. and the report generator. the generation of samples from specified probability distributions. Figures 3. 1997].1 (The Checkout Counter: A Typical SingleServer Queue) The system. who therefore must program all details of the event – scheduling/time – advance algorithm. provide any facilities directly aimed at aiding the simulation analyst. Unlike FORTRAN or C.1: system state. the object – orientedness of C ++ does support modular construction of large models. it is best to organize the C ++ model in a modular fashion using subroutines. It does not. is modeled as a single – server queue. the elements of the future event list (Future Event List) which has the smallest time – stamp . and CSIM.3 and 3.2 minutes and a standard deviation of 0. The following three sections illustrate the simulation of this single – server queue in C ++. The model contains two events. However. (The approximation is that service times are always positive).5 minutes. assume that the inter arrival times of customers are exponentially distributed with a mean of 4. (The definitive book on C ++ is its designer’s [Stroustup. events.4 Simulation in C ++ C ++ is a widely used programming language that has been used extensively in simulation. its simulation contains the essential components of all discreteevent simulations. For the most part. and that the service times are (approximately) normally distributed with a mean of 3. sets.6 provide the event logic. To facilitate development and debugging.33 4.3 An Example Simulation EXAMPLE 4. 1987] alleviate the development burden by providing access to standardized simulation functionality and hiding lowlevel scheduling minutiae. However. the statistics – gathering capability. Although this example is much simpler than models that arise in the study of complex systems. 4. the arrival and departure events. In addition. entites and attributes. whereas in C ++ all the details must be explicitly programmed. This example was manually simulated in Examples 3. to a certain extent simulation libraries such as CSIM [Schwetman. Any discreteevent simulation model written in C ++ contains the components discussed in Section 3.5 and 3. GPSS/H. plus the component listed below. When the cashier is busy. The following components are common to almost all models written in C ++: Clock A variable defining simulated time Initialization subroutine A routine to define the system state at time 0 Mintime event subroutine A routine that identifies the imminent event – that is.
3 and 3. These are used by the C ++ standard library queue implementations. events. A version of this example was simulated manually in Examples 3. which provide semantic meaning to relational operators < and = = between events.2 (SingleServer Queue Simulation C ++) The grocery checkout counter. called operators. is now simulated using C ++. entities and attributes. which is an adaptation of Figure 4. after finding the imminent event but before calling the event subroutine. Virtually every C ++ system now includes the “C ++ standard libraries. The value of the variable Clock does not change in an event routine. At each step. Executing the imminent event means that the system state. sets.” whose priorityqueue data structure we will use in this example to implement the event list and whose generic queue we will use to implement the list of waiting customers.1. update cumulative statistics. removal of the imminent event and addition of a new event are the two main operations performed on the Future Event List. control passes to the report generator. Indeed. then to the appropriate event subroutine. and delays were analyzed and defined. which computes the desired summary statistics from the collected cumulative statistics and prints a report.4. the simulation Clock is advanced to the time of the imminent event. generating any initial events (there will always be at least one) and placing them on the Future Event List. The efficiency of a simulation model in terms of computer runtime is determined to a large extent by the techniques used to manipulate the Future Event List and other sets. and so on. where the systems state.1 . It stores a code for the event type (arrival or departure). When the simulation is over.) Next. Class Event represents an event. in the sense of having access costs that grow only in the logarithm of the number of elements in the list. The underlying priorityqueue organization is efficient. initializing cumulative statistics to zero. repeatedly passing the current leasttime event to the appropriate event subroutines until the simulation is over. defined in detail in Example 4. (Recall that during the simulated time between the occurrence of two successive events. the appropriate event subroutine is called to execute the imminent event. It has associated methods (functions) for creating an event and accessing its data. and set membership are changed to reflect the fact that the event has occurred. As discussed in Section 3. The simulation program then cycles. If the simulation is not over. and defining the system state at time 0.34 The simulation begins by setting the simulation Clock to zero.2. EXAMPLE 4.1. this is the definition of discrete – event simulation: The system state changes only when an event occurs. and generate future events (to be placed on the Future Event List). Notice that all actions in an event subroutine takes places at one instant of simulated time. activities. The subroutines for this model and the flow of control are shown in Figure 4. It also has associated special functions. the systems state and entity attributes do not change in value. control passes again to the timeadvance subroutine. and the event time – stamp. entity attributes.
Crain and Henriksen. expanded control statements. Wolverine added ampervariables to GPSS because the original IBM implementation had limited support for ordinary global variables. EXAMPLE 4. with GPSS/H being the most widely used version in use today. The block diagram is converted to block statements. and Sy. with the queues preceding scarce resources). &IAT). builtin math functions. Annandale. use of an arithmetic expression as a block operand. control statements are added. In figure 4. g. It can run in post processed mode (after the simulation has finished running) or concurrently. It should be noted that the QUEUE block is not needed for queues or waiting lines to form in GPSS. and built – in random – variate generators.11) is a translation of the block diagram together with additional definition and control statements. 1999). ordinary variables and arrays. The first version of GPSS was released by IBM about 1961. exponentially distributed. and the result is a GPSS model.10. it has been implemented anew and improved by many parties since 1961. GPSS/H includes builtin file and screen I/o. and due to its popularity. an interactive debugger. Since is was the first process – interaction simulation language. with the interarrival times specified by RVEXPO (1. The animator for GPSS/H is Proof Animation . 1995. Example 4.2. 1999). Proof Animation provides a 2D animation.3 is based on GPSS/H. It can work with any simulation package that can write the ASCII trace file. RVEXPO stands for “random variable.. customers. with no user freedom for naming them. GPSS/H is a product of Wolverine Software Corporation.” the 1 indicates the randomnumber stream to use. or can be controlled directly when using its DLL (dynamic link library) version. Alternately. Carson. Note that the program (Figure 4.3 (SingleServer Queue Simulation in GPSS/H) Figure 4. a network of queues. Unlike the original IBM implementation. Ampervariable names begin with the “&” character. In post processed mode. yet powerful tool for simulation. the animation is driven by two files: the layout file for the static background. and a trace file that contains commands to make objects move and produce other dynamic events. it can run concurrently with the simulation by sending the tracefile commands as messages. the GENERATE block represents the arrival event. VA (Banks. another product of Wolverine Software Corporation (Henriksen. It is a flexible. faster execution. usually based on a scale drawing.10 exhibits the block diagram and figure 4. The true TM .35 be used to model any situation where transactions (entities. a floatingpoint clock.) The next block is a QUEUE with a queue named SYSTIME. units of traffic) are flowing through a system (e. (In the discussion that follows all nonreserved words are shown in italics.11 the GPSS program for the grocery store checkout –counter model described in Example 4. and &IAT indicates that the mean time for the exponential distribution comes from a socalled ampervariable &IAT.
. GPSS block diagram for single – server queue simulation. Figure 4.10.36 purpose of the QUEUE block is to work in conjunction with the DEPART block to collect data on queues or any other subsystem.
By placing a QUEUE block at the point where transactions enter the system. the time a transaction spends in the system. (&IAT. &STDEV. the response times will be automatically collected.&MEAN. and the counter part of the QUEUE block.2 &STDEV = .37 In Example 4. TER &COUNT =&COUNT+1 1 Exponential arrivals Begin response time data collection Customer joins waiting line Begin checkout at cash register Customer starting service leaves queue Customer’s service time Customer leaves checkout area End response time data collection Is response time GE 4 minutes? If so.&STDEV. &STDEV) CHECKOUT SYSTIME M1.3.** minutes ***** &LIMIT &IAT.** minutes **. &COUNT &IAT = 4. the DEPART block. LINES = 5.5 &MEAN = 3. The purpose of the DEPART block is to signal the end of data collection for an individual SIMULATE Define Ampervariables INTEGER REAL LET LET LET LET Write Input Data to File PUTPIC FILE = OUT.6 &LIMIT = 1000 Mean interarrival time Mean service time Standard deviation of service time Number of customers to be served GPSS/H Block Section GENERATE QUEUE QUEUE SEIZE DEPART ADVANCE RELEASE DEPART TEST GE BLET TER TERMINATE RVEXPO (1. we want to measure the system response time – that is. &MEAN. 4. &MEAN.** minutes **. &LIMIT) **. &IAT) SYSTIME LINE CHECKOUT LINE RVNORM(1. add 1 to counter . at the point where the transactions complete their processing.
38
START
&LIMIT
Simulate for required number
Write Customized Output Data to File PUTPIC FILE = OUT, LINES = 7, (FR (CHECKOUT) / 1000, QM (LINE), QT (SYSTIME), &COUNT/N(TER), ACL, N(TER)) Server utilization Maximum line length Average response time Proportion who spend four minutes Or more in the system Simulation run length Number of departures END Figure 4.11 GPSS/H program for single – server queue simulation. .*** ** **.** minutes .*** ****.** minutes ****
transaction. The QUEUE and DEPART block combination is not necessary for queues to be modeled, but rather is used for statistical data collection. The next QUEUE block (with name Line) begins data collection for the waiting – line before the cashier. The customers may or may not have to wait for the cashier. Upon arrival to an idle checkout counter or after advancing to the head of the waiting line, a customer captures the cashier as represented by the SEIZE block with the resource named CHECKOUT. Once the transaction representing a customer captures the cashier represented by the resource CHECKOUT, the data collection for the waiting line statistics ends, as represented by the DEPART block for the queue named LINE. The transaction’s service time at the cashier is represented by an ADVANCE block. RVNORM indicates “random variable, normally distributed.” Again, random – number stream 1 is being used, the mean time for the normal distribution is given by ampervariable & MEAN, and its standard deviation is given by ampervariable & STDEV. Next,/ the customer gives up the use of the facility CHECKOUT with a RELEASE block. The end of the data collection for response times is indicated by the DEPART block for the queue SYSTIME. Next, there is a TEST block that checks to see if the time in the system, M1, is greater than or equal to 4 minutes. (Note that M1 is a reserved word in GPSS/H; it automatically tracks transaction total time in system.) In GPSS/H, the maxim is “if true, pass through.” Thus, if the customer has been in the system 4 minutes or longer, the next BLET block (for block LET) adds one to he counter & COUNT. If not true, the escape route is to the block labeled TER. That label appears before the TERMINATE block, whose purpose is the removal of the transaction from the system. The TERMINATE block
39 has a value “1” indicating that one more transaction is added toward the limiting value, or “transactions to go.” The control statements in this example are all of those lines in Figure 4.11 that precede or follow the block section. (There are eleven blocks in the model from the GENERATE block to the TERMINATE block). The control statements that begin with an asterisk are comments, some of which are used for spacing purposes. The control statement SIMULATE tells GPSS/H to conduct a simulation; if omitted, GPSS/H compiles the model and checks for errors only. The ampervariables are defined as integer or real by control statements INTEGER and REAL. It seems that the ampervariable & COUNT should be defined as an integer; however, it will be divided later by the number of customers to obtain a proportion. If it were integer, the result of an integer divided by an integer would be truncation, and that is not desired in this case. The four assignment statements (LET) provide data for the simulation. These four values could have been placed directly in the program; however, the preferred practice is to place them in ampervariables at the top of the program, so that changes can be made more easily, or the model modified to read them from a data file. To insure that the model data is correct, and for the purpose of managing different scenarios simulated. It is good practice to echo the input data. This is accomplished with a PUTPIC (for “put picture”) control statement. The five lines following PUTPIC provide formatting information, with the asterisks being markers (called picture formatting) in which the values of the four ampervariables replace the asterisks when PUTPIC is executed. Thus, “**.**” indicates a value that may have two digits following the decimal point. Mean interarrival time Mean service time Standard deviation of service time Number of customers to be served Server utilization Maximum line length Average response time Proportion who spend four minutes Or more in the system Simulation runlength Number of departures 4.50 minutes 3.20 minutes 0.60 minutes 1000 0.676 7 6.33 minutes 0.646 4767.27 minutes 1000
Figure 4.12 Customized GPSS/H output for singleserver queue simulation. The START control statement controls simulation execution. It starts the simulation, sets up a “termination togo” counter with initial value its operand (&LIMIT), and controls the length of the simulation.
40 After the simulation completes, a second PUTPIC control statement is used to write the desired output data to the same file OUT. The printed statistics are all automatically gathered by GPSS. The first output in the parenthesized list is the server utilization. FR (CHECKOUT)/1000 indicates that the fractional utilization of the facility CHECKOUT is printed. Since FR (CHECKOUT) is in parts per thousand, the denomination is provided to computer fractional utilization. QM(LINE) is the maximum value in the queue LINE during the simulation. QT(SYSTIME) is the average time in the queue SYSTIME. & COUNT/N(TER) is the number of customers who had a response time of four or more minutes divided by the numbers of customers that went through the block with label TER, r N (TER). AC1 is the clock time, whose last value gives the length of the simulation. The contents of the custom output file OUT are shown in Figure 4.12. The standard GPSS/H output file is displayed in Figure 4.13. Although much of the same data shown inj the file OUT can be found in the standard GPSS/H output, the custom file is more compact and uses the language of the problem rather than GPSS jargon. There are many other reasons that customized output files are useful. For example, if 50 replications of the model are to be made and the lowest, highest, and average value of a response are desired, this can be accomplished using control statements with the results in a very compact form, rather than extracting the desired values from 50 standard output reports. 4.6 Simulation in CSIM
CSIM is a system for using the C or C ++ language for modeling, along with a rich library of predefined objects to support processoriented simulation modeling. It is an exepensive commercial product sold and maintained by Mesquite. Software [Shwetman, 1996]; it has a wide user base in industry and academia, principally to model computer and communication systems. CSIM is fast, owing to careful implementation and being a compiled language. * quired customers, it calls the wait function associated with CSIM event done. This causes it to suspend until done is set by the last customer process of interest. The call to done. Set ( ) in turn releases sim to call Report Generation to give its report. Our CSIM implementation of Report Generation can be essentially that illustrated in Figure 4.7, with the exception of calling CSIM provided facility routine util to get server utilization, and resp to get the average response time : double RHO double AVGR = = f. util ( ); f. resp ( )
CSIM bridges the gap between models developed in pure C ++ and models developed in languages specifically designed for simulation. It provides the flexibility offered by a general programming language, with essential support for simulation.
Outputs from different scenarios can be compared graphically or in tabular form. A recent addition to the Arena family of products is OptQeust for Arena. 1999]. Standard. generally they have many things in common. Some of the statistical analysis modules are described in Section 4. For animation. The Arena Business Edition is targeted at modeling business processes and other systems in support of highlevel analysis needs. Almost all offer dynamic business graphing in the form of timelines. A few offer both scaledrawing and schematic – type animations. plus a variety of other analysis methods. Most provide statistical analyses that include confidence intervals for performance measures and comparisons. The Arena Standard Edition is designed for more detailed models of discrete and continuous systems. Modules are represented by icons plus associated data entered in a dialog window. In virtually all packages.7. In .1 Arena Arena Business. and clerks. A few also allow event scheduling and mixed discrete – continuous models.8. It represents process dynamics in a hierarchical flow chart and stores system information in data spreadsheets. 4. Simulation models are built using graphical objects called modules to define system logic and physical components such as machines. The Arena template is the core collection of modules providing general – purpose features for modeling all types of applications. an optimization software package (discussed in Section 4.7 Simulation Packages All the simulation packages described in later subsections run on a PC under Microsoft Windows 95/98 and/or NT.41 4. operators. and Professional Editions are offered by Systems Modeling Corporation [Sadowski and Bapat. Common characteristics include a graphical user interface. Although in terms of specifics the packages all differ. and pie charts. Modules are organized into collections called templates. Some also run on various UNIX workstations and a few on Apple machines. while other emphasize iconic – type animations based on schematic drawings or process flow diagrams. animation. Arena can be used for simulating discrete and continuous systems. These icons are connected to represent entity flow. Arena employs an object based design for entirely graphical model development.2). simulated results may be displayed in tabular or graphical form in standard reports and interactively while running a simulation. All the packages described here take the process – interaction world view. and automatically collected outputs to measure system performance. some emphasize scale drawings in 2 – D or 3D. bar charts. It has built R – in activitybased costing and is closely integrated with the flowcharting software Visio .8. First released in 1993.
trucks and cars. such as resources. conveyors. process logic.2) automate comparison of different design alternatives. and other graphics. the Arena template includes modules focused on specific aspects of manufacturing and material handling systems. For example. performance metrics. Visio. speed. The Output Analyzer and Process Analyzer (discussed in Section 4. automated storage and retrieval systems. process logic. data. through its builtin continuous modeling capabilities. . and system data. such as process and interarrival times. The Arena Professional Edition enhances Arena SE with the capability to craft custom simulation objects that mirror components of the real system. power and free conveyors. to standard features. For animating simulation models. Arena’s 2D animations are created using Arena’s builtin drawing tools and by incorporating clipart. Arena’s core modeling constructs are accompanied by standard graphics for showing queues. At the heart of Arena is the SIMAN simulation language. width. and animation. Photoeyes have blocked and cleared timeouts that facilitate modeling of detailed conveyor control logic. such as pharmaceutical and chemical production. Sections are defined by length. AutoCAD. It includes the Auto Mod simulation package. namely Arena Call Center and Arena Packaging. With its Tanks and Pipes module. bridge cranes. the conveyor template contains conveyor sections. All the movement templates are based on a 3D scale drawing (drawn or imported from CAD as 2D or 3D). and kinematics for robotics. plus other specialized parameters.8. The Arena family also includes products designed specifically to model call centers and highspeed production lines. The main focus of the AutoMod simulation product is manufacturing and material handling systems. Arena SE can also be used to model combined discrete/ continuous systems. resource status. including terminology. stations for load induction or removal. 1999].2 Auto Mod The Auto Mod Product Suite is offered by Auto Simulations [Rohrer. it also supports continuous modeling of fluid and bulk material flow. and photoeyes. humans walking or pushing carts. queues. 4.42 addition. The Path Mover vehicle system can be used to model lift trucks. automated guided vehicles. acceleration and type (accumulating or nonaccumulating). motors. Auto Mod has built – in templates for most common material handling systems.7. including vehicle systems. and AutoView for making AVI movies of the builtin3D animation. All the components of a template are highly paramterized. Arena’s Input Analyzer automates the process of selecting the proper distribution and its parameters for representing existing data. and entity flow. AutoStat for experimentation and analysis.
1998]. or rotate the 3D world. many parameterdriven. QUEST models are based on 3D CAD geometry. The user can freely zoom. conveyor. vehicles and queues). Robots and workcells simulated in IGRIP and ERGO Sim can be imported into QUEST models. pan. QUEST (Queuing Event Simulation Tool) is a manufacturingoriented simulation package. conduct experimentation. A QUEST model consists of elements from a number of element classes. loads (products. Loads can move between processes with or without using movement systems. parts and process. executive action statements in each process. or to wait for user – specified times. etc. loads may use a conveyor or vehicle in a movement system. Parts may have a route and control rules to govern part flow. 4. existing robot work cell models and robot or other complex machinery cycle times can be directly imported to Deneb/QUEST. and perform analyses. Deneb also offers a number of workcell simulators including IGRIP for robotics simulation and programming and ERGO Sim for ergonomics analyses. Builtin element classes include AGV and transporters. To move between processes. Its 3D animation can be viewed from any angle or perspective in real time. power and free conveyors. described in Section 4. Each model must contain one process system and may contain any number of movement systems. automated guided vehicles. model of human operators in a workcell developed in Deneb\ERGO Sim can be incorporate into a QUEST process model both visually and numerically. kinematics. Deneb/QUEST’s Simulation Control Language can be used. Auto Mod contains a full simulation programming language. Commonly needed behavior logic is selected from comprehensive menus.) move from process to process and compete for resources (equipment. Auto Stat. or a movement system based on one of the material handling templates.2. For unique problems. works with Auto Mod models to provide a complete environment for the user to define scenarios. The load is the active entity.43 In addition to the material handling templates. QUEST combines a simulation environment with graphical user interface and material flow modules for labor. An Auto Mod model consists of one or more systems. For Deneb/IGRIP users. and automated storage and retrieval systems. parts. This .3 Deneb/QUEST QUEST is offered by Deneb Robotics [Donald. Each element has associated geometric data and parameters that define its behavior. in which flow and control logic are defined.7. It offers optimization based on an evolutionary strategies algorithm.8. In the Auto Mod world view. buffer. conveyors. labor. A system can be either a process system. Processes can contain complex logic to control the flow of either manufacturing materials or control messages. operators. Similarly. to contend for resources. machine.
[Krahl. Extend comes with a compiled Clike simulation programming language called Modl. Extend comes with a large set of elemental blocks. Thirdparty developers have created Extend libraries for vertical market applications. user interface. 4. called items. a firm could build a set of customized blocks representing various components of their manufacturing facility. are available. It contains simulation support. Collections of blocks can be grouped into a hierarchical block representing a submodel such as a particular machine. Connectors are also used for “value flows” – that is.44 structured simulation programming language provides distributed processing with access to all system variables. pulp and paper processing.4 Extend Extend offered by Imagin That. Elemental blocks in Extend include Generator (for arrivals). for attaching a calculation to a block parameter or retrieving statistical information from a block for reporting purpose. Extend combines a block diagram approach to model building along with an authoring environment for creating new blocks or complete vertical market simulators. Extend has an open architecture. and Exit.7. Queue. It is process oriented but it also capable of continuous and combined modeling. and online help. End users can build models by placing and connecting blocks and filling in the parameters on the dialog window associated with a block. In this way. such as manufacturing and BPR (business process reengineering). are created at Generator blocks and move from block to block by way of connectors. as well as support for custom user interfaces and message communication. Activity. SCL allows expert users to define custom behaviors and to gain control over the simulation. Using this capability. Resource Pool. parameters. in addition. libraries of blocks for general and specific application areas. a higherlevel block diagram can be displayed to the end user. . a workstation. hiding many of the details. and radiofrequency analysis. Deneb/QUEST’s open architecture allows the advanced user to perform batch simulation runs to automatically collect and tabulate data using the Batch Control Language (BCL). the active entities. so that in most cases the source code for blocks is available to advanced model builders. 1999]. or a subassembly line. For creating new blocks. Each block has an icon and encapsulates code. Parameters from the submodel network of blocks that an end user desires to control can be grouped and displayed at the level of the hierarchical block. Replications and parameter optimization are controlled with batch common files. In Extend. including supply chain analysis chemical processing. It provides iconic animation of the block diagram plus an interface to Proof Animation [Henriksen. Inc. 1999] from Wolverine Software for 2D scale – drawing animation.
Pro Model’s runtime interface allows a user to define multiple scenarios for experimentation. In addition.8. Taylor ED . The animation is iconic and is based on the flowchart representation. health care. Resources are used to represent people. a flow – chart – based simulation product for business processes. retail. Some systems can be modeled by selecting from Pro Model’s set of highly parameterized modeling elements. the network can have branching logic. The modeling elements in ProModel are parts or entities. It is a simulation and animation tool designed to model manufacturing systems. tools or vehicles that transport parts between locations. [Bloechle and Laughery. The routing and processing element allows user – defined procedural logic in Pro – Model’s simulation programming language.7. Inc. Taylor II. such as computing confidence intervals. Resources may travel on path networks with given speeds. resources. It is built on different concepts than its predecessor package. Through menus and parametrized icons. With Micro Saint. 4. and military applications.7. Pro Model has manufacturing – oriented modeling elements and rule – based decision logic. its simulation programming language provides for modeling special situations not covered by the built. a variant of the genetic algorithm approach.like perspective view. 4. or perform maintenance on a location or other resource that is down. and conditional task execution. locations. routing and processing logic. and Process Model. 1999]. it is based on an evolutionary strategy algorithm. sorted queues.7. 1991].5 Micro Saint Micro Saint is offered by Micro Analysis and Design. accelerations. 1999]. Micro Saint is used in manufacturing. and pick up and setdown times. path networks.) adds the capability to perform an optimization. The company also offers MedModel for health care systems. It supports ergonomics and human performance modeling. Sim Runner (discussed in Section 4. and arrivals.2. perform an operation on a part at a location. Parts arrive and follow the routing and processing logic from location to location.6 Pro Model Pro Model is offered by PROMODEL Corporation [Price and Harrell.45 The statistics library of blocks is used to collect and analyze output data. Pro Model offers 2D animation with an optional 3D.7 Taylor ED Taylor Enterprise Dynamics (ED) is offered by F & H Simulations [Hullinger. Service Model for service systems.in choices. 4. It works with Opt Quest to provide optimization capability. a model builder develops a model by creating a flowchat diagram to describe a network of tasks.
a report. It offers both 2D and 3D animation. Taylor ED includes both an experiment module and the Opt Quest Optimizer (discussed in Section 4. a table. Model builders can access standard libraries of atoms as well as create new atoms using Taylor ED’s Atom Editor. 4. tanks and pipes. An atom is an object with four dimensions (x. to each atom by editing its parameter fields. a workcell can be created by using the Atom Editor or by combining several existing atoms. 1999]. The machine element can be single. and rotation and dynamic behavior over time. Next the user connects the atoms and defines the routing of products or entities (also atoms) flowing through the model. The behavior of each element is described on a tabbed detail from in the WITNESS user interface. Each atom can have a location. and time). batch. . Next the use assigns logic. Taylor ED is based on the concept of an atom. Atoms are used to represent the products or entities flowing through the system as well as the resources acting on these entities. assembly. speed. including routing logic. atoms can be created and destroyed. The 2D graphics offers a walkthrough capability controlled by a mouse or a camera attached to an entity. included in a standard atom library. production. It can also be used to monitor flow processes in real time. One of the hallmark characteristics of the atom is its reusability. a graph. Elements may be combined into a designer element module to be reused. In fact. werehousing. Atoms are Taylor ED’s smart objects and modelbuilding resources. Atoms can inherit their behavior from other atoms and contain other atoms. then reused in a new model or shared with other Taylor ED modelers. multisation or multicycle. For example. It offers a 2D layout animation plus a process flow view. z.8. WITNESS models are based on template elements.7. everything in Taylor ED is an atom. or a library. WITNESS is strongly machine oriented and contains many elements for discrete part manufacturing. a user first creates a model layout by selecting atoms from the atom library and placing them on the screen. It also contains elements for continuous processing such as the flow of fluids through processors.46 is used to model manufacturing. and material handling processes plus service and data flow processes. a record. whether it is a resource. a product.8 WITNESS WITNESS is offered by The Lanner Group [Mehta and Rawles. To build a model. y. Atoms can be viewed simultaneously in 2D and 3D animation. a model (or submodel).2). The workcell can be saved as an atom.
comparison of multiple systems. and scatter search. it does internal batching (both within and across replication. Advances in the field of metaheuristics have offered new approaches to simulation optimization.47 4. In recent years. independent and normally distributed data sets.2 Analysis Tools This section briefly discusses the Arena Output and Process Analyzers AutoStat for AutoMod. usually a cost or costlike function that incorporates the trade – off between additional throughput and additional resources. as well as data export to spreadsheet and other external applications. neural networks.8 4. charts. The Output Analyzer provides confidence intervals. and OptQuest. with no user intervention) and data truncation to provide stationary. Until recently. Arena’s Output and Process Analyzer Arena comes with the Output Analyzer and Process Analyzer. make the desired runs. and warm up determination to reduce initialcondition biases. most packages provide scenario definition.8. tabu search. To support analysis. based on artificial intelligence.1 Experimentation and Statistical Analysis Tools Common Features Virtually all simulation packages offer various degrees of support for statistical analysis of simulation outputs. Optimization is used to find a “near – optimal” solution.8. run management capability. evolutionary strategies. The user must define an objective or fitness function. which is used in a number of simulation products. It allows a use to define scenarios. To compute accurate confidence intervals. and histograms. 4. In addition. Arena uses Opt Quest for optimization. It allows an arbitrary number of controls . many packages have added optimization as one of the analysis tools. genetic algorithms. The Process Analyzer adds sophisticated scenariomanagement capabilities to Arena for comprehensive design of experiments. the methods available for optimizing a system had difficulty coping with the random and nonlinear nature of most simulation outputs. smoothes responses. and analyze the results. It creates various plots. Sim Runner for ProModel. and performs correlation analysis.
because AutoStat archives and compresses the standard and custom outputs from all runs. an end user can define any number of scenarios by defining factors and their range of values. or any other numerical inputs typically specified in a data file. a user can experiment with. where the definition of “unusual” is user – definable. and optimization using an evolutionary strategy. This is especially useful in multifactor analysis and optimization. Any standard or custom output can be designated as a response. Opt Quest . New responses can be defined after runs are made. Auto Stat also works with two other products from Auto Simulations: the AutoMod Simulator. for example. The evolutionary strategies algorithm used by AutoStat is well suited to finding a nearoptimal solution without getting trapped at a local optimum. a spreadsheet – based jobshop simulator. AutoStat also has a diagnostics capability that automatically detects “unusual” runs. and AutoSched AP. Various charts and plots are available to provide graphical comparisons. AutoStat provides a number of analyses. minimum and maximum) and confidence intervals. absolute and comparison confidence intervals. Responses can be added after runs have been completed. Factors include single parameters such as resource capacity or vehicle speed. A user can view 2D and 3D charts of response values across either replications or scenarios. alternate production schedules. AutoStat AutoStat is the run manager and statistical analysis product in the AutoMod product family [Rohrer.48 and responses. a rule – based simulation package for finite – capacity scheduling in the semi conductor industry. single cells in a data file. It will rank scenarios by any response and provide summaries and statistical measures of the responses. By allowing a data file to be a factor. AutoStat computes descriptive statistics (average. and complete data files. Support for multiple machines and CPUs gives users the ability to make many more runs of the simulation tan would otherwise be possible by using idle machines during off hours. With AutoStat. both of which may require large numbers of runs. standard deviation. design of experiments. For each defined response. customer orders for different days. 1999]. different labor schedules. sensitivity analysis. AutoStat is capable of distributing simulation runs across a local area network and pulling back all results to the user’s machine. including warm up determination for steadystate analyses.
responses. CSIM. implying that the emulation is nearly the same as that which is being modeled. Micro Saint. Those factors that have no significant effect can be eliminated from the search for an optimum. In its Stage One Optimization Analysis. in some ways similar to genetic algorithms. any set of conditions that can be represented by a mixedinteger programming formulation. If . [Glover et al.. 4. SimRunner Sim Runner works with ProModel [Prive and Harrell. European Council. In terms of manufacturing and material handling. It is available for Arena. 1999].1 HighFidelity Simulation Highfidelity simulation is exceptional graphics quality and very accurate emulation.9 Trends in Simulation Software This section is based on a plenary address given by Banks [2000] to the European Simulation MultiConference 2000. Ghent. 1999]. Many of the remarks are reproduced here with the permission of the Society for Computer Simulation International.49 Opt Quest was developed by Fred Glover. and a neural network component. tabu search with adaptive memory. Sim Runner performs a factorial design of experiments to determine which input factors have a significant effect on the objective function. the trends predicted here may be little more than more speculation! 4. i.9. Belgium. a user defines an objective function to minimize or maximize. When using OptQuest. and combinations of parameters – in fact. Inc. and Taylor ED. However. Scatter search is a population based approach. Opt Quest is based on a combination of methods: scatter search. it looks and acts like the real thing. the model is in the computer and the actual object is real. Simulation examples include throughout or a cost function.e. a virtual factory. existing solutions are combined to make new solutions. Tabu search is then superimposed to prohibit the search from reinvestigating previous solutions and neural networks to screen out solutions likely to be poor. University of Colorado and cofounder of Optimization Technologies. and a virtual warehouse. Its optimization is based on evolutionary strategy. The Stage Two Simulation Optimization uses the evolutionary strategy algorithm to conduct a multivariable optimization search.. The term “Virtual” is often used. consider a virtual machine. Opt Quest allows a user to specify the range of variable parameters as well as constraints on parameters. Since it is difficult to predict software developments for even one year. a variant of the genetic algorithm approach. A user specifies an objective function (a response to minimize or maximize) and the input factors to vary. QUEST.
fork trucks and cranes. Of course. etc. This data exchange format could emerge as a standard. you will need to buy the grinder. XML is a set of rules. for exchanging complex data objects between tasks in a distributed workflow application. It aids in putting information on the Web and in the retrieval of that information. This interface adds value in that it can cut considerable Time from the process of creating detailed layouts in the simulation tool and defining equipment properties (such as conveyor speeds.9. Another dimension of high fidelity simulation is to make it selective. You don’t have to spend $1.000 for a modern centerless grinder. all typically found in automotive plants and distribution centers. AGVs. you could set the dial on high and get the opposite result. A project coordinated through the Manufacturing Engineering Laboratory at the U. You could also set the dial between the two extremes. it you want to make bearings. If the machine is updated. 4. you just simulate it in the computer to study its operation. it is just imported through SDX. You could have varying levels of detail. SDX is not the only data exchange format vying for attention.) The interface is best applied to applications that have a significant amount of automated material handling equipment such as conveyors. or conventions for designing text formats for data such that the files are easy to generate and read.50 you are looking at a virtual machine on your computer monitor. Or. it looks very much like that machine. you could set the dial on low. S.000. guidelines. Rather than redraw the conveyor system with all of its parameters. Several simulation software firms have worked with EAI to accept SDX. National Institute of Standards and Technology is to “explore the use of XML as a standard for structured document interchange on the Web. Inc. they are unambiguous. David Sly (1999) of EAI says: The main function of the tool is to communicate to the simulation Package all that is known about the layout in an effort to reduce the Redundant tasks of redefining equipment in the layout importation To the simulation tool and that equipment’s interconnectivity and Attributes. (EAI). has developed a simulation interface called SDX for Simulation Data Exchange. If you wanted the model to run fast and the animation and solution to be approximate. and they are extensible.2 Data Exchange Standards Engineering Animation Incorporated. XML has a large and growing community. He Worldwide Web Consortinum (W3C) is developing XML for extensible markup language.” . it is only necessary to update the simulation model.
Indeed. which is independent of the computer and has applets for displaying results. a robot manufacturer could contribute a module for a specific type of robot. This requires that a format can be designed and accepted by numerous software vendors. groups are developing XML standards for all types of documentation. The firm with more prebuilt models will be able to answer questions faster – but may have more outofdate models. The interface can be in Java. Another way that we can use the Internet is to have models run on many computers. The new paradigm is to have models built at different levels of detail. 4. This will speed up the response time. Eventually.5 Component Libraries Consider component libraries stored in a neutral file format. the computing power can be greatly extended via the Internet by distributing the computational needs. The result of having module libraries is more rapid development of models. The interface can be at the client (local computer). The modules could be prepared so that all that they require is parameterization.9.9. Thus. System providers could be contributors of modules. it takes time to build models in response to questions. since the model already exists. some group will want to develop XML standards for representation of manufacturing and material handling systems.9.9. That would be called the old paradigm. Under the new paradigm. if the model is extremely large or if many replications are needed. The server can always have the latest version of the model.4 Old Paradigm versus New Paradigm In the past. For example. model maintenance becomes a big issue. 4. the models become an asset. It is at the software vendor’s or some other host’s site. with the models run on a server. Currently. this server is not in a local area network (LAN). 4. the speed of Java is not sufficient to serve as the simulation engine. But.6 Distributed Manufacturing Simulation/High Level Architecture .51 So. However. which is in itself a challenge. 4.3 The Internet The Internet can deliver modeling capability to the user. models were always constructed with a limited purpose in mind and to answer specific questions. but without knowing all of the questions to be asked.
or nonlinear). The results are fed back to the user’s computer. S. or nonlinear). That is approximately one month of elapsed time. HLA has been designed so that the minimum amount of information is exchanged between the various simulations sufficient to effect clock synchronization and the exchange of data objects. For example. This technology is collectively called High Level Architecture (HLA). the number of constraints on the solution space. the type of constraints (simple bound. The time can be decreased by using fractional factorial experiments to reduce the number of combinations.8 Optimization The main problem with optimization is that of computer time. the models may be at different levels of fidelity. if there are ten computers available on your network. Further. linear. Department of Defense (DOD) began a development process to enable various simulations located throughout the world to exchange data dynamically during simulation of largescale military exercises. 4. It is anticipated that there will be many other cases in which the simulation becomes invisible. but interacting over the Internet. currently in use by at least one software vendor. the U. There can be aircraft maneuvers simulated in one computer model. The user might not know that the output resulted from a simulation. assume that the optimization algorithm calls for 1000 scenarios (not unusual).52 Many years ago. ground troops in yet another. The computers hosting these models are geographically dispersed. This is known as distributed simulation.9. For example. Decision makes usually do not have the luxury of this amount of time. . roughly ten times as many runs can be made overnight or over the weekend. the user would see the anticipate result of that policy.000 minutes. and a very short time later. It takes a lot of it when running an optimization on a complex model. This already happens in simulationbased scheduling. tanks simulated in another. The technology has matured to the point where it can now be tried in other domains. and the type of objective function (linear. Assume that a simulation takes 10 minutes per replication and that 5 replications are conducted at each combination of factor values. a policy could be entered.7 Embedded Simulation Embedded simulation occurs when simulation models are placed in other software. This is related to the number of variables. To obtain a nearoptimal solution would take 50. the types of variables (discrete or continuous). in maintenance management software.9. and the supply chain in still another. Also. quadratic. is to distribute the simulation runs over the computers on a local area network. 4. Another technique.
J. VA.” Proceedings of the 1998 Winter Simulation Conference. Washington. Manivannan. Carson. Belgium. optimization is an area that will continue to receive attention.53 As far as simulation research is concerned.. REFERECNES Banks. . N. [2000]. J. “The Future of Simulation. S.. Dec.” Proceedings of the European Simulation MultiConference. “The Future of Simulation Software: A Panel Discussion. J. D. S. June. May 2326. eds. E. BANKS. Getting Started with GPSS/H. “Interpreting Software Checklists. J. Watson. 1316. BANKS. 2d ed. J. [1996]. Wolverine Software Corporation. [1998]. to appear. AND J.” OR/MS Today. Annandale.. SY [1995]. Medeiros. Ghent. BANKS. J. J. DC. CARSON.
The Possible values of X are given by the range space of X.d. Proportion of p. 2.v. Or countable infinite.v. of the r. if X is continuous r.m. Note: Let X be a discrete r. measures the probability that the r.v. P(xi).f. X is called a continuous r. equals the value of x.f.l. Cumulative distribution function (edl) : The edf. P(X) = P (X=x) gives the probability that r. of possible values of is finite. f (x) is called the p. X is called a discrete r. v. v.54 5 Statistical Models in Simulation Review of terminology and Concepts 1. for a continuous r. Continuous r. That is . P (a < X < b) = f(x) dx The function. (i) f(x) > 0 Ax E Rx (ii) f ( x)dx 1 (iii) P(X=x) =0. denoted by F(x).) of X.v.X assumes value less than or equal to x. (iv) P(a<X<b)=P(a<X<b)= P(a<X<b) 3. v. The collection of pairs (xi.X. I = 1. If the no. v.2. denoted by Rx. X. the probability that X lies in the interval [a.] is given by. b.… is called the probability distribution of X. : If the range space Rx of the random variable X is an interval or collection of intervals. and P (Xi) is called the probability mass function (p.d.v. v. Discrete random variable: Let X be a r.
p(x) = if x is discrete if x is continuous Lim F(x) = 0 x. denoted by E (X). is defined by V(X) = E[XE(X)]2 = E (X2) – (E(X))2 . X. is given by E (X) = E x. for discrete r.f(x)dx E (X) is also called mean of X. The variance of r. Expectation and variance : If X is a r. 4.55 F(x) = P (X < x). x. P(a< X < b) = P (a< X < b) = F (b) – F (a). v. P (a< X < b) = F(b) –F (a) (iv) For continuous r. v. If X is discrete.f(x) = x. then F(x) = f (x) dx Proportion of cdf : (i) (ii) (iii) if a < b. the expected value of X.. X.P(x) If x is discrete x. v. F(a) < F(b) lim F(x) = 1. then F(x) = P (xi) If X is continuous. denoted by v(x) or o2. It is also denoted by . v.
v. v. Berroulli r.p + o2. Note : Let X1. P(X =1) = p and P (X = 0)= q E (X) = 1. X that denotes the no. In the continuous case.d = V ( x) 0 Mode: In the desecrate case.p x = 1. 3. X2.2… . We have.. Geometric Distribution : Let X be the no. Bernoulli distribution let X = 1 if a Bernoulli trial results in success. : P (x) = P (X=x) = q x1.2….p + 0. V(X) = npq.q = p V (X) = [12 . E(X) = np. Binomial distribution : The r. Then X = X1+ X2+….q] – p2 = p – p2 =pq 2. Standard deviation = s. vs each with mean p and variance pq. Xn be n index. X > O if a Bernoulli trial results in a failure. the mode is the value of the r. n.Xn follows Binomial distribution. of success in n Bernoulli trials has a Binomial distribution given by P(x) = (n/x) Px qnx x = 0. Of trials requital to achieve the first success in a sequence of Bernoulli trials.56 V(X) is the measure of spread or variation of the possible values of X around mean E(X). the mode is the value at which the pdf is maximized Discrete Distribution 1.1. that occurs most frequently. ….
The local sales representative has determined. (a) What is the probability of zero arrivals in the next minute ? (b) What is the probability of zero arrivals in the next 2 Minutes ? . compute P(X1 +X2 > 2).57 E (x) = 1/p. of successes follows Poisson distribution. what is the probability that one or less results in an order ? 2. V(X) = q/p2 4.1. The Hawks are currently winning 0. a) What is the probability that the first order will come on the fourth sales call of the day ? b) If eight sales calls are made in a day. Arrivals at a bank teller’s cage are Poisson distributed at the rate of 1. What is the probability that they will win more games than they lose ? 3.2 per minute. Of Bernoulli trials becomes very large (n – oo) and probability of success becomes very small (p0) then X the no.55 of their games. For the random variables. from past experience. which are exponentially distributed with parameter L =1.… = E(x) = = V(x). We have P (x) = ex/x!’ x = 0. what is the probability of receiving exactly six orders ? c) If four sales calls are made before lunch. that 48 % of the sales calls will result in an order. Poisson Distribution: If the no. There are 5 games in the next two weeks. Graded Questions 1. An industrial chemical that will retard the spread of fire in paint has been developed. 4.2. X1 and X2.
. What is the probability that a random sample of 4000 will yield fewer than three ball bearing with bubbles or depressions ? 8. and completely at random at a mean rate of one per week. independently. can be used to approximate the binomial distribution when n is large and p is small . for an exponentially distributed random variable. Accident at an industrial site occurs one at a time. What is the probability that no accidents occurs in the next three weeks ? 10. At 60 manths.9 P (X 4) 9. on the average.58 5.4x x>0 0 Otherwise (a) What is the probability that this satellite is still “alive” after 5 years ? (b) What is the probability that this satellite dies between 3 and 6 years from the time it is placed in orbit ? 7. in years of a satellite placed in orbit is given by the following pdf : F(x) = 0. Using the Poisson approximation. the battery is still operation. Records indicate that 1. (The Poisson distributior . what is the probability that three or fewer students will drop out of a random group of 200 entering students ? 6. The lifetime.8 % of the entering students at a large state university drop out of school by midterm. find the value of L that satisfies the following relationship : P (X 3) = 0.4e –0. Suppose that a DieHardly Ever battery has an exponential timetofailure distribution with a mean of 48 months. one in every 800 of the ball bearing has one or more of these defects. say p less than 0. It has been determined that. X.1 in utilizing the Poisson approximation.) In the production of ball bearings bubbles or depressions occur rendering the ball bearing unfit for sale. Let L = np.
tHe trip took 30 days. of the distribution : Normal (10. The grading time for each problem is exponentially distributed and the problems are independent of each year. The batteries failed instantaneously rather than gradually. in thousands of liters. 0.5 Three shafts are made and assembled in a linkage.0. The length of each shaft.09) Shaft 2: N(40. (a) What is the probability that the Professor will finish the grading in 2 ½ hours or less? (b) What is the most likely grading time? (c) What is the expected grading time? 1. Professor Dipsy Doodle gives six problems on each exam. what is the probability that three batteries would be a sufficient number to keep the Admiral warm? 13.16) Uniform (4. The daily use of water. Admiral Byrd packed three batteries. is distributed as follows: Shaft 1: N(60.59 11.16) 14. Find the probability that 6<X<8 for each.4) Triangular (4. The batteries had a life that was exponentially distributed with a mean of 12 days. When Admiral Byrd went to the north Pole. at the hardscrabble Tool and Die works follows a gamma distribution with a shape parameter of 2 and a scale parameter of ¼ . in centimeters. what is the probability that the demand exceeds 4000 liters on any given day? 12. Each problem requries an average of 30 minutes grading time for the entire class of 15 students. he wore batterypowered thermal wear.05) .10.
0.04 0. What proportion of assemblies are within the tolerance limits? [Hint : If (X1) are n independent normal Random variables.0080 0. v = 0.02 0.08 0. and if Xi has mean and variance o2I. (b) What fraction of batteries are expected to last longer than the mean life? (c) What fraction of batteries are expected to fail between 1. n i 1 i and variance n i 1 i2 ] The time to failure of a nickel –cadmium battery is Weibull distributed with parameter.5 years? 16. Naylor and finger in the AREA UNDER STANDARD NORMAL CURVE : Z 0.0 0.5 and 2. then the sum Y =X1 +X2+…+Xn Is normal with mean 15.60 Shaft3 : N(50.0199 0.07 0. 150.0319 0. B = ¼ .0040 0.21).5 years. and a = ½ years.0359 .05 0.09 0.0279 0.0 0. (a) Find the fraction of batteries that are expected to fail prior to 1.01 0.83.0160 0. Explain in detail the 3step approach of validation process.03 0.0000 0.06 0.0239 0.0120 0.11) (a) what is the distribution of the linkage? (b) What is the probability that the linkage will be longer than 150.2 centimeters? (c) The tolerance limit for the assembly are (149.
7 1.1700 0.4984 0.4505 0.4931 0.4959 0.4881 0.2580 0.4484 0.4842 0.4925 0.4573 0.4788 0.6 1.2939 0.040 0.4965 0.4756 0.2454 0.4686 0.4955 0.4332 0.4345 0.4115 0.0948 0.1103 0.2190 0.4913 0.3389 0.4982 0.0596 0.3810 0.4989 0.3729 0.2823 0.4357 0.4983 0.4732 0.4916 0.1 2.4871 0.2549 0.4177 0.9 1.2 2.2673 0.4974 0.2910 0.3531 0.4989 0.1985 0.4990 0.3508 0.4977 0.1331 0.4545 0.3599 0.4973 0.3133 0.4418 0.2794 0.3 1.4854 0.4582 0.3264 0.4893 0.2389 0.4864 0.4987 0.4986 0.4938 0.4726 0.4394 0.4719 0.4922 0.4463 0.4901 0.1664 0.4554 0.4808 0.0871 0.3770 0.8 1.4896 0.4927 0.3749 0.4972 0.3365 0.4826 0.4970 0.3790 0.2764 0.3 0.4778 0.2517 0.9 2.0638 0.4967 0.4535 0.4987 0.4963 0.4868 0.4251 0.2291 0.7 0.4306 0.2967 0.4625 0.3340 0.4964 0.4474 0.3708 0.4961 0.1950 0.9 3.4980 0.3289 0.4857 0.4940 0.9870 0.4918 0.1179 0.4830 0.2486 0.2224 0.4564 0.4671 0.1293 0.4525 0.4976 0.4429 0.1368 0.4147 0.3106 0.4452 0.1406 0.8 2.4875 0.2257 0.4265 0.4793 0.4969 0.5 1.4370 0.4495 0.4099 0.2357 0.2852 0.3980 0.4945 0.4803 0.4957 0.4984 0.1 1.4890 0.4 2.3643 0.4082 0.4649 0.3159 0.3849 0.4292 0.4943 0.0910 0.2422 0.4515 0.4699 0.4987 0.3944 0.2019 0.4934 0.4988 0.4162 0.6 0.4906 0.4850 0.3212 0.4817 0.4693 0.3907 0.4757 0.1443 0.4834 0.4192 0.4846 0.4656 0.4222 0.4066 0.3461 0.4382 0.1915 0.4960 0.2995 0.0675 0.2324 0.4861 0.4131 0.4878 0.8 0.3621 0.4049 0.4990 STATISTICAL MODELS IN SIMULATION .4744 0.4989 0.2054 0.3315 0.2642 0.2 0.1736 0.4 1.4798 0.4941 0.4951 0.2734 0.4981 0.4783 0.1517 0.4979 0.3869 0.3186 0.4988 0.0478 0.0438 0.0 2.4738 0.0 0.5 2.4641 0.3023 0.4761 0.4953 0.4974 0.4968 0.4686 0.1628 0.4932 0.4591 0.4884 0.3554 0.475 0.1554 0.4949 0.4936 0.0557 0.4904 0.3485 0.1064 0.4812 0.2 1.1879 0.4982 0.4887 0.4909 0.4985 0.4977 0.4207 0.1591 0.2157 0.4911 0.2611 0.4975 0.3438 0.3238 0.2123 0.4032 0.4616 0.4920 0.0 1.4015 0.61 0.4236 0.4929 0.4678 0.2881 0.1255 0.4279 0.4599 0.3830 0.7530 0.3051 0.1844 0.4319 0.4821 0.2088 0.4985 0.3686 0.2704 0.3925 0.7 2.3413 0.0517 0.4441 0.3685 0.1 0.3577 0.0832 0.4948 0.4978 0.4 0.4838 0.4898 0.5 0.4956 0.4952 0.1141 0.4713 0.1480 0.6 2.4706 0.4979 0.1772 0.3 2.1808 0.3888 0.1026 0.4966 0.4971 0.3078 0.0783 0.4986 0.0714 0.4633 0.3997 0.1217 0.4406 0.4772 0.4981 0.4962 0.4946 0.3962 0.4664 0.
& P (xi) is called the Probability more function (pmf) of X. Terminology & concepts.] is given by – P (a X b) = f ( x)dx (1) b a . discus random variables : let us consider X as a random variable. Let X be a discrete random variable with each possible outcome x. I=1. 1) P (Xi) 0 I 2) p( x ) 1 i i 1 The collection of pair (Xi. b. in Rx then P(x i) = P(x = xi)Gives the probability that the random variable equals the value of xi. I = 1. Continuous random variables: .2…. is called the probability distribution of X.Of the range space RX of the random variables X is an interest or a collection of intervals X is an interval or a collection of intervals. X is called a continuous random variable. 1.62 In real world phenomena these are few setuations where the actions of the entities with in the system under study can be completely predicted in advance. P(xi). The no. 2. Of the no of values of X is finite or countably inficiate then X is called a discrete random variable. For a continuous random variable X. P (Xi) ). the probability that X lies in the interval [a.2… must satisfy the following two conditions. An appropriate model can be developed by considering the samples of interest.
As a result eq n (1) for any specified value xo P (x = Xo) = Oxo x0 x0 f ( x)dx =0 .: f (x) dx = O .: P ( X = Xo) = o. b] . (a) f(x) > 0 for all x in Rx.63 The function f (x) is called the probability density function (pdf) of the random variable X. the pdf satisfies the following conditions. (b) Rx f(x) dx = 1 (c) F (x) = 0 if x is not in Rx. the following eqn becomes P(a X b) = P (a < x b) = P (a x < b) = P (a x < b) (2)  it can be graphically represented as :f(x) x=a x=b x the shaded area represents the probability that X lies in the interval [a.
ii) iii) it F (x) = 1 it f(x) = o the probability of X can be defined using cdf P (a< x b) = f (b) – f (a) . The value of the cdf is constant in the interval [xi1. that is F(x) = P (x < x) Of X is discrete then F (x) = p (xi) .(3) xi x Of X is continuous then F (x) = f (t )dt x f(x) dt (4) Some properties of the cdf are :i) F is a nondecresing f n of a<b then F(a) F(b). a < b . (4) Expectation: .(5) If X is a discrete random variable with possible values x1. x2. for discrete and continuous variables is defined as follows : E(X) = XiP (xi) is X is discrete & E (X) = (6) xif(xi) dx i if X is discrete. .the cdf is a stepfth.An important concept in probability theory is that of the expectation of a random variable of x is a random variable the expected value of x denoted by E (X).where x1<x2<…. denoted by F(x) measures the probability that the random variable X assumes a value less than or equal is X.64 3) Cumulative distribution function : the cumulative distribution function (Cdf).xi] and take the size of p (xi) at xi.
(10) Where E(x) is central tendency of a random variable. X. is defined to be the rquare root of the variance . the quantity E (Xn).65 E(X) = XiP (xi) is X is discrete & E (X) = (7) xf(x) dx if X is continuous  The expected value E(x) of a random variable X is also referred to as the mean X. or the first moment of X. is The variance of x measures the expected value of the rquared difference between the random variable & its mean. (11) . n>1. V(x) is a variation of the possible values of X around the mean E(x). denoted by V(x) or var ( X) or defined by V(X) = E [X –E(x) 2] A useful identify in computing V(X) is given by V(X)=E (X2) – [ E(X) 2 ] . o2 the mean E(X) & std deviation v(x) (11) is defined by eqn. Is called the Nth moment of X & is computed as follows : E (Xn) = Xn P (Xi) i if X is discrete (8) & E (Xn) = X n f(x) dx if X is Continues (9) the variance of a random variable. The standard deviation.
Of the modal value occurs at two values of the random variable.66 (5) The Mode :. The gamma and weibull distibutions are also used to model interarrival and service times. 1) Queuing Systems: . ii) iii) The time between demands: The lead time .in a reliability model. in the continuous case. interarrival and service times are given. But these are several possibilities. Useful statistical models In a queucing system. 2) i) Inventory Systems :. interarrival and service times are often probabilitic.In the queuing examples. In an inventory model. At may be possible that the service times are constant but some random variability causes fluctuations in either a positive or negative way. the mode is the value of the random variable that occurs most frequently. Gamma and welbull distributions involve the location of the models of the pdf’s and shapes of these fails for large & small times. the distribution is said to be bimodal. In each of these instances the simulation analyst desires to generale random extents and to use a known statistical model if the underlying distribution can be found.In realistic inventory systems there are three random variables: the no of units demanded per order or per line period. The mode may not be unique. Service times may be constant or probabilitic. The difference between the experential. the expenetial distribution is often used for simulation purpose. Of service times are completely randam. the time to failure may be probabilistic. the time between demand and had times may be probabilitic . The experential distribution has its mode at the origin but the gamma & weibull distributions have there modes at some pt (>o) which is a function of the parameter values selected. the mode is the value of which the pdf is marimized. The times between arrivals and service times were always probabilistic time or a constant service time.In the discrete case.
which is a special case of the –ve benomical. The fail of the passion distribution is generally shorter than that of the negative binomial. Beta distribution provides a variety of distributional farms an the unit intervals 5) Other Distributions :. 3) Reliability and Maintainability :. the –ve binomical distribution may be appropriate. Hence. Including the expenential. maximum & modal values of the random variable.In many instances simulations begin before data collection has been completed. gamma & weibull. the time to failure distribution may be modeled as expenential. fewer large demands will occur if a poisson model is used than if a negative binomial distribution is used. The poison distribution is often used to model demand becouse it is simple. Is for the same set. triangular & beta distributions. Of demand data are characterized by a long. The geometric distribution. These are the uniform. The gamma distribution arises from modeling standlay redundancy where each component has an expenential time to failure. but no information is immediately available about the distribution the triangular distribution can be used when atsumptions are mode about the minimum. The bernouli & binomial distributions are two discrete distributions which may describe phenomena of interest. given that affeart one demand has occurred. has its mode at unity.67 In very simple mathematical models of inventory systems demand is a constant over time & lead time is zero or a constant. 4) Limited Data :. it is extensively tabulated & it is well known. If only random failures occur. demand occurs randomly in time. The weibull distribution has been extensively used to represent time to failure & he nature is such that it may be made to approcimate many obsorved phenomena. Three distribution have application to in complete or limited data. .Several other distributions may be useful in discrete system simulation.Time to failure has been modeled with numerous distributions. The uniform distribution can be used when an interarrival or service time is known to be random. in simulation models.
n x .q) + (12.2…. 1. Xj = 0 . The n Bernoulli trials are called a Bernoulli process if the trials are independent.p = p & V(Xj) = [ (O2.1. j = 1. P2 (x2)… Pn (xn) & Pj (Xj) = P (Xj) = { P.P) ] – P2 = P (1P) BINOMIAL DISTRIBUTION :. j = 1. Xj = 1. There fore.P (x1.2 …n { 1P = q. given (eq n 11) distribution is called the bernoulli distributions. probability can be defined as:. otherwise (12) The probability of eq n (12) in calculated as :P(SSS…SS x values FF…FF ) = Px qnx nx values . x=0.68 DISCRETE DISTRIBUTIONS Discrete random variables are used to describe random phenomena in which only integer values can occur. x2 … xn) = P1 (x1).Consider in trials each of which can be a success or a failure. : Means & variance of Xj are defined as – E(Xj) = 0. Let Xj =1 th if j th is a Success. Xj = 0 if j is a failure.2…n { O.. Trial has only two possible outcomes is success or failure. othervise ) (11) for one trial.q + 1.The random variable X denotes the no of success in n Bernoulli trials has a binomial distribution given by P(X) where P(x) = ( n ) pxqnx . Bernoulli trials and the Bernoulli Distribution :.
+ Xn : mean E (X) = P + P+ … +P = np 13) Variance V(x) = pq + pq+…+pq = npq .1.The poisson probability mass f n is given by e x P(x) = x! . otherwise 2 (15) The event { X=x } occurs when these are x1 failure followed by a success. P(x) = { q x1 p . mean = E (X) = x = V(x) and cumulative distribution f n is given by .69 Where q = 1p The Bernoulli random variables X with mean P & variance P (1P) = pq can be expressed as – X = X1 + X2+….FS) = q p Mean = E(X) = 1/p (16) & Variance = V(x) = q/p (17) 2 POISSON DISTRIBUTION :. the Random variable of interest X is defined to be the no of trials to achieve the first success. Where a < o. x=0.(14) GEOMETRIC DISTRIBUTION :.. x=1. : . 2… { 0. Probability of failure = q = 1p Probability of success = p x1 P(FFF….This distribution is related to a sequerce of bernoulli trials.……  (18) Generally poisson distribution descrebes random processes & generally it is simple sample.
b) if its pdf is given by – F(X) = { 1/ba.70 F ( x) x i o e i (19) i! Continuous Distributions :. otherwise { o. a x b _____(20) {o. ab (22) 2 E(X) = V(X) = ( a b) 2 (23) 12 (ii) EXPENENTIAL DISTRIBUTION :. else where . a x b ________(21) {1. xb The cdf is given by f(x) = P (X1 < X < X2) = F(X2) – F (X1) = x 2 x1 ba Which is propertional to the length of the interval for all X1 & X2 satisfying a < X1 <X2 < b.Continuous random variables can be used to discribe random phenomena in which the variable of interest can take on any value in same interval.A random variable X is uniformaly distributed on the interest (a. x a { xa/xa. :. Mean & variance can be defined as . (I) Uniform Distribution :.A random variable X is said to be expenentially distributed with parameter X > O if its pdf is given by f (X) = { e x . x o (24) { o.
arrivals per hr service per min. X<O 0 (26) { t dt 1 e x . A random variable X is gamma distributed with parameters & if its pdf is given by f(x) = ( ) 1 e . ( ) X>O . The exponential distribution has mean & variance given by E(X) = 1/ & V(X) = 1/ .71 The exponentical distribution has been used to model intervival times when arrivals are completely random and to model service times which are highly variable. then using (1) = 1. not just integers. equation (28) becomes. In these instances is a sate. x 0 (iii) Gamma Distribution A function used in defining the gamma distribution is the gamma function which is defined for all > o as () = x 0 1 x e dx (27) by integrating equation (27) it became () = (1) (1) (28) If is an integer. Cdf can be expressed as – F(X) = { o. () = (1) ! (29) The gamma Fn can be thought of as generalization of the factorial notion which applies to all the nos.(25) Thus the mean and standard deviation are equal.
then X has a gamma distribution with parameters B & Q X = X1 + X2+ …. 1 ( ) { 0. the gamma distribution is related to the exponential distribution in the following manner : If the random variable. The parameter parameter. exponentially distributed random variables.72 { O. X is the sum of B independent. When F(x) = x>0 X 0 (33) is an integer. each with parameter BQ. + X (34) . otherwise (30) is called the shape parameter and is called the scale The mean and variance of the gamma distribution are given by – E(x) = 1/ (31) & V(x) = 1/B (32) The cdf of X is given by ( t ) 1 e t dt .
otherwise is often referred to as the Erlang distribution of order K when B = K. .73 where the pdf of Xj is given by  g ( Xj ) ( )e xj . f ( x) ( ) 1 e x . The mean & variance of gamma distribution can be used to define the mean & variance but regardless of the value of B. x > 0 ( ) { 0. E(X) = 1/ if = k. x { 0. an integer. (iv) Erlang Distribution :. Ie.The pdf of equation. otherwise and Xj are matually independent. an integer & V(X) = 1/ 2 Mean of the distribution can be difined as – E(X) = E(X1) + E(X2) + …. + E(Xk) The expected values of the exponentially distributed Xj are each given by 1/k.
E( X ) 1 1 1 1 . a +ve integer. the cdf can be defined as  k 1 e0 kx ( kx )i F ( x) 1 . i! i 0 x>0 (35) Which is the sum of poisson terms with mean = Kx.....74 Thus. 2 2 2 ( K ) ( K ) ( K ) K 2 when B=k ... K K K If the random variables Xj are independent the variance of their sum is the sum of the variance or V (X ) 1 1 1 1 . .....
people. mechanics. As an example of finite population consider. patienes. medical personnel. machines. the arrival rate is not affected by the number of customers who have left the calling population and joined the queuing system.) 1. Examples of infinite population may be finite but large we may use infinite population models provided that the number of customers being served or waiting for service at any given time is a small proportion of the population of potential customers. System capacity : In many queuing systems there is a limit to the number of customers that may be in the waiting line or systems. For the finite calling population models. An arriving customer . the arrival rate to the queuing system does depend on the number of customers being served and waiting.75 6 Queuing Models Characteristics of Queuing systems : The key elements of queuing systems are the customes and servers. The term customer can refer to anything that arrives at a facility and requires service (e. referred to as the calling population.g. receptionist. email etc. In an infinite population model.) the term “server” might refer to any resource which provides the requested service. may be finite or infinite. CPU in a computer etc. (e.g. The calling population : The population of potential customers. a bank of five machines which may break down and single mechanic is available for service. 2.
and service according to priority (PR). renege (i.g. E. Arrivals may occur at scheduled times or at random times. The most important model for random arrivals is the Poisson arrival process. When arrivals are at random. Some systems may be considered as having unlimited capacity.e. If service times are random. 4. leave if the line is too long ). The exponential. They may be constant or of random duration. The arrival process : The arrival process for the models is characterized in terms of interarrival times of successive customers. Queue discipline refers to the logical ordering of customers in a queue. Ticket counters at a railway station. If An represent interarrival time between customer n1 and n. service in random order (SIRO). Service Times and Service Mechanism : The service times of successive arrivals are denoted S1.76 who finds the system full does not enter but returns immediately to the calling population e. then { S1.…. then for a Poisson arrival process. S2. Weibull etc. 5.e.…} is usually a sequence of independent and identically distributed random variables. common queue disciplines are firstin. An is exponentially distributed with mean 1/ time units. are . the interararrival times are usually characterized by a probability distribution. waiting room of a clinic. There is possibility that incoming customers may balk (i. firstout (FIFO).g. For a Poisson arrival rate is customer per unit time. S2. or jockey (move from one line to another). S3. lastin. leave after being in the line if the line is moving too slowly). Queue Behavior and Queue Discipline : Queue behavior refers to customer actions while in a queue waiting for service to begin. firstout (LIFO). Shortest processing time first (SPT). 3. Erlang.
Queuing Notation : Kendall [1953] proposed a notational system for parallel server systems. Wnq : Total time spent in the waiting line by customer n L (t) : The number of customers in system at time t. Lq : Longrun timeaverage number of customers in queue. Common symbols for A and B are : M : Exponential or Markov D : constant or deterministic Ek : arbitary or general GI : general independent. . L : longrun timeaverage number of custmers in system. Wn : Total time spent in system by the nth arriving customer. Lq(t) : The number of customers in queue at time t. Let Pn : Steadystate probability of having n customers in system. It is in the format A/B/C/N/K. L : Arrival rate Le : Effective arrival rate U : Service rate of one server P : Server utilization An : Interarrival time between customers n1 and n Sn : Service time of the nth arriving customer. Pn(t): Probability of n customers in system at time t.77 used to represent service times in different situations. A : the interarrival – time distribution B : the sercice – time distribution C : the number of parallel servers N : system capacity K : the size of the calling population.
or any other special circumstances.Ti L(t )dt T i 0 O 1T L L(t )dt ………………………………. (2) TO ^ The expression in equations (1) and (2) are always equal for any queuing system. whereas the term ‘queue’ refers to the waiting line alone. 1. In General. . regardless of the number of servers. i. Let Ti denote the total time during [o. The term system usually refers to the waiting line plus the service mechanism. Longrun Measures of performance of Queuing system. Let L (t) denote the number of customers in the system at time t.Ti i ………………………… (1) T i0 i0 T We Have.T. Wq : Longrun average time spent in queue per customer. a queuing system over a period of time T. Ti T i 0 The timeweightedaverage number in the system is defined by L ^ 1 Ti i. Note : (I) (II) All systems will be assumed to have a FIFO queue discinline. This average is also called timeintegrated average.78 W : Longrun average time spent in system per customer. TimeAverage number in System. the queue discipline. L : Consider.] in which the system contained exactly I customers.
(4) T i 0 O T And L q LqasT with probability 1 …. T]. say L. Consider.T] in which exactly I customers are waiting in line.(5) ^ Where Lq is the observed timeaverage number of customers waiting in line from time 0 to T and Lq is the longrun timeaverage number of customers waiting in line. a queuing system over a period of time T. . Let Lq(t) denote the number of customers waiting in line. 2. T].(6) Where N is the number of arrivals in [0. That is L ^ 1 L(t )dt LasT ………………. the observed value L approaches a limiting value. which is called the longrun timeaverage number in the system. and Tiq denote the total time during [0. The average time spent in the system per customer. Average Time spent in system per customer.. Let Wi be the time spent by customer I in the system during [0. is given by wq ^ 1 N W N i 1 i ………………………………………. w. then Lq ^ 1 q 1 iTi q T Lq(t )dt …………………. called the average system time. (3) TO T Equation (1)and (2) can also be applied to any subsystem of queuing system.79 As time T gets large.
80 Let Wiq denote the total time customer I spends waiting in queue. The port of Trop can service only one ship at a time. What arrival rate can be tolerated if the average wait in the sky is not to exceed 3 minutes? 2. Trop is a favorite port of call. If airplane arrivals are assumed to occur at random. However. Let Wnq be the observed average time spend in the queue(called delay) and Wq be the longrun average delay per customer. Obtain L. but if . one for taking off) airport is being designed for propellerdriven aircraft. there is mooring space for three more ships. Then 1 wq N ^ W N i 1 ^ q i ……………………………… (7) ……………. Lq and Wq Customer Time of Time of Arrival Departur e 1 0 2 2 3 8 3 5 10 4 7 14 5 16 20 Graded Questions 1. (8) And w q wq asN Example : Consider a simulation of queuing system as shown below. A tworunway (one runway for landing. The time to land an airplane is known to be exponentially Distributed with a mean of 1 ½ minutes.
(I). one kind of birthday cake is oftered. At Tony and Cleo’s bakery. each one independently and exponentially distributed with a service time of 15 minutes. At a certain time of the day. With a standard deviation of approximately 2 minutes. determine the average cost per aircraft of delay waiting to land. this is all this baker does. What is the expected number of ships waiting or in service at the Port of Trop? 3. 5. Suppose that mechanics arrive randomly at a tool crib according to a Poisson process with rate L = 10 per hour.81 no mooring space is available. in fact. The physical examination requires three stages. The port of Trop has the capacity to handle an average of eight ships a week. The time to land an aircraft is a constant 90 seconds. [Hint : The variance of the sum of independent random variables is the sum of variance. 6. . Lq for this system. It takes 15 minutes to decorate this particular cake. Patients arrive for a physical examination according to a Poisson process at the rate of one per hour. with service times exponentially distributed. these arrivals form a Poisson process with rate 30 per hour. An average of secen ships arrive each week. Determine the steadystate average cost per hour of mechanics waiting for tools. Arrivals to an airport are all directed to the same runway. Determine the average number of delayed patients. If a delayed aircraft burns $5000 worth of fuel per hour on the average. A patient must go through all three stages before the next patient is admitted to the treatment facility. the ships have to go to the Port of Poop. Suppose that mechanics make $15 per hour. Determine Lq. according to a Poisson Process. It is known that the single tool clerk services a mechanic in 4 minutes on the average. L and (I) for this airport. what mean time between arrivals (exponentially distributed) can be accepted if the mean length of the queue for decorating is not to exceed five cakes? 4. and the job is performed by one particular baker.
9% of the time.5 hours. A large customer shopping mall is to be constructed. Carefully state any assumption or approximations you make. with a variance of 1 hour2. Arrivals to a selfservice gasoline pump occur at a Poisson fashion at a rate of 12per hour. What is the expected number of vehicles in the system? 9. Selfservice customers have been observed to arrive at a rate of 24 per hour. A machine shop repairs small electric motors which arrive according to a Poisson process at a rate of 12 per week (5day. And based on studies at other malls. what variance would reduce the expected waiting time to 6. During busy time the arrival rate of cars is expected to be 1000 per hour.82 7. A small copy shop has a selfservice copier. An analysis of past data indicates that engines can be repaired or an average. Customers arrive at a one man barber shop according to a Poisson process with a mean interarrival time of 20min.5 hours? 8. then the additional people must line up outside the shop as much as possible. I low many working hours should a customer expect to leave a motor at the repair shop (not krowing the status of the system)? If the variance of the repair time could be controlled. on average. on average. . and they use the machine 2 minutes. Service time has a distribution which averages 4 minutes with a standard deviation of 11/3 minutes.11 to Q16. when there are more than 4 people. How spaces should they have? 10. Assess the impact of adding another copier. in 2. shopping. 40hours work week). Currently there is room for only 4 people to line up for the machine (including the person using the machine). Assume exponential service time] 11. the mall designers would like to have sufficient parking so that there enough spaces 99. Customers spend an average of 15 min in the barber’s chair. [Note : For Q. For that reason they are thinking about a second selfservice copier. it is believed that customers will spend 3 hours.
84 h/service] 13. If customers arrive for service according to a Poisson distribution at the average rate of 5 per day. 2. Ans :. 3.25. 0. If the mean arrival rate is 24 per hour.2phr.75h.[3.25. 0.61.[single channel is better.83 (a) what is the expected number of customers in the barber shop? In the queue? (b) What is the probability that a customers in the barber shop? In the queue? (c) How much can a customer expect to spend in the barber shop? (d) Management will put another chair and hire another barber when a customer’s average waiting time in the shop exceeds 1. whether 3 channels in parallel with a mean service rate of 10 per hour is better or worse than a single channel with mean service rate of 30 per hour.25 h.32] 12. find from the customer’s point of view of the time spent in the system. 0. 1h.] . how much must the average rate of arrivals increase to warrant a second barber? (e) What is average time customers spend in the queue? (f) Obtain the probability that waiting time in system is greater than 30 minutes (g) Obtain the probability that there are more than three customers in the system. how fast must they be serviced on the average (assume exponential service time) in order to keep the average number of customers in the system less than 4? Ans :[3. 0. Ans :.
F(x) = 1.84 7 Random Number Generation Random numbers are necessary basic ingredient in the simulation of almost all discrete system. 1.…. and independence. R2. 0 < x < 1 0. Each random number R1 is an independent sample drawn from a continuous uniform distribution between zero and 1. = V ( R ) x 2 dx E ( R ) 1 O 2 x 3 3 1 1 0 2 2 1 1 1 3 4 12 . A sequence of random number R1. otherwise The expected value of each Ri is given by E ( R) 1 O xdx x 2 1 0 2 1 2 and the variance is given by. the pdf is given by. That is. Most computer languages have a subroutine or function that will generate a random number. Properties of Random Numbers. must have two statistical properties. uniformity.
e. 1.g. If the method is known the set of random numbers can be replicated. or imitates. . If the interval (0. Generation of PseudoRandom Number The word “pseudo” is used to imply that the very act of generating random numbers by a known method removes the potential for true randomness. 2. 5. The generated numbers may not be uniformly distributed. The goal of any generation scheme.85 Note : 1. (a) Autocorrelation between numbers. 2. 2. The generated numbers may be discretevalued instead of continuousvalued. is to produce a sequence of numbers between zero and 1 which simulate. The mean of the generated numbers may be too high or too low. may be too high or too low. 4. however. of observation. the expected number of observations in each interval is N/n. The probability of observing a value in a particular interval is independent of the previous value drawn. where N is the total no. the ideal properties of uniform distribution and independence as closely as possible. 3. or subinterval of equal length. The variance of the generated nos. When generating pseudorandom numbers certain problems or erros can occur.1) is divided into n classes. There may be dependence. that is the numbers are not truly random.
48. 14. below the mean. A oneperson barber shop has 6 chairs to accommodate people waiting for a hair cut.[ 0. (c) Several numbers above the mean followed by several nos. successively higher or lower than adjacent nos. If such departures are detected. long distance calls arrives in a Poisson fashion at an average rate of 15 per hour. A telephone exchange has 2 long distance operators. Departures from uniformity and independence for a particular generation scheme may be detected by statistical tests. 3.86 (b) Nos.2 min] 15. The telephone company finds that during the park load. Customer arrive at the average rate of 3 per hour and spend an average of 15 min in the barber’s chair. what is the expected waiting time? Ans :. the generation scheme should be dropped in favour of an acceptable generator. The length of service on these calls is approximately exponentially distributed with mean length 5 min. Assume that customers who arrive when all the 6 chairs are full leave without entering the barber shop. (a) What is the probability that a subscriber will have to wait for his long distance call during the park hours of the day? (b) If the subscribers will wait and are serviced in turn. (a) What is the probability that a customer can get directly into the barber’s chair upon arrival? (b) What is the expected number of customers waiting for a hair cut? (c) How much time can a customer expect to spend in the barber shop? .
Obtain the number of mechanics in the system.7%] [ 0. he will leave. A Barber shop has 2 barbers and 3 chairs for waiting customers.3878. random numbers are generated by a digital computer as a part of the simulation.d.87 (d) What fraction of potential customers are turned away? Ans :1. if a customer arrives and there are no empty chairs in the shop. 19. Assume that customers arrive in Poisson fashion at a rate of 5 per hour and that each barber services customers. Numerous methods can be used to generate the values. What are the characteristics of queueing system and how would you determine the costs in queueing problems. 43. Usually. (b) Suppose service takes on an average 40 seconds with s. Two attendants manage the tool crib while mechanics. of 30 seconds.2778. What is the probability that the shop Is empty? What is the expected number of customers in the shop? 17. Find the steadystate probabilities.8 min. According to exponential distribution with mean of 15 min. Name and explain some of the useful statistical models for queuing systems 20. 18. further. 3. Assume poisson arrivals at rate of 2 meehanics per minute and exponentially distributed service times with mean 40 seconds. (a) Obtain the number of mechanics in the system and waiting time in the queue. What are the long run measures of performance of queuing systems? Explain briefly. 16. arrive for service. assumed to be from an infinite calling population. In .
the generated random numbers should closely approximate the ideal statistical properties of uniformity and independence. if 10. The routine should be fast. Or routines. within the sequence.88 selecting among these methods. Most important. 3. individual computations are inexpensive. 3. it should be possible to generate the same set of random numbers. The total cost can be managed by selecting a computationally efficient methodnumber generation. Given the starting point (or conditions). This is helpful for debugging purposes and is a mean of facilitating comparisons between systems. and as indicated previously. The cycle length or period. the period should be many times that long. but simulation may require many hundreds of thousands of random numbers. widely separated. The random numbers should be replicable. 2.000 events are to be generated. there are a number of important considerations: 1. represents the length of the randomnumber sequence before previous numbers begin to repeat themselves in an earlier order. it should be possible to easily specify different starting points. Techniques for Generating Random Numbers (a) Linear Congruential method . Thus. 4. The routine should have a sufficiently long cycle. This is desirable so that the simulation program produces the same results wherever it is executed. A routine degenerates when the same random numbers appear repeatedly. completely independence of the system that is being simulated. and ideally to different programming languages. Such an occurrence is certainly unacceptable. A special case of cycling is degenerating. 5. The routine should be portable to different computers. For the same reasons. This can happen rapidly with some methods.
i 0. I = 1.…. X2. k j 1 Let X 1 1 X i .e. Maximum density means that the values assumed by Ri. the form is known as the multiplicative congruential method.2… The initial value Xo is called the seed. …. Xi k be the ith output from k different multiplicative congracuential generators.g. and mds the modulus. 2311 or 248) To avoid cycling (i. recurrence of the same sequence of generated numbers) the generator should have the largest possible period. Consideration must also be given to maximum density and maximum period.2. R2 … approximate uniformity and independence.. and Xo.. Let mj be the prime modulus of the jth generator and multiplier aj is chosen so that the period is mj1. Random numbers between zero and 1 can be generated by R1 Xi . the form is called the mixed congruential method. Xi2.2. C is the increment. If C# O.. (b) Combined linear congruential generators Let Xi. m Note : The ultimate test of any generation scheme is how closely the generated numbers R1.. a called the constant multiplier. c.89 The linear congruential method produces a sequence of integers X1. m.… leave no longer gaps [0. This can be achieved by making m suitably large (e. When C = O. j mod m1 1 j 1 .1]. This can be achieved by proper choice of a..1 . I = 0.1.1. Between zero and m1 according to the following recursive relationship : X I+1= (a Xi + C) mod m.
.... .. F(x) = x. 0 x 1 Let R1.. RN be the sample from random number generator. F(x).90 And R 1 X1 . qf the uniform distribution to the campirical cdf. Then SN (x) is defined by SN (x) = number of R1 . R2 .1] . R N S x X N . X1 0 m1 The maximum possible period for such a generator is P= ( m1 1)( m 2 1)....Ho : Ri ~ U[0. R2 ….H1 : Ri ~ U[0.. Test for Random Numbers The desirable properties of random numbers are uniformity and independence. here. X1 0 m1 m1 1 .1] (a) The kolmogorovsimirnov test : This test compares the continuous cdf. We have. SN(x) of the sample of N observations. (1) Frequency test :This is a test for checking uniformity.( m k 1) 2 k 1 4..
chi X n 2 2 i 1 oi ei 2 ei . Test procedure : Step 1: Rank the data from the smallest to largest. for the specified significance level and the given samplesize N. (b) The chisquare test.= max R(1) i 1 N D = max (D. Let R(i) denotes the ith smallest observation.91 As N becomes larger. Let D = max F ( x ) S N ( x) The sampling distribution of D is known and is tabulated. ei = expected number in the ith class. SN(x) is better approximation to F(x). Step 4: If D > D . Let Oi = observed number in the ith class. Let R(i) R(2) …R(N) Step 2 : Compute D+ = max [i/N – R(i)] D. Then. Suppose the observed values are divided into n classes. D+) Step 3: Determine critical value. H 0 is rejected. D .
A down run is sequence of numbers each of which is succeeded by a smaller number. we are concerned with number of runs. = E® = = V(R) = 2N 1 3 16 N 29 90 For N > 20. Then.f.1) Reject Ho if Z < Za/2 or Z > Za/2 where is the level of significance. we reject Ho N n Run : A run is defined as succession of similar events preceded and followed by a different event. The test statistic is Z = (b) Runs above and below the mean : . Too few or too many runs would indicate nonrandom behaviour of data. a. (2) Runs test : This is a test for checking independence Ho: Ri ~ independently Hi : Ri ~ independently. R~ N( .92 for the uniform distribution ei = d. ) R ~ N(0. = n1 if X2 > X2 n1. (a) Runs up and Runs down: Here. An up run is a sequence of numbers each of which is succeeded by a large number. A ‘+’ (‘_’) sign will indicate an observation which is fallowed by a larger (smaller) number.
Colmogorov –Smirnov Critical Values Degrees of Freedom D (N) 0.543 0.624 0.50% D 0. of runs.642 4 0.93 A ‘+’ sign will be used to denote an observation above mean. ) Let Z = R Reject Ho if Z < Za/2 or Z > Za/2 where is the level of signnificance.457 0. R~ N (. N 2 N = n1+n2 2 V ( R) 2n1 n2 (2n1 n 2 N ) N 2 ( N 1) For n1 > 20 or n2 > 20.05 0.669 0.51 6 0.828 0.01 0.486 0.49 0.41 0.411 9 0.368 11 0.842 0.577 0.95 2 0.47 7 0. n1 = no.468 . Then .10 1 0.708 0.776 3 0.514 0. n2 = no.565 0.995 0.975 0.438 8 0.618 0. of observation above the mean.388 10 0.929 0.352 105. of observation below the mean.733 0. R = no. and a ‘_’ sign will denote an observation below the mean. = E(R) = 2n1 n 2 1 .432 0.391 D 0.521 0.564 5 0. Let.
36 N 0.295 0.24 0.23 1.338 0.314 0.94 12 13 14 15 16 17 18 19 20 25 30 35 Over 35 0.361 0.375 0.304 0.24 0.27 1.278 0.356 0.301 0.272 0.325 0.328 0.22 0.32 0.29 0.349 0.318 0.392 0.264 0.286 0.338 0.22 N 0.433 0.404 0.418 0.63 N Percentage Points of the ChiSquare Distribution with v Degrees of Freedom X2 .21 1.363 0.45 0.294 0.309 0.371 0.381 0.27 0.
2 36.3 18.6 50.9 40.005 7.7 29.0 104.9 63.1 41.6 118.5 96.2 24.7 66.7 23.7 47 59.8 14.5 78.4 42.7 37.5 19.28 15.9 23.9 30.3 45.5 36.8 63.6 12.3 23.6 38.6 30.1 21.6 25.34 13.0 52.7 37.1 40.6 107.7 18.1 20.5 20.3 35.2 116.4 16 17.3 29.8 79.7 26.6 36.5 45.3 32.4 40.8 36.6 48.88 10.8 26 27.2 88.2 10.2 74.6 47 48.3 42.6 41.8 30.10 2.5 21.3 71.3 128.3 27.7 76.5 24.4 112.49 11.3 49.6 43 44.6 12 13.35 11.8 34.1 39.4 83.8 38.4 85.7 21 22.3 22.2 28.5 16.3 24.8 67.3 95 106.61 6.8 21.8 1805 20.25 7.2 27.96 16.2 34.1 31.7 16 17.9 43.21 11.0 23.4 29.4 100.4 14.6 32 33.5 92.9 113.6 28.4 32.3 124.6 49.2 44.7 25 26.6 51.78 9.1 16.95 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 40 50 60 70 80 90 20.1 12.8 28.025 5.38 9.3 51.2 35.05 3.1 22.4 35.2 45.2 37.1 27.2 53.3 19.3 49.4 37.9 35.8 31.84 14.1 15.84 5.63 9.4 23.1 20.01 6.7 33.14 12.8 55.9 39.1 90.8 44.4 34.2 38.9 18.5 101.5 28.5 32.6 .9 35.6 40.3 41.1 20.81 9.8 32 33.7 26.6 14.02 7.1 30.99 7.9 40.0 41.7 38.2 26.71 4.5 19 20.3 20.6 43.2 32.
a = 43 and m = 1000.11 and 0.67 0. 7.96 100 140.82 0. 3.12 0.22 0.54.81 0. Consider the first 30 two digit values in Example 1.90 0. Let Xo = 27.68 has been generated.25 0. determine whether the hypothesis of independence can be rejected.82 0.2 135.05. .05.37 0.98. Based on runs up and runs down.87 0.73.23 0.76 0. 0. Distributed.67 0.79 2 0.44 0.99 0.05.74 0. 1] can be rejected.94 0. Consider the first 30 two digit values in Example 1. 0.17 0. 6.45 0. 0.3 118.71 0.79 0.46 0.21 0.30 0. to test whether the data shown below are uniformly.41 0.47 0.52 0.39 0. Use the chisquare test with =0.99 0. a = 8. Use the multiplicative congruential method to generate a sequence of four three.5 Graded Questions 1. Use the kolmogorovSmirnov test with = 0.34 0.74 0.73 0. where = 0. Let Xo = 117.digit random integers. Use = 0.77 0. Determine whether there is an excessive number of runs above or below the mean. c = 47 and m = 100.56 0.02 0.6 124.05 0.70 0. The sequence of numbers 0.05 to determine if the hypothesis that the numbers are uniformly distributed on the interval [0.96 0.93 0.8 129.05 0.83 0. Do we encounter a problem in the previous exercise if Xo = O? 4.56 0.42 Use the linear congruential method to generate a sequence of three twodigit random integers. 0. 5.78 0.31 0.19 0.89 0.64 0.65 0.
Xo = 8. … numbers in the sequence are autocoerrelated. 300. 0.227. m = 16. What inference can be drawn? Is maximum period achieved? 13.097.05. Four different digits.929. m= 16.515.474.507. 11.055. Test whether the 2nd. 0. one pair 392. 14. a = 7. (Use = 0.351. For 16bit computers.798. and m = 100.182. Test whether these numbers are independent. 0.2.825. 0. 0. 0. 3 like digit.97 8. m3 = 31657 and a3 = 142. c = 29. a2 = 146. 0. 0. 0. 0.574.262. . combine three multiplicative generators with m1 = 32363. a1 = 157. (d) A = 7.852.928. Generate enough values in each case to complete a cycle. 565. Generate 5 random numbers with the combined generator using intial seeds Xi. m2 = 31727. Consider the first 30 two digit values in Example 1. 4 like digit. 9. 0. where =0. 12. (b) A = 11. 0. 0. m = 16. Use the mixed congruential method to generate a sequence of three twodigit random integers between 0 and 24 with Xo = 13. 0. Xo = 8. 0. 0.o = 100. Xo = 7. 9th. 24. a = 9. Consider the multiplicative congruential generator under the following circumstances: (a) a = 11.127.007. Based on the Poker test. 0. two pair 17. 0. Test the following sequence of numbers for uniformity and independence using produres you learned in this chapter: 0. (c) A = 7. c= 35.3. 16th. 500 for the individual generators i = 1. 0.788.442. Xo = 7. 2. A sequence of 1000 fourdigit numbers has been generated and an analysis indicates the following combinations frequencies. Use the mixed congruential method to generate a sequence of three twodigit random numbers with Xo = 37.05) 10.797. m = 16.
. same of these tests are for uniformity & others for testing independence. Mention the properties of random numbers. are uniform & independent. Consider the data in example 1. 16.98 15. generaters available. Of the many types of random no. State the various test for random numbers and explain briefly any two of them. the linear congruential method is the most widely used. Many types of statistical tests are used in testing random number generators. Independent be rejected no the basis of the length of the runs up and down when = 0. and give the methods of generating pseudo random numbers.05. Summary :In the chapter the desoubtion of the generation of random nos. Can the hypothesis that the numbers are. are given and the generated nos. 17.
X.…which have an exponential distribution. it is assumed that a distribution has been completely specified. Step 2 : Set F(x) = R on the rance of .1). … and compute the desired random variates by Xi = F1 (Ri) (a) Exponential distribution : The exponential sdistribution has pdf F(x) = ex. x. X2. Inverse Transform Techniques: The Inverse transform technique can be used to sample from a variety of distributions. X = F1 (R) Step 4 : Generate uniform random numbers R1.e. . R2. The technique is described in the following steps.99 8 Random Variate Generation Here we deal with procedures for sampling from a variety of continuous and discrete distributions. where R represents random number which is uniformly distributed on (0. Step 1: Compute the cdf of the desired r. We with to generate values X1. x 0 =0 otherwise the parameter can be interpreted as the mean number of occurances per unit time. Step 3 : Solve the equation F(x) = R i. v.
a x b = 1. … and compute the desired random variates by Xi = F –1 (Ri) Here. a x b = 0.….b]. 1 – ex = R. R2.3. (b) Uniform distribution: Consider a random variable X that is uniformly distributed on the interval [a.2. ex = 1R x = loge (1R) x= 1 loge (1R) Step 4 : Generate uniform random numbers R1. Xi = 1 loge (1Ri). The pdf of X is given by f(x) = 1/ba. .ex.100 Step 1 : F(x) = P (X x) = 1 . x>b Step 2 : set F(x) = xa / ba = R. i = 1. x<a F (x) = x – a/ b – a . otherwise Step 1 : The cdf is given by 0. x 0 Step 3 : 1 – e x = R. x 0 Step 2 : set.
Devise a method for generating X. 10.…} .101 Step 3 : Solving for X we get. The weekly demand. Generate load for 4 successive trucks by using four digit random numbers. 11. x0 = 0. the number of pallets. otherwise Data have been collected on service times at a driveinbank window at the Shady Lane National Bark. x = a + (ba) R (c) Weibull distribution : failure the weibull distribution may be used as a model for time to machinics or electronic components.1. This data are summarized into intervals as follows: Interval (Seconds) 1530 3045 4560 6090 90120 120180 180300 Frequency 10 20 25 35 30 20 10 Set up a table for generating service times by the tablelook up method and generate five values of service time using fourdigit random numbers. X to be loaded onto a truch at a loading dock was assumed to be uniformly distributed (discrete) between 8 and 24. assuming that the load of successive trucks are independent. its pdf is given by f (x) = 1 ( x / a ) x e . 12. For a preliminary version of a simulation model.2. If v = 0. X for a slow moving item has been found to be well approximated by a geometric distribution on the range { 0.
5 items. Suppose that the demand has been found to have a Poisson distribution with mean 0. 16.102 with mean weekly demand of 2. Use three digit random numbers. Use four digit random numbers. 13.3) distribution has pdf (X) = 60x3 (1x)2. using random numbers from table. 15. otherwise Generate two variate values from the above distribution using acceptancerejection technique. demand per week.7 days. Generate 3 values of X. Generate five random lead times from this distribution. Generae 10 values of X. Develop a technique for generating a binomial random variable. Demand per week. Lead times have been found to be exponentially distributed with mean 3. The beta (4. using random numbers from Table. 0 x 1 = 0. X.5 items per week. 14. using the convolution technique. Random Digits 94737 87259 63856 66612 30712 69607 37792 01488 66248 51453 92168 36463 47097 80400 94554 31567 08225 85982 14016 54714 58582 24145 27282 56680 97697 03462 82530 07331 78780 45972 13863 53597 35614 13296 18527 46783 05704 43886 94107 73847 38244 61157 19271 54590 04210 44111 88239 08490 24826 89326 11634 61934 23172 86477 41967 64930 50918 65366 86999 00546 87084 99708 91624 73544 88319 74863 96903 30258 86689 05317 21425 11108 55441 61130 96499 03337 44484 45935 00022 72573 05595 99986 52146 61674 94834 30445 04743 44834 51217 26204 12765 41583 75377 03694 40471 30961 58701 68558 53496 07471 99057 33456 42822 45390 54786 15016 20926 46439 57753 81421 78462 12282 57365 06391 51730 67566 55832 34029 28111 86043 04940 85665 25282 40173 41415 60170 96265 97033 74759 50248 03500 31635 21012 09603 09757 23973 50807 97714 39119 46455 09890 58457 55360 13676 .
Transformation is required to transform standard normal variety into a normal variety with mean x & variance 62. ∞<x<∞ An initiatively appealing direct transformation that produces an independent pair of standard normal varieties with mean zero & variance 1. .103 07821 09056 19922 29923 29602 94135 87926 85039 66070 78166 94672 56406 67726 07516 43070 36917 03919 46724 16108 74541 82919 31388 17190 00466 24759 10709 37025 02570 29464 94661 34092 19212 38480 82521 07912 70023 57805 45979 22671 60370 82922 22558 61281 75808 31285 26809 75522 88068 47266 69314 80731 80164 99219 87724 34334 59160 74636 79261 26153 27734 94264 76735 00152 80812 02312 64303 86823 89669 01850 77258 15687 68631 21747 11449 26179 36108 20308 88187 55064 83537 45095 12570 10531 22254 77009 46509 81326 87225 31106 78804 20286 87680 72550 99360 07161 98745 72496 40531 16039 73689 82109 62191 43152 54414 86576 10930 12715 27685 08682 17696 89428 02850 44335 05762 14025 72758 42980 92362 99745 97810 77755 02917 01518 26342 03898 70607 01610 19856 79337 47564 63142 67518 18784 67177 16368 47118 05573 70650 24909 60851 57518 21979 48767 35886 50391 95878 82697 35712 82072 63099 03126 90527 39578 77869 88937 63966 47554 92600 57659 23790 17470 56117 38391 55292 01169 41319 03121 14497 59554 71587 73227 49137 85199 40494 47312 21756 40851 16480 94466 33203 59869 55572 79424 55043 25900 06707 12183 95663 01786 75739 20046 90230 31177 60906 13160 13482 13103 49069 59578 64783 53503 43972 31388 70803 66320 17245 57604 75117 91080 90035 89393 88326 98145 98082 28013 69264 Direct transformation for the Normal & Log normal distributionsThe standard normal cdf is given by Ø (x) = ∫ x∞ 1/ √2 Ï et2/2 dt.
reject R & return to step 1 Step 3. then go to step 3. Summary:The basic principles of random variable generation using the inverse transform technique.Generate a random no. .104 Acceptance – Rejection technique Suppose that an analyst needed to devise a method for generating random variables X uniformly distributed between ¼ & 1. R Step 2. 1] is needed repeat the procedure beginning at step 1. or not stop. The steps used area) Step 1.a) of R > ¼.Of another uniform random variable on [1/4. the convolution method & acceptance rejection techniques have been introduced. b) Of R < ¼. accept X = R.
Based on the frequency distribution and structural knowledge of the process. 3. the simulation proceeds through time by generating random from these distributions. However. Data Collection: . Collect data from real system of interest. Evaluate the chosen distribution and the associated parameters for goodnessoffit. we have to specify their probability distributions e. Here. these parameters may be estimated from the data. When data are available. 1.105 9 Input Modeling To carry out a simulation using random inputs. and repeats the procedure. When data are not available. Identify a probability distribution to represent the input process. 4. in the simulation of a queucing system. If several iterations of this procedure fail to yield a fit between an assumed distributional form and the collected data the empirical form of the distribution may be used. Faulty models of the inputs will lead to outputs whose interpretation may give rise to misleading conclusions. typical input data are the distribution of time between arrivals and service times. Choose parameters that determine a specific instance of the distribution family. expert opinion and knowledge of the process must be used to make educated guesses. a frequency distribution or histogram is developed. determining appropriate distributions for input data is a major task from the standpoint of time and resource requirements. It the chosen distribution is not a good approximation of the data. Given that random variables follow particular distributions. There are four in the development of a useful model of input data. then the analyst chosen a different family of distribution. In some situations it may not be possible to collect data. 2. This requires substantial time and resources. a family of distribution is chosen.g. Almost all realworld system contains one or more sources of randomness.
There is no need to collect superfluous data. Try to combine homogeneous data sets. 2. It is one of the most important and difficult problems in simulation.106 Data collection is one of the biggest tasks in solying a real problem. Devise forms for this purpose. To determine whether there is a relationship between two variables. 5. Begin by a practice or preobserving session. Even if the model structure is valid. 6. Keep in mind the difference between input data and output or performance data. Output data on the other hand represent the performance of the system when subjected to the inputs. performances that we may be trying to improve. Input data typically represent the uncertain quantities that are largely beyond the control of the system and will not be altered by changes made to improve the system. Be aware of the possibility of data censoring. the observation period. It is very likely that these forms will have to be modified several times before the actual data collection begins. Sometimes an eyeball scan of the scatter diagram will indicate if there is a relationship between two variables of interest. they may not be recorded in a form that is directly useful for simulation input modeling. Check data for homogeneity in successive time periods and during the same time period on successive days. or finishes after the completion of. Even when data are available. build a scatter diagram. 3. This problem most often occurs when the analyst is interested in the time required to complete some process. 7. The following points may help in data collection: 1. Watch for unusal circumstances and consider how they will be handled. Plan the data collection properly. inappropriately analysed or not representative of the environment. the simulation output data will be misleading when used for policy making. Consider the possibility that a sequence of observations which appear to be independent may possess autocorrelation. if the input data are inaccurately collected. Determine if the data being collected are adequate to provide the distributions needed as input to the simulation. Try to analyze the data as they are being collected. Try to collect data while preobserving. 4. Determine if any data being collected are useless to the simulation. Identifying the Distribution with data: . Autocorrelation may exist in successive time periods or for successive customers. but the process begins prior to. and be sure to collect input data. in which a quantity of interest is not observed in its entirety.
The specific distributions within a family are specified by estimating its parameters. unequal widths may be used if the heights of the frequencies are adjusted) 2. . if continuous. Binomial: Models the number of successes in n trials. Normal: Models the distribution of a process that can be thought of as the sum of a number of component processes. The histogram for continuous data corresponds to the probability density function of a theoretical distribution. Exponential: Models the time between independent events. 4. however. Plot the frequencies on the vertical axis. the histogram will be ragged and will not smooth the data. and its shape and other details will not show well. Divide the range of the data into intervals (intervals are usually of equal width. Determine the frequency of occurrences within each interval. A histogram is constructed as follow: 1. 3. the histogram will be coarse. a line through the center point of each class interval frequency should result in a shape like that of a pdf. Poisson: Models the number of independent events that occur in a fixed amount of time or space. If the intervals are too narrow. If the intervals are too wide. Choosing the number of class intervals approximately equal to the square root of the sample size often works well in practice. when the trials are independent with common success probability. 5. (1) Histograms: A frequency distributions or histogram is useful in identifying the shape of a distribution. or a process time which is memoryless. (2) Selecting the family of distributions: A family of distribution is selected on the basis of what arise in the context being investigated along with the shape of the histogram. p. or blocky. Label the horizontal axis to conform to the intervals selected. Label the vertical axis so that the total occurrences can be plotted for each interval. The number of class intervals depends on the number of observations and the amount of scatter or dispersion in the data. Gamma: An extremely flexible distribution used model nonnegative random variables.107 There are several methods for selecting families of input distributions when data are available.
mostlikely. Weibull: Models the time to failure for components. since all the outcomes are equally likely. The following data are randomly generated from gamma distributions: 1.345 1.6 27. Do not ignore physical characteristics of the process when selecting distributions. .843 2.435 2.649 2.581 2.976 1. has a high incidence of accidents along its 100 km. often used when no theoretical distribution seems appropriate. and maximum values of the distribution are known.116 4.1 73.4 99. as follows: 88. These records indicated the point at which 30 accidents occurred.432 1. can help narrow the family of distributions from which to choose.3 91.8 73.1 87.691 1.4 20.2 2. which does not depend on data.466 2. Georgia and Athens.361 Determine the maximumlikelihood estimators B and A.7 67.3 97. The exponential is a special case of the weibull.90 2. The highway between Atlanta.2 23.313 10.3 76.6 40.2 69.2 36.3 7.3 90. Triangular: Model a process when only the minimum.0 87.3 27.432 1.221 5.7 62. [N04] The Georgia department of Public Safety published records for the month of September.782 3.0 17.810 4.8 21.108 Beta: An extremely flexible distribution used to model bounded random variables.3 87.3 23.7 98.8 32. Empirical: Resamples from the actual data collected.7 45. but the news media says otherwise. Discrete or continuous Uniform: Models complete uncertainty.3 45.833 2. Public safety officers say that the occurrence of accident along the highway is randomly (uniformly) distributed.437 8.6 6. Erlang: Models processes that can be viewed as the sum of several exponentially distributed processes. Georgia. Is the process naturally discrete or continuous valued? Is it bounded or is there no natural bound? This knowledge.6 36. Graded Questions 1.589 5.
01 0.24 0.17 .109 Use the Kolmogorov. 30 = 0.53 2. 4.54 1.24 3.10 0.80 0.34 0. Again let a = 0. The values for the past 100 months were as follows.53 1.00 0.50 0. Employee 1 2 3 4 5 6 7 8 9 10 11 12 13 14 Time (Minutes) 1.66 2.05.05.39 0.Smirnov test to determine whether the distribution is uniformly distributed given D0.0.02 2.15 0.88 0.49 0.81 1. Use a level of significance of a = 0.04 1.03 1.62 2.79 Employee 26 27 28 29 30 31 32 33 34 35 36 37 38 39 Time (Minutes) 0.05. (b) Apply the chisquare test of these data to test the hypothesis that the distribution is Poisson with mean 1. The time required for 50 different employees to conpute and record the number of hours worked during the week was measured with the following results in minutes.67 3.53 0. Injuries per Month 0 1 2 3 4 5 6 Frequency of Occurrence 35 40 13 6 4 1 1 (a) Apply the chisquare test to these data to test the hypothesis that the underlying distributions are Poisson.90 0.45 0.26 0.10 1. Records pertaining to the monthly number of jobrelated injuries at an underground coal mine were being studied by a federal agency.
9 6.35 0.9 5. Lifetime in hrs: 020 No.05.91 0.9 6.8 7. 7. The following data were available for the past 10 years on demand and leadtime. 8. [N04] Lead time: 6.3 Demand: 103 83 116 97 112 104 106 109 92 96 Estimate correlation and covariance.48 Use the chisquare test to test the hypothesis that these service times are exponentially distributed.36 0. The data are discrete & have been grouped in a frequency distribution.3 4. test the hypothesis that the lifetime is exponentially.9 6.03 1. 200 electric High bulbs were tested and the average lifetime of the bulbs was found to be 25 hrs. X2….03 1. Using the summary given below.3 6.16 0.50 4.5 6.42 1. 5.28 0. Discuss the steps involved in the development of a model of input data.82 2. Explain time series input models with suitable examples. Parameter Estimation: 1) Sample Mean & Sample varianceIn a number of instances the sample mean or the sample variance are used to estimates the parameters of a hypothesized distribution. of bulbs : 104 2040 56 4060 24 6080 12 804 [N04] 6.63 0.05 40 41 42 43 44 45 46 47 48 49 50 4.36 2.90 1. Use a level of significance of a = 0.73 0.Xn the sample mean (X) [M05] .80 0.80 5. Of the observations in a sample of size n are X1.5 4.38 0.21 0.110 15 16 17 18 19 20 21 22 23 24 25 0.29 0.26 0. Let the number of class intervals be k = 6.
1 X x S2 . 2 . Suggested Estimators for distributions often used in simulation Distribution Poisson Exponential Gamma Normal Parameter Suggested Estimator x 1 X .111 By X Xi n i 1 n nX 2 & the sample variance S is defined by 2 S2 X n i 1 2 i n 1 And if the data are direct & grouped in a frequency distribution then sample mean can be computed by X fiXj k j 1 n & sample variance by S2 fiXj n X k j 1 2 n 1 Where k is the no. of distinct values of X & fi is the observed frequency of the value Xj of X? 11.
2 .112 Lognormal . Ks test is also applicable to the explain distribution. The test statistic is given by X0 2 K i 1 (Oi Ei ) 2 Ei Oi is observed frequency in the ith class Ei is the expected frequency in the class interval. Ei = npi Pi is the theoretical hypothesized probability associated with the ith class interval. (i) Chi square test One procedure for testing the hypotheses that a random sample of size n of the random variable X follows a specific distributional form is the chi square goodness of fit test. & let . The test is valid for large sample sizes for both discrete & continuous distributional assumptions. x S2 Weibull Taking 0 0 X S Goodness of Fit TestsFor the goodness of fit tests. (ii) KolmogorovSmirnov Goodness of fit test – The chi square goodness of fit test cans a common date the estimation of parameters from the data with resulted decreases in the degree of random. Covariance & Correlation Let X1 & X2 be two random variables. The ks test is particularly useful when sample sizes are small and when no parameters have been estimated from the data. kolmogorov& mirnov test and the chisquare test were introduced these two tests are applied in this section to hypotheses about distributional forms of input data.
X 2 ) = E =E A value of cove 1 2 [( X 1 )( x2 )] ( X 1 X 2 ) 1 2 ( X 1 X 2 ) = 0 implies B=0 then our model is dependent The covariance can take any value between. Testing for goodness of fit. And if X 1 & X 2 are independent then B=0. Estimating the parameters. In this chapter. .113 i E ( Xi ) & i var( Xi ) be the mean & variance of Xi respectively. four steps in the development of models of input data is discussed 1) 2) 3) 4) Collecting the raw data Identifying the underlying statistical distribution. ( X 1 ) ( x2 ) 1 2 Then the model is perfect. X and x. 2 The covariance and correlation are measures of the linear dependence between X1 & X2. ( X 1 ) ( x2 ) + E 1 2 Where E is a random variable with mean O that is independent of X2. The correlation standardizes the covariance to bet between 1 & 1 P corr ( X 1 X 2 ) cov( X 1 X 2 ) 1 2 Summary – Input data collection and analysis require major time and resources commitments in a discrete event simulation project. The covariance between X1 & X2 is defined to be C or ( X 1 . .
This includes assumptions on the components and the structure of the system and the values of input parameters. . Validation is the process of determining whether a simulation model is an accurate representation of the system. The third step is the translation of the operational model into a computer recognizable form that is a computerized model. Persons familiar with the system should be interviewed to get information about the system. Observation alone rarely gives sufficient understanding of system behavior. Model Building. i. whether the model is valid. till an acceptable model is achieved. Verification and Validation The first step in model building consists of observing the real system and the interactions among its various components and collecting data. for the particular objectives of the study. Verification of Simulation Model The purpose of model verification is to assure that the conceptual model is reflected accurately in the computerized representation.e. Model building is a continuous process. The second step in model building is the construction of a conceptual model. Verification is concerned with determining whether the conceptual simulation model (model assumptions) has been correctly translated into a computer program.114 10 Verification and Validation of Simulation Model One the most difficult problems facing a simulation analyst is that of trying to determine whether a simulation model is an accurate representation of the actual being studied. The model builder will repeat these three steps many times.
4. comparing the revised model to reality and so on. 2. Naylor and Finger formulated a three step approach to the validation process. An interactive run controller (IRC) or debugger is an important for simulation model building. Calibration is the iterative process of comparing the model to the real system. 3. The comparison of the model to reality is carried out by subjective and objective tests. Validate model assumptions. are displayed just after each event occurs. These values value are compared with hand calculations to see if the program is operating as intended. Make a detailed flow diagram. Face Validity . Calibration and Validation of Models Validation is the overall process of comparing the model and its behavior to the real system and its behavior. who are knowledgeable about the system.115 Some observations to help the process of verification: 1. Get the computer representation checked by an independent and knowledgeable person. the state variables. certain statistical counters etc. One of the most powerful techniques to debug a discreteevent simulation is a trace in a trace. 1. Making adjustment or changes to the model. 5. Build a model that has high face validity. making models and forming the judgment. 3. A subjective test involves talking to people. Computer model should print a variety of output statistics along with input parameters. Objective tests involve one or more statistical tests to compare some model output with the assumptions in the model. 2. Closely examine the model output for reasonableness under a variety of setting of the input parameters. Give precise definition of every variable used. Compare the model inputoutput transformations to corresponding inputoutput transformations for the real system. Prepare a detailed documentation. the contents of the event list.
The use of goodnessoffit tests is an important part of the validation of the model assumptions.116 The first goal of the simulations modeler is to construct a model that appears reasonable on its face to model users are others who are knowledgeable about the real system being simulated. Identifying the appropriate probability distribution. Data assumptions should be based on the collection of reliable data and correct statistical analysis of the data. and reliable data.e. correction is not present). The model user is asked if the model behaves in the expected way when one or more input variables are changed. and by graphical methods. Sensitivity analysis can also be used to check a model’s face validity. Additional tests may be required to test for correlation in the data. Estimating the parameters of the hypothesized distribution. Structural assumptions involve questions of how the system operates and usually involve simplifications and obstructions of reality. or using computer software for the purpose. Validation of Model Assumptions Model assumptions fall into two general classes. Thus the users can be involved in the calibration process as the model is iteratively improved. 1. the analysis consists of three steps. Validating the assumed statistical model by a goodnessffit test. without which a manager would not be willing to trust simulation results as a basis for decision making. 3. data reliability can be further enhanced by objective statistical tests for homogeneity of data. As soon as the analyst is assured of dealing with a random sample (i. based on the insights gained from the initial model deficiencies. . the statistical analysis can begin. such as the chisquare or KolmogorovSmirnov test. When combining two or more data sets collected at different times. 2. Another advantage of user involvement is the increase in the model’s perceived validity. Potential users and knowledgeable persons can also evaluate model output for reasonableness and can aid in identifying model deficiencies. Structural assumptions and data assumptions. or credibility. The potential users of a model should be involved in model construction from its conceptualization to its implementation to ensure that a high degree of realism in built into the model through reasonable assumptions regarding system structure. The procedures for analyzing input data from a random sample were discussed in detail in chapter 9. Whether by hand.
the model should accurately) predict what would happen in the real system under similar circumstances. 2…. the model is viewed as an inputoutput transformation. InputOutput Validation Using Historical Input Data An alternative to generating input data is to use the actual historical record. is its ability to predict the future behavior of the real system when the model input data match the real inputs and when a policy implemented in the model is implemented at some point in the system. Otherwise. the comparison of model responses to system responses. the arrival rate of customers to a service facility) were to increase of decrease. If the system is in the planning stages and no system operating data can be collected complete inputoutput is not possible.) and all the system response data.117 Validating InputOutput Transformations The ultimate. so that system data under at least one set of input conditions can be collected to compare to model predictions. be collected during the same time period. Instead of validating the model inputoutput transformations by predicting the future. Thus. The responses (Y2 and Z2) depend on the inputs (An and Sn) as well as on the structure of the system. if the level of some input variables (e. Implementation of this technique could be difficult for a large system because of the need for simultaneous data collection of all input variables and those response variables of primary interest. not just for one input data set. In some . Furthermore.} to drive the simulation model and then to compare model output to system data. Sin. if one data set has been used to develop and calibrate the model. could be misleading. it is important that all the input data (An. A necessary condition for the validation of inputoutput transformation is that some version of the system under study exists. test of a model. In this phase of the validation process. the modeler may use past historical data which have been reserved for validation purposes only. the structure of the model should be accurate enough for the model to make good predictions. such as the comparison of average delay in the model (Y2) to that in the system (Z2). It is this correspondence that is being validated. or model. That is the model accepts values of the input parameters and transforms these inputs into output measures of performances. that is. but for the range of input data sets which are of interest. When using this technique the modeler hopes that the simulation will duplicate as closely as possible the important events that occurred in the real system. such as average delay (Z2). Sn. and in fact the only objective test of the model as a whole. accurate “prediction of the past” may replace prediction of the future for the purpose of validating the model. n=1. In other words. {An. To conduct a validation test using historical input data.g. it is recommended that a separate data set be used as the final validation test.
Seven independent replications of the model were run each pf 30 days duration.21 4. with the following results for average number of jobs in the shop. If it is important to detect a difference of 0. what sample size is needed? 3.35 4.05.70 4.8 21. the currently used scheduling rule was incorporated into the model and the resulting output compared to observed system behavior.0 19. The input data were used to drive the simulation model for four runs .9 20. This type of validation test is called a Turing Test.5 on a given day. the modeler will conclude that this test provides no evidence of model inadequacy. The 10 reports should all be in exactly the same format and should contain information of the randomly shuffled and given to the engineer. User a level of significance of a=0.2 Develop and conduct a statistical test to determine if model output is consistent with system behavior. 2.9 22. If the engineer cannot distinguish between fake and real reports with any consistency.01.13 3. who is asked to decide which reports. for average time spent in the shop. and simulations output data are used produce five additional reports. To validate the model. 18.118 systems. electronic counters and devices are used to ease the datacollection task by automatically recording certain types of data.83 4.05 Is model output consistent with system behavior? Conduct a statistical test using a level of significance a=0. By searching the previous year’s computerized records it was estimated that the average number of jobs in the shop was 22. 3. suppose that five reports of system performances over five different days are prepared. For example. the model builder questions the engineer and uses the information gained to improve the model. or when no statistical test is readily applicable persons knowledgeable about system behavior can be used to compare model output to system output.4 22. together with the average number of jobs in the shop (Zi) for each period.1 19. For the job of exercise 1.32 4.5 day. Graded Questions 1. InputOutput Validation Using a Turing Test In addition to statistical tests. A simulations model of a job shop was developed to investigate different scheduling rules. four sets of input data were collected over four different 10 day periods. The model made the following predictions on seven independent replications. System data for the job of exercise 1 revealed that the average time spent by a job in the shop was approximately 4 working days.
6 2 19. How would you validate simulation models? Percentage Points for the Students Distribution with V Degrees of Freedom 0 l . 4.119 of 10 days each and model predictions of average number of jobs in the shop (Yi) were collected. Use a level of significance of a = 0. Explain in detail the 3step approach of Naylor and finger in the validation process.05.8 19.9 Conduct a statistical test to check the consistency of system output and model output. with these results: I Zi Yi 1 21.7 4 19.4 24.1 3 22.7 24.2 21. 5.
120
V
t0.005
t0.01
t0.025
t0.05
t0.10
121 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 40 60 120 00 63.66 9.92 5.84 4.60 4.03 3.71 3.50 3.36 3.25 3.17 3.11 3.06 3.01 2.98 2.95 2.92 2.90 2.88 2.86 2.84 2.83 2.82 2.81 2.80 2.79 2.78 2.77 2.76 2.76 2.75 2.70 2.66 2.62 2.58 31.82 6.92 4.54 3.75 3.36 3.14 3.00 2.90 2.82 2.76 2.72 2.68 2.65 2.62 2.60 2.58 2.57 2.55 2.54 2.53 2.52 2.51 2.50 2.49 2.48 2.48 2.47 2.47 2.46 2.46 2.42 2.39 2.36 2.33 12.71 4.30 3.18 2.78 2.57 2.45 2.36 2.31 2.26 2.23 2.20 2.18 2.16 2.14 2.13 2.12 2.11 2.10 2.09 2.09 2.08 2.07 2.07 2.06 2.06 2.06 2.05 2.05 2.04 2.04 2.02 2.00 1.98 1.96 6.31 2.92 2.35 2.13 2.02 1.94 1.90 1.86 1.83 1.81 1.80 1.78 1.77 1.76 1.75 1.75 1.74 1.73 1.73 1.72 1.72 1.72 1.71 1.71 1.71 1.71 1.70 1.70 1.70 1.70 1.68 1.67 1.66 1.645 3.08 1.89 1.64 1.53 1.48 1.44 1.42 1.40 1.38 1.37 1.36 1.36 1.35 1.34 1.34 1.34 1.33 1.33 1.33 1.32 1.32 1.32 1.32 1.32 1.31 1.32 1.31 1.31 1.31 1.31 1.30 1.30 1.29 1.28
Summary –
122 Validation of simulation models is great importance. Decisions are made on the basis of simulations results thus the accuracy of these results should be subject to question and investigation. The same possible validation technique 1. Develop models with high face validity by consulting persons knowledgeable about system behavior on model structure, model input and model output. 2. Conduct simple statistical tests of input data 3. Conduct a trying tests 4. Compare model o/p to system o/p by means of statistical tests.
123
11
Output Analysis for a Single Model
Output analysis is the examination of data generated by a simulation. Its purpose is to predict the performance of a system or to compare the performance of two or more system designs. Usually random number generators are used to produce the values of the input variables. Therefore, the output data from simulations exhibits random variability. That is, two different streams of random numbers will produce two sets of output data which will differ. If the performance of the system is measured by O, the result of a set of simulations experiments will be an estimator O of O. The precision of the estimator O can be measured by the variance or standard error or O. The purpose of the statistical analysis is to estimate is variance or to determine the number of observations required to achieve a desired precision. A typical output variable, Y, should be treated as a random variable with an unknown distribution. Let Y1, Y2, Yn be an output from a single simulation run e.g. Yi may be production in the Itch hour, inventory cost of Itch week etc. The Yi’s are random variables that will, in general, be neither independent nor identically distributed. Thus, the sequence of random variables Y1, Y2….Yn may be auto correlated. Auto correlation is a measure of a lack of statistical independence. This means that the classical methods (tests) of statistics which assume independence will have to be properly modified. The specification of initial condition may influence the output data. That is the initial conditions may influence the values Y1, Y2……..Yn. For the purpose of statistical analysis, the effect of the initial conditions is that the output observations may not be identically distributed, and the initial observations may not be representative of steady state behavior of the system. An incorrect choice of initial condition may lead to an improper estimate of the steady performance of the simulations model. Types of Simulation with respect to output Analysis Simulations may be either terminating or none terminating, depending on whether there is an obvious way for determining run length.
(time 0) to 3.g. or steadystate. Point Estimation The point estimator of O based on Y1. the model output variables are also random variables.m. Y2……. designing a new system. e. behavior or a non terminating system. simulations of a Bank from 9.m. These conditions should be representative of those for the actual system.Yn be the output data which is called discretetime data. T]. 0 is an arithmetic mean and o is called timeweighted mean. (time Te=360 minutes) A non terminating simulations is one for which there is no natural event E to specify the length of a run. telephone systems. This indicates stochastic (Probabilistic) nature of output variables. Y (t) may be the number of customers in the system at time t. A Simulation of non terminating system starts at simulation time zero under initial conditions defined by the analyst and runs for some analystspecified period of time Te. internet. a simulation is considered to be terminating or not depending on the objective of the simulation and the nature of the system.. properties which are not influenced by the initial conditions of the model at time zero.Yn is defined by 1 n Yi n m .. where E is specified event or set or events which stops the simulations. [è.g.00 a. Such a simulations system “Opens” at time zero under specified initial conditions and “Closes” at the stopping time Te. E. Since some of the model inputs are random variables. Let {Y(t). Stochastic Nature of Output data Consider one run of a simulation model over a period of time. OPD of a Hospital. Te. Y2……. The analyst wants to study steadstate or longrun properties of the systemthat is.124 A terminating simulation is one that runs for some duration of time. Measures of performance and their Estimation Consider the estimation of a performance parameter è (or è). since the initial conditions for a terminating simulation generally affect the desired measures of performance. A steady state simulation is a simulation whose objective is to study longrun. continuous production systems. e.00 p. Yi may be total time spent in system by customer i. of a simulated system.g. Let Y1. è < Te} be the output data which is called continuoustime data continuoustime are used to estimate è. Suppose discretetime data are used to estimate è. Whether.
The point estimator is given by i 1 Y (t )dt TE 0 T Interval estimation Let estimator of ó ( ).. R . The R sample means 1 .Yn.. 2 be a point estimator based on Y1. each run using a different randomnumber stream and independently chosen initial conditions. then the statistic 2 t ( ) is approximately t distributed with degrees of freedom f(say). r] 2 . and r = 1... The sample mean for replication r is given by r 1 nr Y n1 m ri . t a 2 . An approximate 100(1. 2. are statistically independent and identically distributed and are unbiased simulators of .2.. Let ó2( ) = v( ).__ is called the bias in __. r 1. r is such that P[t t a 2 . ….)% confidence interval for is given by t a 2 . r. Let Yn be the n th observation with replication r.. Y2.... for I =1.R. Nr. ….. Let ó2 ( ) be an If ó ( ) is approximately unbiased.. R.125 The point estimator __ is said to be unbiased for __ if E(_) = __. I =2. ( ).. …. E(_) . Output Analysis for Terminating Simulations The Simulation is repeated R times.
2.. Output Analysis for steady state simulations The steady state measure of performance to be estimated is defined by .. R.. we have....126 Confidence – Interval estimation for a fixed number of replications. Suppose that R independent replications are made. Graded Questions 1. r 1. When the output data are of the form ** independent replication. r 0 r 1 R r R r 1 R 1 ( r ) 2 R ( R 1) r 1 and ( r ) 2 A 100(1confidence interval is obtained with f = R1. 3. Discuss output analysis for steady state simulations. is given by. Explain point estimation and interval estimation of è (or è)... r 1 R r R r 1 2 R 1 ( r ) 2 R ( R 1) r 1 and ( r ) A 100 (1) % confidence interval is calculated with f = R1. The overall point estimate.. Discuss the output analysis for terminating simulations and confidence interval estimation for a fixed number of replications. 1 r TE TE Y (t )dt.
. d ) 1 nd j d 1 Y n rj Y1. d ) R r 1 Sample variance 1 R S (Yr Y . d ). d ) 1 R Yr ( n . ( ) var( ) 2 1 n2 con(Y ... d )] The overall point estimator is given by Yr . Y ) n n l 1 j 1 i j where 3. 1. con(Yi . The first method is to initialize the simulation in a state that is more representative of long seen conditions this method is sometimes called intelligent initialization. 2 Statistical Background is required.. where the value of è is independent of the initial conditions.. d ) n .) 2 R 1 r 1 2 .d E[Yr (n. First the initialization bias in steady state simulation is required. (n. define Yr . ( n.. 2. (n. Y j ) var(Yi ) Replications method for steady state simulations for replication r. (n...127 1 n Yi n n i 1 With probability 1. YR ..
R 1 S R When S2 is the usual sample variance of Summary: 1 ...E with confidence 100 (1<) % Batch means for internal Estimation in steady state simulation 5.(Y . Their average 1 R i R i 1 Confidence Interval t 2......QR are independent & identically distributed.. Yj 1 jm i ( j 1) m1Yi d m Sample mean (Y j Y ) S 1 K K j 1 K 1 2 K 2 Y K j 1 2 j KY 2 K ( K 1) 6.e. S R Sample size in steady state simulations suppose it is desired to estimate a long run performance measures è within I.) R 1 r 1 The standard error is given by s...128 R 1 ( Y 2 r RY 2 . R . Confidence intervals for Quantizes R quantile estimates Q1….) 4..
it will be assumed that deletion of data. the simulation analyst must decide on a run length T (i) E for each model (i=1. the pf estimate cannot be used with any degree of reliability. From replication r of system I. When comparing two systems. 2) and a number of replication RI to be made of each model. statistical analysis is needed to determine whether any observed differences are due to differences in design or merely to the random fluctuation inherent in the models. The statistical precision of point estimators can be measured by a standard error estimate or a confidence interval. Comparison of Two System Designs Suppose that a simulation analyst desires to compare two possible configurations of a system. If it is a steady state simulation. the simulation analyst obtains an estimate Yn of the mean . 2). have been used to assure that the point estimators are approximately unbiased estimators of the mean performance measures èi. In measure for system I will be denoted by èi (I = 1. namely O1O2. 12 Comparison and Evaluation of Alternative System Design One of he most important uses of simulation is the comparison of alternative system designs. Since the observations of the response variables contain random variation. The main point is hat simulation o/p data contain some amount of random variability & without some assessment of its magnitude. or other appropriate techniques. The goal of the simulation experiment is to obtain point and interval estimates of the difference in mean performance.129 This chapter emphasized the idea that a stochastic disccrete event simulation is a statistical experiment.
Y2 ) Where Y1 is the sample mean performance measure for system I over all replications... namely {Yri..i. (Y1. are statistically independent of all the observations of simulated system 2. hence. .) represents the standard error of the specified point estimator. A twosided 100 (1)% c..e. R2}. contains zero there is no statistical evidence that one system design is better than the other. r=1…. v is the 100 (1/2) percentage point of a tdistribution with v degrees of freedom. namely {Yr2. èi.R1 . (. Independent Sampling with Equal Variances Independent sampling means that different and independent randomnumber streams will be used to simulate the two systems. r 1...E.130 performance measure. This implies that all the observations of simulated system 1. R1}. the variance of the sample means Yi is given by var(Yri ) i var(Yi ) Ri Ri 2 i=1. Yi1 And v is the degrees of freedom associated with the variance estimator t /2. r=1... and S.... The independence of the replications. r 1. Y2 ) t a 2 . If the confidence interval for conclude that i < 2 (1>2).. 1 2 will always be of the form (Y1.R2 . Assuming that the estimators Yri are (at least approximately) unbiased..2 When using independent sampling Y1 and Y2 are statistically independent. 1 Ri Y R1 r 1 ri 12 is totally to the left (right) of zero then we may If the confidence interval for 1.. it follows that 1 E (Yr1 ). for 2 E (Yr 2 ). v s.
a two sample t confidence interval approach can be used. TE(1) and TE( 2 ) . to If it is reasonable to assume a1 2 = a 2 2 (approximately). therefore.131 var(Yi Y2 ) var(Y1 ) var(Y2 ) 2 12 2 R1 R2 In some cases it is reasonable to assume that the two variances are equal (but unknown in value) that is 2 12 = 2 In a steady state simulation. R1 and R2 must be equal. The point estimate of the mean performances difference is i 2 = Yi Y2 The sample variance for system i is given by Si 2 1 R1 1 R1 2 (Yri Yi ) Yri Ri Yi 2 Ri 1 r 1 Ri 1 r 1 2 12 2 2 (say). the same random numbers are used to simulate both systems. for each replication. the variance 12 decreases as the run length TE(1) increases. R1 R2 2 s. it may be possible to adjust the two run length achieve at least approximate equality of 2 12 and 2 . say R1 R2 R . a pooled estimate of 2 is obtained by Since by assumption Sp 2 2 ( R1 1) S12 ( R2 1) S 2 which has v R1 R2 2 degrees of freedom. the two estimates Yr1 and Yr2 are no longer independent but rather are correlated. Therefore. . (Yi Y2 ) S p 1 1 R1 R2 Correlated Sampling or Common Random Numbers Correlated sampling means that.e. Thus for each replication r..
ai. Let. K. 2. Oi of system i for i = 1. ) % c. but the procedure leading to the interval is designed so that statement Si will be true with probability 1. (D ) = s. and that the ith interval has confidence coefficient 1.i. Let Si be the statement that the ith confidence interval contains the parameter (or difference of two parameters) being estimated. with the probability of correct selection being larger than a prespecified value. or until one of several alternative hypothesis is selected. These procedures can be classified as being fixedsample size procedures. (Yi Y2 ) SD R Comparison of Several System Designs Suppose that a simulation analyst desires to compare K alternative system designs.132 To compute a 100 (1.e. or sequential sampling (or multistage) procedures.a.. A sequential sampling scheme is one in which more and more data are collected until an estimator with a prespecified precision is achieved. a predetermined sample size is used to draw inferences via hypothesis tests or confidence intervals. When it is desired to make statements about several true simultaneously. The comparison will be made on the basis of some specified performance measure.e. with correlated data. Dr Yr1 Yr 2 and D 1 R1 Dr R r 1 The sample variance of the differences {Dr} is computed by 2 SD R 2 1 R1 1 2 Dr2 R D ( Dr D) = R 1 r 1 R 1 r 1 Which has degrees of freedom v = R – 1 Let s. In the first type. Many different statistical procedures have been developed which can be used to analyze simulation data and draw statistically sound inferences concerning the parameters Oil. Bonferroni Approach to Multiple Comparisons Suppose that a total C confidence intervals are computed. The Bonferroni inequality states that . A two stage 9or multistage) procedure is one in which an initial sample is used to estimate HW many additional observations are needed to draw conclusions with a specified precision. This statement may be true or false for a given set of data.
. Regression analysis is one method for estimating the parameters. The true relationship between the variables Y and x is represented by the simulation model. x 2 . x 2 . the wider Jth confidence interval will be. P (one or more statements Si is false I = 1..... the functional relationship is unknown..x m .10. x 2 . Are called design variables and are usually subject to control.be the m controllable design variable. ……... When conducting an experiment making C comparisons. x 2 ...... while the independent variables x1 . x 2 . let x1 . is a random variable. Optimization via Simulation Optimization is a key tool used by operations researchers and management scientists.x k .x m ) be the observed simulation output performance on one run. Y that is related to k independent variables. Y.133 P (all statements Si are true. discreteevent simulations... Metamodeling Suppose that there is a simulation output response variable.. x 2 . say E = 0. x). say x1 . In stochastic.. The dependent variable. the result of any simulation run is a random variable for notation.. The smaller the value of aj....x k ...x k . and the analyst must select an appropriate function containing unknown parameters from a set of data (Y..05 or 0.say Y = f ( x1 .. However....... I=1.... . as desired. in most cases. Thus E provides an upper bound on the probability of a false conclusion.x k ). C) Where 1 j 1 E C j 1 E j C j 1 is called the overall error probability... Our goal is to approximate this relationship by a simpler mathematical function relationship between Y and x1 . and let Y ( x1 ..... first select the overall error probability.……… C) < E or equivalently P (one or more of the confidence intervals does not contain the parameter being estimated) < E . The individual aj may be chosen to be equal ( j = E /C) or unequal... and there are well developed algorithms for many classes of problems.
This is the default definition of optimization used in all commercial packages... 3....x m ) with respect to x1 .. the mathematical expectation...x m )) In other words. Examples: 1..... of performance is maximized or minimized. x 2 .. Output analysis methods.134 What does it mean to optimize Y ( x1 .. The most common definition of optimization is Maximize or minimize E (Y( x1 . we cannot optimize the actual value of Y. Variance reduction techniques.. x 2 . Experimental design models...x m ? Since Y is a random variable. 13 .. x 2 .. or long run average.. An introduction to metamodels & optimization via simulation was also provided. 2.. Summary:A basic introduction to the comparative evaluation of alternative system designs based on data collected from simulation runs.
Case studies of the Simulation of Manufacturing and material handling systems. warehousing & distribution operations. Manufacturing & material handling simulations (i) Prepare the models of manufacturing systems. . Models of Material Handling Models of material handling system may have to contain some of the following types of subsystems.135 Simulation of Manufacturing & Material Handling Systems 1. j) Conveyers ii) Transporters iii) Storage Systems 2. a) Physical Layout b) Labor c) Equipment d) Maintenance e) Workers f) Product g) Production control h) Storage i) Packing & Shipping 1. Examples. Some common Material Handling Equipments There are numerous types of material handling devices common to manufacturing.
B. . University Exam. (4) Session: Flexible Manufacturing Paper: Developing & Analyzing Flexible cell systems using simulation. Papers – November 2004 Computer Simulation & Modeling N. (2) Attempt any four questions out of remaining six questions. (1) Session: Simulation water Manufacturing Paper: Modeling & simulation of material handling for semiconductor water manufacturing. The advantages of trace driven simulations with respect to some of the inputs & the need in some models for accurate modeling of material handling equipment & the control system. (2) Session: Simulation in Aerospace manufacturing. Case Studies: Do the case studies of the simulation of manufacturing & material handling systems.136 An abstract of some of the papers from the 1994 winter simulation conference process during will provide some insight into the types of problems that can be addresses by simulation. Paper: Modeling Aircraft assembly operations (3) Session: Control of Manufacturing systems Paper: Discrete event simulation for shop floor control. Summary: This chapter introduced some of the ideas & concepts most relevant to manufacturing & material handling simulation.1 compulsory. (1) Question No.
3 27.5 92 6. Georgia.2 36.0 87. but the news media says otherwise. These records indicated the point at which 30 accidents occurred.6 36.4 99.3 91.2 69. (a) Explain time series input models with suitable examples.2 23.6 40.3 87.8 106 7.9 116 6.7 45. 3. as follows: 88.6 27.3 23.3 109 4.1 87.7 98.3 97. (b) The highway between Atlanta. Lead time: 6. 30=0. Public safety officers say that the occurrence of accident along the highway is randomly (uniformly) distributed. .3 7.5 4. (a) What is system modeling? Give an example and explain the different types of models. (a) Explain in detail the 3step approach of Naylor and finger in the validation process. (a) State the various test for random numbers and explain briefly any two of them.0 17.7 62. 5. (b) The following data were available for the past 10 years on demand and lead time.3 45.9 104 5. (b) Define simulation.9 97 6. When is simulation appropriate and when it is not? 4.3 76.1 73.3 96 Estimate correlation and covariance. has a high incidence of accident along its 100 km. (a) Name and explain some of the useful statistical models for queuing systems. The Georgia department of Public Safety published records for the month of September.8 21.7 67.8 73.25.8 32.3 90.2 Use the Kolmogorov – Smirnov test to determine whether the distribution is uniformly distributed given D0.9 112 6.4 20. (b) What are the characteristics of queuing system and how would you determine the costs in queuing problems.137 3. Georgia and Athens.3 Demand: 103 83 6.6 6.24 4.
What are the objectives of simulation in a manufacturing system? Give the block diagram and explain the sequence of operation in a manufacturing system. Suggest a suitable simulation language for the same. 7. 6. (b) Discuss the output analysis for terminating simulations and confidence interval estimation for a fixed number of replications.138 (b) Mention some important points which you would consider in selecting simulation software. Write a program for single server queue using any one of the simulation language you know. . (a) Explain point estimation and interval estimation of O (or ).
This action might not be possible to undo. Are you sure you want to continue?
We've moved you to where you read on your other device.
Get the full title to continue reading from where you left off, or restart the preview.