chapter two - dl.lib.uom.lk
TRANSCRIPT
CHAPTER TWO
2. METHODOLOGY, STUDY AREA AND TECHNIQUES TO
BE USED
2 . 1 Methodology
1. Literature Survey
First the literature survey was carried out. Local and international literature on
hospital waiting line studies, hospital management and simulation modeling
were found.
2. Study Area
National Hospital of Sri Lanka was selected as the study area. Since it is not
possible to study the whole hospital system in Sri Lanka, the National Hospital
of Sri Lanka (NHSL) was chosen for this research. NHSL is the largest
hospital in Sri Lanka and it provides number of specialty services. Treatment
^ procedures of all government hospitals are almost similar. Therefore NHSL is
considered as a representative hospital for this research.
3. Data Collection
Available, relevant information were collected in order to obtain a clear
picture of the current system. First the structure of the National Hospital was
studied. Details of main units and subunits of National Hospital: types of
services provided by each unit or subunit were considered. Then Outpatient
Department (OPD) and In-patient section were separately studied.
Out Patient Information
First the service Procedure at Out Patient Department (OPD) was studied.
Then the following data were collected.
(i). The average daily/monthly/annually input (attendance) of patients
(ii). Availability of facilities, resources - staff capacity, waiting area
(iii). Waiting line characteristics i.e. arrival pattern, service pattern
Chapter 2 - Methodology, Study area and Techniques to be Used Chapter 2 - Page 1
Inpatient Information
Service procedure at wards was studied. Then information such as,
(i). Average daily/monthly/annually input (admissions) of patients
(ii). Availability of facilities, resources like staff capacity, bed capacity
equipment and daily average floor patients
(iii). Information on length of stays, pre-operative stays and post-operative
stays were collected.
Allocation of Money
Annual budget allocation information for the National Hospital was
considered.
4. Methods of collecting relevant information
Data collection was done using hospital records, through observations and
through a questionnaire survey. Information like patients' attendance ward
admissions and availability of resources (staff capacity, bed capacity, etc.)
were obtained from hospital records. Waiting line characteristics such as
arrival time, service time, waiting time of patients were measured through
observations. A questionnaire survey was carried out at OPD of National
Hospital to obtain views of hospital staff and patients on hospital service and
hospital waiting lines. Under staff category only the medical staff (doctors)
and nursing staff were considered. In OPD there are 48 medical staff and 33
nursing staff. Questionnaires were distributed to these 81 staff members.
Fifty patients were chosen randomly and were interviewed to obtain their
views on hospital service. Questionnaires were distributed among selected
doctors at inpatient section also.
5. Data Analysis
Several statistical techniques such as, descriptive statistics,, queueing theory
techniques, Chi-square test, Ridit analysis and simulation techniques were
used in data analysis.
Chapter 2 - Methodology, Study area and Techniques to be Used Chapter 2 - Page 2
2.2 National Hospital of Sri Lanka (NHSL)
2.2.1 Background
The National Hospital of Sri Lanka is the main teaching hospital and the final referral
center of this country. This is the largest medical institute functioning under the
purview of the Ministry of Health. The Director of the National Hospital is
responsible to the Director General of Health Services for the smooth functioning of
the institution. At the end of the year 2001, the hospital consists of 2897 beds, which
represent 6% of the total beds in the public sector hospitals in Sri Lanka. A staff
employed is nearly 5800. The total number of consultants is 80 and the grade medical
officers including the intern house officers exceed 700. The Academic staff works as
honorary consultants in the four professorial units, clinical medicine, surgery,
gynaecology and psychiatry.
The hospital is situated in Colombo, the commercial capital city of Sri Lanka on a 30-
acre block of land. The building floor area excluding the area occupied by the
quarters and the Nurses Training School is nearly 75,000 square meters. The total
number of wards is 77. There are 21 operating theatres and 11 intensive care units.
The total number of intensive care beds is 78, out of which 34 are equipped with
ventilators and special monitoring equipment. The hospital has facilities to carry out
advanced medical investigation such as CT Scanning. Major operations such as
Coronary Artery Bypass Grafting (CABG) and kidney transplantation are performed
routinely.
The National Hospital of Sri Lanka is mainly responsible for delivering a
comprehensive range of secondary and tertiary specialist care and medical
rehabilitation in certain identified fields of medicine. The General OPD section of the
Out Patients' Department mainly functions as a primary care unit. In 2001 there was a
total of 192,241 inpatient discharges and 1,064,238 attendances at the specialist
outpatient clinics. The General OPD visits amounted to 550,189 and there were
104,342 OPD visits in Accident Service. All services are provided free of charge.
However, patients who get admitted to the paying wards have to pay for their
services. A total of 48 paying beds are available in the hospital. This hospital is the
Chapter 2 - Methodology, Study area and Techniques to be Used Chapter 2 - Page 3
training center for the undergraduates following the MBBS degree of the Faculty of
Medicine, University of Colombo and also the main training center for the
postgraduate trainees attached to the Postgraduate Institute of Medicine. This hospital
also trains the intern medical officers. Practical training is also provided to the
students attached to the Nurses Training School Colombo, the Post Basic School of
Nursing, the School of Radiography, the School of Pharmacy and the School of
Physiotherapy and Occupational Therapy.
The hospital operates with funds generated under a recurrent budget of Rs. 750
million per annum. The Ministry of Health funds the entire amount.
2.2.2 Mission and Corporate Vision of National Hospital of Sri Lanka
Mission Statement
It is the policy of the government to promote the health of the community. Towards
this goal government provides preventive, curative and rehabilitative services free of
charge. Accordingly the mission of the National Hospital of Sri Lanka is "To provide
a customer or patient focused efficient health care service of the highest standards
in order to build a healthy nation ".
The objectives of National Hospital are,
(a) To meet the needs of the indoor and outdoor patients who seek treatment at
the National Hospital and to improve the hospital environment for their
benefit.
(b) To project the community at large an image of care, efficiency, dedication and
a sense of accountability.
(c) To encourage public participation in the activities of the hospital for provision
of health care.
(d) To provide a rewarding, fair and a challenging environment of work for its
staff, in order to attract and motivate well trained and qualified staff to work
in the hospital.
(e) To advise the government on the need for financial and material resources to
provide adequate secondary and tertiary health care to the community.
Chapter 2 - Methodology, Study area and Techniques to be Used Chapter 2 - Page 4
(f) To collaborate with other agencies and bodies both within and outside the
health care field, locally and overseas, to benefit the community.
(g) To train the medical undergraduates and the postgraduates and the nursing and
para-medical personnel.
(h) To promote research in various fields of medicine.
Corporate Vision
The National Hospital of Sri Lanka has established in its plan for the coming years,
the following corporate vision:
The National Hospital of Sri Lanka with the assistance of the Ministry of Health will
improve further its image and continue to maintain its status as the leading secondary
and tertiary health care provider in Sri Lanka, by developing centers of excellence in
all disciplines of Medicine.
2.2.3 Services Provided by National Hospital
1 . Main Services
1. General Medicine 2. General Surgery
3. Orthopaedic Surgery 4. Dermatology
5. Neurology 6. Cardiology
7. Neurosurgery 8. Oto-Rhino-Laryngology (ENT)
9. Cardiothoracic surgery 10. Psychiatry
11. Genito Urinary Surgery (Urology) 12. Gynaecology
13. Anaesthesia and Intensive Care 14. Plastic and Reconstructive Surgery
15. Burns Unit 16. Rheumatology and Rehabilitation
17. Pathology 18. Radiology
19. Accident Service 20. Paying Wards
21. Out Patients' Department
22. Special Services of the University Clinical Units (Professorial Units)
Chapter 2 - Methodology, Study area and Techniques to be Used Chapter 2 - Page 5
2. Other Services
Medical Examinations and Medical Boards
Every year nearly 4,000 medical examinations are carried out at the National
Hospital, to determine the fitness for employment and 1,500 patients are annually
examined by the Medical Boards to determine the fitness of employees for service
and to assess the disability caused by disease and trauma. In addition more
than 800 ill patients are assesseD each year, with a view to recommending
financial assistance form the President's Fund.
3. Special Programmes
Coronary Artery Bypass Grafting (CABG)
This is the surgical treatment for ischaemic heart disease. This operation is
routinely carried out in most of the developed countries. However in Sri Lanka
the operation was not routinely performed in government hospitals until recently.
It is now being carried out at the National Hospital of Sri Lanka free of charge.
Renal Transplantation
A renal transplantation service is provided by a collaborative project of the
University Surgical and Medical Unit of the Hospital. The first renal transplant
operation at this hospital was done on 5 t h June 1987.
The National Poisons Information Centre
The center provides rapid and accurate information on poisons and
poisoning to physicians and para-medical personnel 24 hours a day, throughout
the year. It collects useful information on pesticides, drugs, and household
requisites. In addition data on venomous snakes and other harmful animal
species and poisonous plants are also available. The center also stores and
supplies antidotes and other drugs required to treat victims of poisoning, during
normal working hours.
Chapter 2 - Methodology, Study area and Techniques to be Used Chapter 2 - Page 6
2.3 Techniques to be used
2.3.1 Descriptive Methods
Tables and simple graphs were used to summarise the data to identify basic
patterns of data.
Chi-Square Test
Chi-square test is used to assess the independence of two variables
(Everitt, 1977).
Table 2.1 Two Dimensional Contingency Table
Columns (Variable 2) 1 2 j c Total
1 nn n12 nic n,. 2 n2i n2.
Rows . . . . . . (Variable 1 ) / « ,y
r nri nr.
Total rij n,2 ru n^. n. = N
Hypothesis
Ho: There is no association between two variables
Hp There is association between two variables
Chi-square Test Statistic
Where Ey's are the expected frequencies of the contingency table. n , x n,
E.. =— -N
Degrees of the freedom for test statistic is, d.f= (r-)x(c-l)=n where r is the number of rows and c is the number of columns of the table.
i • Then X1 ~ Xn-
If X2 > x _, a
m e n Ho is rejected, and it can be said that two variables are
associated at a % significance level.
Chapter 2 - Methodology, Study area and Techniques to be Used Chapter 2 - Page 7
2.3.2 Ridit Analysis
When data are available from two or more samples with the objects from each
sample distributed across a number of ordered categories ridit analysis can be
used to compare two samples. The only assumption made in ridit analysis is
that the discrete categories represent intervals of an underlying but
unobservable continuous distribution. No assumption is made about normality
or any other form for the distribution. Let k denote the number of categories
and n i and n2 be the sample sizes. Then this initial arithmetic is illustrated in
Table 2.2.
Table 2.2 An Illustration of the Calculation of Ridits
Outcome category
(1) (2) (3) (4) (5)=ridit Product
1 f . a , = f , / 2 b , = 0 C| = a i + b i ri=ci/ni
r , * f i
2 f 2 a 2 = f 2 / 2 b 2 = f i c 2= a 2 + b 2 r 2 = c\l n 2
r 2 * f 2
b 3 = f , + f 2
k f k a k = f k / 2 b k = a k - i + f k - i C k = a k + b k r k = c k/ n k r 2 * f 2
Total Sum
1. Column I contains the distribution over the various categories for the
reference group.
2. The entries in column 2 are simply the half of the entries in column 1.
3. The entries in column 3 are the accumulated entries in column 1, but
displaced one category downward.
4. Column 4 gives the sum of entries in column 2 and 3.
5. Divide entries in column 4 by sample size ni to get the ridit value.
• , , j , - SUM The mean ndit is calculated by n =
Similarly ridits and mean ridit for comparison group can be calculated.
Standard error for ridit difference is, s.e.{ri - n ) 2A/3«,« 2
Chapter 2 - Methodology, Study area and Techniques to be Used Chapter 2 - Page 8
The significance of the difference between n and n may be tested by
referring the value of z = = =—. s.e.(r2 -ri)
If z > Za (value of normal distribution at a significance level), the difference is
significant at the a % significance level.
2.3.3 Queueing Theory Techniques
2.3.3.1 Introduction to Queues
Queueing theory involves the mathematical study of queues, or waiting lines.
Queueing systems are prevalent throughout society. The adequacy of these systems
can have an important effect on the quality of life and productivity. Queueing theory
studies the queueing systems by formulating mathematical models of their operation
and then using these models to derive measures of performance (Hiller, Liberman,
1995). In designing queueing systems it should be aimed for a balance between
service to customers (short queues implying many servers) and economic
considerations (not too many servers).
Queue is the flow of customers requiring service and it is characterized by a
maximum permissible number of customers that it can contain. Queues can be finite
or infinite.
Queuing systems occur at many situations like,
1. At banks, super markets, hospitals, schools and some other public and private
places (waiting for service)
2. Queues occur at computers waiting for a response
3. At failure situations (waiting for a failure to occur)
Chapter 2 - Methodology, Study area and Techniques to be Used Chapter 2 - Page 9
Queue Characteristics
Any queuing situation can be broken into 6 main elements.
1 . Input Source (Calling Population)
The population from which arrivals come is referred to as the calling
population. One characteristic of the input source is its size. The size is
the total number of customers that might require service from time to time.
The size can be finite or infinite.
2. Arrival process
The arrival process contains four parts
1. Pattern - Whether it is controlled or not
2. Grouping - The way customers occur
For example customers arrive singly as well as in groups.
3. Time between arrival statistics - Mean, variability and distribution of
successive arrivals.
4. Degree of impatience - Whether customers leave before being served.
3. Physical Characteristics of Queue
This means number of queues (one or more) and the length of the queue
(limited or unlimited capacity).
4. Queue discipline
This means the method by which a customer is selected for service out of
all those awaiting service. Some commonly used queuing disciplines are
described as follows.
1. FIFO - First-In-First-Out
2. LIFO - Last-In-Last-Out
3. JSQ - Join the Shortest Queue •
4. SIRO - Service-In-Random-Order ')"•
5. Favorite server specified (in barber shops)
Chapter 2 - Methodology, Study area and Techniques to be Used Chapter 2 - Page 10
6. Priority queues
In priority discipline queueing models, the queue discipline is based on a
priority system. Thus the order in which members of the queue are
selected for service is based on their assigned priorities,
(i). Non-preemptive priorities - Once a server has begun serving a
customer, the service should be completed without any interruptions,
(ii). Preemptive resume priorities - The lowest customers being served
are interrupted whenever a higher priority customer enters the system.
7. Other
5. Service mechanism
a. Single server, single line
A r r i v a l s Q u e u e
• O O o S e r v e
A r r i v a l s Q u e u e
• o o o
b. Multiple servers, single line
o
o o
S e r v e r 1
S e r v e r 2
S e r v e r 3
c. Sequential servers, single line
A r r i v a l s Q u e u e
• o o o S e r v e r 1 o S e r v e r 2 o S e r v e r 3
d. Multiple servers, multiple lines
A r r i v a l s _ _ Q u e u e
• o o o A r r i v a l s Q u e u e _
* o o o A r r i v a l s
S e r v e r 1
S e r v e r 2
• * o o o S e r v e r 3
Figure 2.1 Common Queueing Systems
Chapter 2 - Methodology, Study area and Techniques to be Used Chapter 2 - Page 11
This is defined by the server's characteristics as follows.
1. Number of servers
a. One - no choice, single server and single line
b. Multiple - choice of servers, multiple server and single line
c. Serial - sequential servers, single line
d. Parallel - multiple server, multiple line
2. Service time/server statistics - Mean, variability and service
distribution
The Basic Queueing Process
Thus the basic queueing process assumed by most queueing models is as follows.
1. An input source or calling population generates customers requiring service
over time. These customers enter the queuing system and join a queue
2. At certain times a member of the queue is selected for service by some rule
known as queue discipline.
3. The required service is then performed for the customer by the service
mechanism.
4. Customers exist or return to the queue.
Most of queueing models assume that all interarrival times are independent and
identically distributed and that all service times are independent and identically
distributed. Such models are labeled as follows.
6. Exit
Customer leaves the system or probability of returning to the system.
Population
Figure 2 .2 Basic Queuing Process
Chapter 2 - Methodology, Study area and Techniques to be Used Chapter 2 - Page 12
A/B/C/D/E (1)
Where, A - The probability distribution for the arrival process
B - The probability distribution for the service process
C - Number of channels (servers)
D - The maximum number of customers allowed in the queueing system
(either being served or waiting for service)
E - The maximum number of customers in total
Some common options for A and B are,
M - Poisson arrival distribution (exponential interarrival distribution) or a
exponential service time distribution
D - Deterministic or constant value
G - General distribution (but with a known mean and variance)
Ek - Erlang distribution (shape parameter = k)
If D and E in (1) are not specified then it is assumed that they are infinite.
For example the M/M/l queueing system, the simplest queueing system, has
Poisson arrival distribution, an exponential service time distribution and a singl
channel (one server). In this system it is always assumed that there is just a singl
queue (waiting line) and customers move from this single queue to the servers.
2.3.3.2 Queuing Notation and Terminology
The following standard terminology and notation will be used.
State of system = number of customers in queueing system.
Queue length = number of customers waiting for service
= state of system minus number of customers being served.
N(t) = number of customers in queueing system at time t (t> 0).
P„(t) - probability of exactly n customers in queuing system at time /, given
number at time 0.
s = number of servers (parallel service channels) in queueing system.
k„ = mean arrival rate (expected number of arrivals per unit time) of neew
customers when n customers are in system.
/j„ = mean service rate for overall system (expected number of customers
completing service per unit time) when n customers are in system.
Chapter 2 - Methodology, Study area and Techniques to be Used Chapter 2 - Page 1
Note : /jn represents combined rate at which all busy servers (those
serving customers) achieve service completion.
When Xn is a constant for all n, this constant is denoted by X. When the mean service
rate per busy server is constant for all n > 1, this constant is denoted by //.
(p„ = S/J when n > s, that is, when all s servers are busy.) Under these circumstances,
l/X and l/ju are the expected interarrival time and the expected service time
respectively.
Utilization Factor p
p = X l{sp) is defined as the utilization factor for the service facility.That is, the
expected fraction of thime the individual servers are busy, because X l(sp) represents
he fraction of the system's service capacity (sp) that is being utilized on the average
by arriving customers (X).
Steady-state Condition
When a queueing system has recently begun operation, the state of the system
(number of customers in the system) will be greatly affected by the initial state. Then
the system is said to be in a transient condition. However after sufficient time has
passed, the state of the system becomes essentially independent of the initial state and
the passed time (except under unusual circumstances that p > 1, in which case the
stateof the system tends to grow continually larger as time goes on). Now the system
has essentially reached the steady-state condition, where the probability distribution
of the state of the system remains the same over time. The following notation
assumes that the system is in a steady-state condition.
Pn = probability of exactly n customers in the queueing system.
L = expected number of customers in queueing system.
Lq - expected queue length (excludes customers being served).
W = waiting time in system (includes service time) for each individual customer.
W=E(W )
W q = waiting time in queue (excludes service time) for each individual customer.
Wq = E(Wq)
Chapter 2 - Methodology, Study area and Techniques to be Used Chapter 2- Page 14
Assume that Xn is a constant X for all n. It has been proved that in a steady-state
queueing process,
L = XW (2)
Lq = XWa. (3)
If the X„ are not equal then A can be replaced in these equations by X , the average
arrival rate over the long run. Now assume that the mean service time is a constant,
for all n > 1. It then follows that,
W=W0+l_ (4)
2.3.3.3 Decision Making
Designing a queueing system involves making one or a combination of the decisions;
number of servers at service facility, efficiency of the servers and number of service
facilities. When such problems are formulated in terms of a queueing model, the
corresponding decision variables usually are s (number of servers at each facility), /j
(mean service rate per busy server) and X (mean arrival rate at each facility).
All those decisions involve the general question of the appropriate level of service to
provide in a queuing system. As mentioned in the Chapter 1, decisions regarding the
amount of service capacity to provide are based primarily on two considerations: the
cost incurred by providing the service as shown in Figure 2.2 and the amount of
waiting for that service as in Figure 2.3. The objective of reducing service costs
recommends a minimal level of service. On the other hand, long waiting times are
undesirable, which recommends a high level of service. Therefore it is necessary to
have some type of compromise. Thus Figure 2.2 and Figure 2.3 are combined as
shown in Figure 2.4. The solution point in the curve gives the best balance between
the average delay in being serviced and the cost of providing that service.
In situations where service is provided on a nonprofit basis to customers external to
the organization such as social service systems, the cost of waiting usually is a social
cost of some kind. Thus it is necessary to evaluate the consequences of the waiting
for the individuals involved and/or for society as a whole and try to impute a
Chapter 2 - Methodology, Study area and Techniques to be Used Chapter 2 - Page 15
monetary value to avoiding these consequences. This kind of cost is quite difficult to
estimate, and it may be necessary to revert to other criteria.
Cost of service per arrival
Level of service
Expected waiting time
Level of service
Figure 2.3 Service cost as a function of service level
Figure 2.4 Expected waiting time as a function of service level
Expected cost
Sum of costs / / Cost of service E(SC)
Cost of waiting E(WC)
Solution Level of service
Figure 2.5 Conceptual solution procedures for many waiting-line problems
2.3.3.4 Statistical Analysis
Mean (Average) and Standard Deviation
Mean 3c
1. Let x be a random variable with values xi, X2, xj, xn then the sample
mean or average , x is defined as,
Chapter 2 - Methodology, Study area and Techniques to be Used Chapter 2 - Page 16
2. In a frequency table with class mid points x / , X2, x j , x„ and
corresponding frequencies fi,f2,f3, ,fn the mean , x is defined as,
x = V^^, where n = Yfi
Standard Deviation a
1. For a random variable x with values xh X2, xs, xn the sample
standard deviation is defined as,
n-l
2. In a frequency table with class mid points Xi, x ? , x j , x „ and
corresponding frequencies / / , / ? , / J , , ./̂ the sample standard
deviation is defined as,
1 5>? -E 1=1 1=1
n-\
/ n
Statistical Distributions
Statistical distribution of arrivals and services should be determined. First a
frequency table should be derived from the raw data and probabilities at different
frequency intervals should be calculated. The distribution determination can be
done roughly, visually by putting data into a bar chart format. More accurately,
statistical distribution can be verified by using the chi square goodness of fit test.
Probability Distribution Function, p(x)
Every statistical distribution can be expressed in a mathematical form, p(x) that can be
used to plot the distribution. The p(x) for a continuous distribution is called a
probability density function (pdf). For a discrete distribution, p(x) is called a
probability mass function (pmf).
Chapter 2 - Methodology, Study area and Techniques to be Used Chapter 2 - Page 17
1. Probability density function for a discrete random variable
Let x be a discrete random variable with values x/, JC?, xs, x „ . With each
possible outcome x,-, suppose p{xi) = Pr(x = x ) be the probability of Xj.
If (a) /?(*,-)> 0 V x,-
(b) !/>(*/) = 1 ,
p is called the discrete density function of x or the probability distribution of x .
2. Probability density function for a continuous random variable
Let x be a continuous random variable.
If (a)/7x;>0Vx,
(b) \ f ( x ) d x = \ ,
function/is called the probability distribution function of x
Functional Form of Statistical Distributions
1 . The Discrete Uniform Distribution
Let a and b constants with a < b. The uniform density on the interval (a, b) is the
density f defined by,
\l{b - a) a < x <b
0 elsewhere /(*)
2. Exponential Distribution
Suppose X represents either inter-arrival or service times. This random variable is
said to have an exponential distribution with parameter p . if it has density function,
f i x )
I M ^ X > 0
0, x < 0
Chapter 2 - Methodology, Study area and Techniques to be Used Chapter 2 - Page 18
3. The Poison Distribution
Suppose time between arrivals or services are exponentially distributed with
parameter [i (>0). Let X be the number of occurrences in a unit time interval. Then X
has a Poisson distribution with parameter [i and density function is defined as,
p(X = x) = JC = 0,1,2,.
x\ 0, elsewhere
4. Normal Distribution
This continuous distribution has a pdf of,
e-(x-fj)2/2a2
f ( x ) = = = — - OO < X < CO
crv I n
where e « 2.71828, n » 3.14159 and x represents the variable of interest with mean p
and standard deviation cr.
5. Erlang distribution
This is a general distribution in that it can be used to approximate many kinds of
distributions such as the exponential, Poisson, normal, and constant depending on the
value of parameter m. The general pdf is,
p ( x ) = m m x m - ' e m x / M , x > 0 , m = 1,2,3, /T(m-1)!
Where m is a shape parameter and a 2 = j f _ 4-5'" m
Chapter 2 - Methodology, Study area and Techniques to be Used Chapter 2 - Page 19
Graphical form of Statistical Distributions
The probability bar charts for some statistical distributions look as follows.
Eiiang distribution
Figure 2.6 Statistical Distributions
Chapter 2 - Methodology, Study area and Techniques to be Used Chapter 2 - Page 2 0
2.3.4 Simulation Techniques
2.3.4.1 Introduction to Simulation
Simulation is a widely used tool for estimating the performance of complex stochastic
systems. Simulation is inherently an imprecise technique. It provides only statistical
estimates rather than exact results and it compares alternatives rather than generating
an optimal one. Simulation provides a way of experimenting with proposed systems
or policies without actually implementing them. Sound statistical theory should be
used in designing these experiments. Long simulation runs often are needed to obtain
statistically significant results. However, variance-reducing techniques can be very
helpful in reducing the length of the runs needed.
Several tactical problems arise when traditional statistical estimation procedures are
applied to simulated experiments. These problems include prescribing appropriate
stating conditions, determining when a steady-state condition has been reached and
dealing with statistically dependent observations. The regenerative method of
statistical analysis can be used to eliminate these problems.
Simulation is a slow and costly way to study a problem. It usually requires a large
amount of time and expense for analysis and programming and considerable computer
running time. Simulation yields only numerical data about the performance of the
system, so that it will not provide any additional insight to the cause-and-effect
relationships within the system.
2.3.4.2 Formulating and Implementing a Simulation Model
Constructing a Model
The first step in a simulation study is to develop a model representing the system to be
investigated. This requires a through familiarization with the operating realities of the
system and the objectives of the study. Then the real system should be reduced to a
logical flow diagram. The system is there by broken into set of components linked
Chapter 2 - Methodology, Study area and Techniques to be Used Chapter 2 - Page 21
together by a master flow diagram, where the components themselves may be broken
down into subcomponents and so on. Ultimately the system is decomposed into a set
of elements for which operating rules may be given. These operating rules predict the
events that will be generated by the corresponding elements, perhaps in terms of
probability distributions. After specifying these elements, rules and logical linkage,
the model needs to be thoroughly tested by piece by piece.
Preparing a Simulation Program
The basic purpose of most simulation studies is to compare alternatives. Therefore the
simulation program must be flexible enough to accommodate readily the alternatives
that will be considered. Most of the instructions in a simulation program are logical,
also some simple arithmetic work required. General simulation programming
languages can be used to simulate real world systems. For example, GPSS and
SIMSCRIPT are two such languages that are widely used. These languages are
designed especially to expedite the type of programming (and reprogramming) unique
to simulation.
Simulation programming languages have several specific purposes. One is to provide
a convenient means of describing the element that commonly appear in simulation
models. Another is to changing the design and operating policies of the system being
simulated, so that the large number of configurations can be considered easily. These
languages also are designed to obtain data and statistics on the behavior of the system
being simulated.
Validating the Model
The typical simulation model consists of a high number of elements, rules and logical
linkages. After the writing and debugging of the computer program, it is important to
test the validity of the model. When some form of the real system has already been in
operation, its performance data should be compared with the corresponding output
data from the model. Standard statistical tests can sometimes be used to determine
whether the difference in the means, variances and probability distributions
generating the two sets of data are statistically significant. The time dependent
Chapter 2 - Methodology, Study area and Techniques to be Used Chapter 2 - Page 22
behavior of the data might also be compared statistically. If the model may be used
again in the future, careful records of its prediction and of actual results should be
kept to continue the validation process.
2.3.4.3 GPSS/PC - General Purpose Simulation System (Minuteman Software)
In 1961 IBM introduced the first commercially successful simulation language,
* General Purpose Simulation System (GPSS). After IBM ceased maintaining their
fifth and final version of GPSS (GPSSV) in the mid 1970s, Wolverine Software
introduced in 1977 an upgraded mainframe version of GPSS called GPSS/H. In 1984,
Minuteman Software developed and successfully marketed GPSS/PC, a
microcomputer version of GPSS. This
language will run on any IBM compatible microcomputer that uses MS-DOS
operating system and has at least 320K of RAM. Obviously the faster the operating
speed of the microcomputer, the faster GPSS/PC will run. In 1988, Minuteman
developed an EMS version that can run on microcomputers with enhanced memory
* (LIM version 3.2 or 4.0) up to 32 megabytes. Hence, GPSS/PC can now be used to
simulate many systems that earlier could only be run using a mainframe GPSS
language.
Simulation Using GPSS/PC
Like any other simulation language, GPSS/PC basically requires block and control
statements, Transactions and Commands to write a simplified computer program.
Semantically meaningful Block statements are used to follow the logical flow of the
k system being modeled (e.g. GENERATE, QUEUE, DEPART, SEIZE, RELEASE). Control
statements are used to, provide blocks with information or to receive information
from blocks, control the flow of transactions through the model or to End a GPSS/PC
session (e.g. FUNCTION, VARIABLE, TABLE, START, END). Transactions are used to
represent the flow of units through the model (e.g. people, parts, information).
Commands are used to help, write, and interact with the program (e.g. EDIT, SAVE,
DISPLAY, RENUMBER, REPORT).
Chapter 2 - Methodology, Study area and Techniques to be Used Chapter 2 - Page 23
Basic GPSS/PC Simulation Blocks and Control Statements
Blocks and control statements can be grouped into categories (permanent entities);
facilities, storages, queues, functions, tables, variables, save-values, matrices and
logicswitches.
1. Facilities - Entities that can handle only one transaction at a time, such as a
bank teller, telephone operator or surgeon.
2. Storages - These entities can be engaged by one or more transactions at a
time such as a warehouse, a group of indistinguishable safe-
deposit booths or an airplane.
3. Queues - Queues form and are kept track of in a simulation model
whether the QUEUE block is used or not.
4. Functions - These are used to input discrete or continuous frequency
distribution data, statistical or otherwise into the model.
5. Tables - Tables allow the models to show results in a frequency-
distribution format.
6. Variables - Mathematical and logical expressions can be evaluated using
variables.
6. Save-values-These are like transaction parameters in that numerical
attributes can be stored for future references. But unlike
parameters this information is available at all times and at all
points in the model.
Block/Control Statement Format
Every GPSS/PC block and control statement has the following format. l : / '
Line number Label Block or Control N a m e Operands (A, B, . . . ) ; C o m m a n d s
"Line number" orders the model statements. The "Label" optionally used with some
blocks, allows for a block or control statement to be referenced elsewhere in the
simulation model. The "Operands" or information fields (one to six) provide data
necessary for the proper operation o f the block or control statement. "Comments"
(descriptive verbiage preceded by a semicolon) can follow all the block and control
Chapter 2 - Methodology, Study area and Techniques to be Used Chapter 2 - Page 2 4
statements. Full line comment statement can be written by putting an asterisk (*) in
the first position of the "Label" field.
Some Commonly Used Block and Control Statements
GENERATE
This block creates original transactions (customers) for future entry to the simulation
model.
Label (opt ional) G E N E R A T E A, B, C, D, E
QUEUE
This block updates queue entity statistics to reflect an increase in content (customers
enter the queue). Label (opt ional) Q U E U E A, B
DEPART
This block registers statistics that indicate a reduction in the content o f a queue entity.
This departs the queue. In order for queue statistics in the output report t o have any
meaning, The QUEUE'S companion block, DEPART must be placed in the simulation
model so that the time transactions spend traversing from the QUEUE block t o its
DEPART block constitutes actual queue o r waiting time.
Label (opt ional) D E P A R T A, B
SEIZE
When the active transaction attempts t o enter a SEIZE block, it waits for o r acquires
ownership o f a facility. This represents a facility that can serve only one customer
(transaction) at a time.
Label (opt ional) SEIZE A
ADVANCE
This block delays the progress o f a transaction for a specified amount o f simulated
time (i.e. serves the customer).
Label (opt ional) A D V A N C E A, B
Chapter 2 - Methodology, Study area and Techniques to be Used Chapter 2 - Page 25
RELEASE
This block releases ownership of a facility or removes a preempted transaction from
contention for a facility. Every SEIZE block needs to be paired with a RELEASE
block in order for facility statistics in the output report to be meaningful. The
RELEASE block defines the end of a particular transaction's ownership of a facility.
Label (optional) RELEASE A
TABLE
The TABLE statement initializes a frequency distribution table.
Label TABLE A, B, C, D
QTABLE
This statement initializes a queue time frequency distribution able.
Label QTABLE A, B, C, D
TRANSFER
This block causes the active transaction to jump to a new location.
Label (optional) TRANSFER A, B, C, D
STORAGE
The STORAGE control statement defines a storage entity and its maximum capacity
in the current model.
Label STORAGE A
TERMINATE
The TERMINATE block removes the active transaction from the simulation and
optionally reduces the termination count. Since transactions take up memory space,
all transactions that are no longer needed in the model should be terminated. At least
one TERMINATE block in the model.
Label (optional) TERMINATE A
Chapter 2 - Methodology, Study area and Techniques to be Used Chapter 2 - Page 26