a study on m/m/c queueing model under monte carlo …€¦ · · 2016-11-05a study on m/m/c...
Post on 15-May-2018
213 Views
Preview:
TRANSCRIPT
International Journal of Pure and Applied Mathematical Sciences.
ISSN 0972-9828 Volume 9, Number 2 (2016), pp. 109-121
© Research India Publications
http://www.ripublication.com
A Study on M/M/C Queueing Model under Monte
Carlo Simulation in a Hospital
P.Umarani1 and S.Shanmugasundaram2
1Department of Mathematics, AVS Engineering College,
Salem-3, Tamilnadu, India.
E-mail: umasaravana2000@gmail.com.
2Department of Mathematics, Government Arts College,
Salem – 7, Tamilnadu, India.
E-mail: sundaramsss@hotmail.com.
Abstract
In this paper, we analyze the performance of the multi-speciality hospital using Monte
Carlo Simulation method with different service distributions. Also we analyze the
future behaviour of the multi-speciality hospital both in simulation and analytical
method. Numerical examples illustrate that the feasibility of the system.
Keywords: Inter - arrival Time, Service time, Waiting time, M/M/C queueing model,
Monte Carlo Simulation, Queue length.
INTRODUCTION
A queue is a waiting line of people or things to be handled in a sequential order[1].
Queueing theory was introduced by A.K.Erlang in 1909. He published various articles
about the study of jamming in telephone traffic[2]. In a queueing model, customers
arrive from time to time and join a queue (waiting line), are eventually served, and
finally leave the system. The key elements of a queueing system are the customers
and servers. The term “customer” can refer to people, machines, trucks, patients,
pallets, airplanes, e-mail cases, orders or dirty clothes- anything that arrives at a
facility and requires service. The term “server” might refer to receptionists,
repairpersons, mechanics, tool-crib clerks, medical personal, automatic storage and
retrieval machines, runways at an airport, automatic packers, order pickers, CPU’s in
110 P.Umarani and S.Shanmugasundaram
a computer, or washing machines – any resource (person, machine, etc.) that provides
the required service[3].
Features of queueing systems: (i).The calling population: The population of potential
customers, referred to as the calling population, may be assumed to be finite or
infinite. For such systems, this assumption is usually innocuous and, furthermore, it
might simplify the model. (ii). System capacity: In many queueing systems, there is a
limit to the number of customers who may be in the waiting line or system. (iii).
Arrival process: Arrivals may occur at scheduled times or at random times. At random
times, the inter-arrival times are usually characterized by a probability distribution. In
addition, customers may arrive one at a time or in batches. The batch may be of
constant size or of random size. The most important model for random arrivals is the
Poisson Arrival Process. (iv). Service Pattern: It represents the pattern in which a
number of customers leaves the system. Departures may also be represented by the
service time, which is the time period between two successive services. The number
of customers served per unit of time is called service rate. This rate assumes the
service channel to be always busy. A general assumption used in most of the models
is that the service time is randomly distributed according to exponential distribution.
(v).Service Channels: The queueing system may have single service channel. The
system can also have a number of service channels where the customers may be
arranged in parallel or in series or complex combination of both[4]. (vi). Queue
Behaviour and Queue Discipline: Queue behaviour refers to the actions of customers
while in a queue waiting for service to begin. In some situations, there is a possibility
that incoming customers will balk, renege, or jockey. Queue discipline refers to the
logical ordering of customers in a queue and determines which customer will be
chosen for service when a server becomes free. Common queue disciplines include
first-in-first-out (FIFO); last-in first-out (LIFO); service in priority(PR)[5].
MODEL DESCRIPTION
For two servers, while the arrival distribution is the same, the service distributions
differs. In this paper, we discuss the application of simulation in M/M/C queueing
model in a hospital. Chi-Square test has been used to verify if the arrival is Poisson
distribution and if the services are Exponential distribution. The simulation table
provides a systematic method of tracking system state over time. The main aim of this
paper is to find the waiting time of a patient in the queue, the waiting time of a patient
in the hospital, the idle time of the doctors, the queue length in M/M/C queueing
model and also to compare the simulation and analytical solutions. This paper
Arrival Departureeee
Queue Server1
Server2
A Study on M/M/C Queueing Model under Monte Carlo Simulation in a Hospital 111
composes: Section 1 gives introduction about basic simulation model, Section 2 gives
the Chi-square test, Section 3 gives calculation of simulation and analytical methods,
Section 4 describes the numerical study and Section 5 gives the conclusion.
1. Simulation
A Simulation is the imitation of the operation of a real-world process or system over
time. Whether done by hand or on a computer, simulation involves the generation of
an artificial history of a system and the observation of that artificial history to draw
inferences concerning the operating characteristics of the real system. The behaviour
of a system as it evolves over time is studied by developing a simulation model. This
model usually takes the form of a set of assumptions concerning the operation of the
system. Simulation can also be used to study systems in the design stage, before such
systems are built. Thus, simulation modelling can be used both as an analysis tool for
predicting the effect of changes to existing systems and as a design tool to predict the
performance of new systems under varying sets of circumstances. Mr.John Von
Neumann and Mr. Stanislaw Ulam were given the first important application in the
behaviour of neutrons in the nuclear shielding problem [6].
Monte Carlo methods are used for simulating the behaviour of physical and or
mathematical systems, especially when analytical solutions are difficult to obtain.
These methods are non-deterministic or stochastic. Applications of Monte Carlo
methods are quite varied: these include physics, computer science, engineering,
environmental sciences, finance etc., and systems with uncertainties in addition to
pure mathematical systems not involving any uncertainty [7]. A random value of X is
known as a random number. In practice, values of X can be deterministically
generated and the random numbers so generated are known as pseudorandom
numbers: such a pseudorandom number contains a bounded (fixed) number of digits,
implying that continuous uniform distribution is approximated by a discrete one.
Pseudorandom numbers are made use of it in simulation studies. Monte Carlo
methods need large number of pseudorandom numbers and computers are in their
generation [8].
2. Chi-Square Test Goodness-of-fit tests provide helpful guidance for evaluating the suitability of a
potential input model. One procedure for testing the hypothesis that a random sample
of size n of the random variable 𝑋 follows a specific distributional form is the Chi-
square Goodness-of-fit test. The test procedure begins by assuming the n
observations into a set of 𝑘 class intervals or cells. The test statistic is given by 2 =
∑(𝑂𝑖−𝐸𝑖)2
𝐸𝑖
𝑘𝑖=1 where Oi is the observed frequency in the ith class interval and Ei is the
expected frequency in that class interval. The expected frequency for each class
interval is computed as E i= npi where pi is the theoretical, hypothesized probability
associated with the ith class interval. It can be shown that 2 approximately follows
the Chi-square distribution with k-s-1 degrees of freedom, where s represents the
number of parameters of the hypothesized distribution estimated by the sample
statistics. The hypotheses are H0: The random variable 𝑋, conforms to the
112 P.Umarani and S.Shanmugasundaram
distributional assumption with the parameter given by theparameter estimates. H1:
The random variable 𝑋 does not conform.
3. Calculation
At a hospital, the patients’ arrival is a random phenomenon and the time between the
arrivals varies from 6 a.m. to 12 p.m. and the service time of doctor 1 varies from four
minutes to thirty two minutes and the service time of doctor 2 varies from five
minutes to forty minutes[9]. The frequency distributions are given below.
Table 1: ARRIVAL DISTRIBUTION
S.No Time No of Patients Probability
1 0-6 0 0
2 6-7 0 0
3 7-8 1 0.01
4 8-9 2 0.01
5 9-10 3 0.02
6 10-11 7 0.04
7 11-12 8 0.04
8 12-13 12 0.07
9 13-14 17 0.10
10 14-15 21 0.13
11 15-16 24 0.15
12 16-17 22 0.13
13 17-18 18 0.11
14 18-19 9 0.06
15 19-20 8 0.05
16 20-21 7 0.04
17 21-22 3 0.02
18 22-23 3 0.02
19 23-24 0 0
Total - 165
A Study on M/M/C Queueing Model under Monte Carlo Simulation in a Hospital 113
Table 2: CHI-SQUARE TEST FOR ARRIVAL
Null Hypothesis𝐻0: The Poisson distribution fits well into the data.
Alternative Hypothesis 𝐻1 : The Poisson distribution does not fit well into the data.
Level of significance: 𝛼 = 0.01 .Test statistic: Under𝐻0, the test statistic is
2 =∑(𝑂𝑖−𝐸𝑖)2
𝐸𝑖
𝑘𝑖=1 ; �̅� = 0.957 ; P(x) =
𝑒−𝜆𝜆𝑥
𝑥!
Degrees of freedom = 11 . Tabulated value of 2 for 11 degrees of freedom at 1%
level of significance is 24.725. Since 2 < 20.01, we accept 𝐻0 and conclude that
the Poisson distribution is a good fit to the given data.
X
No of Patients
f
fX
P(x)
Ei
2
0 0
13
0 0.000047 0
10
0.3
1 0 0 0.00047 0
2 1 2 0.0023 0
3 2 6 0.0077 1
4 3 12 0.0194 3
5 7 35 0.0386 6
6 8 48 0.0641 11 1.125
7 12 84 0.0912 15 0.75
8 17 136 0.1135 19 0.235
9 21 189 0.1256 21 0
10 24 240 0.125 21 0.375
11 22 242 0.1132 19 0.409
12 18 216 0.0939 16 0.222
13 9 117 0.0719 12 1
14 8 112 0.0511 9 0.125
15 7 105 0.0339 6 0.142
16 3
6
48 0.0211 3
6 0
17 3 51 0.0123 2
18 0 0 0.0068 1
Total 165 1643 165 4.683
114 P.Umarani and S.Shanmugasundaram
Table 3: TAG NUMBER FOR ARRIVAL DISTRIBUTION
S.No Time No of Patients Probability Cumulative Probability Tag numbers
1 0-6 0 0 0 0
2 6-7 0 0 0 0
3 7-8 1 0.01 0.01 0
4 8-9 2 0.01 0.02 0 – 1
5 9-10 3 0.02 0.04 2 - 3
6 10-11 7 0.04 0.08 4 – 7
7 11-12 8 0.04 0.12 8 – 11
8 12-13 12 0.07 0.19 12 – 18
9 13-14 17 0.10 0.29 19 – 28
10 14-15 21 0.13 0.42 29 – 41
11 15-16 24 0.15 0.57 42 – 56
12 16-17 22 0.13 0.70 57 – 69
13 17-18 18 0.11 0.81 70 – 80
14 18-19 9 0.06 0.87 81 – 86
15 19-20 8 0.05 0.92 87 – 91
16 20-21 7 0.04 0.96 92 – 95
17 21-22 3 0.02 0.98 96 – 97
18 22-23 3 0.02 1 98 - 100
Total - 165
Table 4: SERVICE DISTRIBUTION FOR DOCTOR I
S.No Time No of Patients Probability
1 0 - 4 5 0.08
2 4 - 8 7 0.11
3 8 - 12 15 0.23
4 12 - 16 13 0.20
5 16 - 20 12 0.19
6 20 - 24 7 0.11
7 24 - 28 3 0.05
8 28 - 32 2 0.03
Total - 64 1
A Study on M/M/C Queueing Model under Monte Carlo Simulation in a Hospital 115
Table 5: CHI-SQUARE TEST FOR DOCTOR I
X
No of Patients
f
fX
P(x)
Ei
2
1 5 5 0.2 13 4.923
2 7 14 0.154 10 0.9
3 15 45 0.2 13 0.307
4 13 52 0.10 7 5.143
5 12 60 0.10 7 3.571
6 7 42 0.10 7 0
7 3 5 21 0.05 4 7 0.57
8 2 16 0.0324 3
Total 64 255 - 64 15.414
Lvel of significance: 𝛼 = 0.01 Test statistic: Under𝐻0, the test statistic is
2 = ∑(𝑂𝑖−𝐸𝑖)2
𝐸𝑖
𝑘𝑖=1 ; �̅� = 3.9 ; λ = 26 ; P(x) = λ 𝑒−𝜆𝑥
Degrees of freedom = 6. Tabulated value of 2 for 6 degrees of freedom at 1% level
of significance is 16.812. Since 2 < 20.01, we accept 𝐻0 and conclude that the
exponential distribution is a good fit to the given data.
Table 6: TAG NUMBER FOR SERVICE DISTRIBUTION OF DOCTOR I
S.No Time No of Patients Probability Cumulative Probability Tag numbers
1 0 - 4 5 0.08 0.08 0 – 7
2 4 - 8 7 0.11 0.19 8- 18
3 8 - 12 15 0.23 0.42 19 – 41
4 12 - 16 13 0.20 0.62 42 – 61
5 16 - 20 12 0.19 0.81 62 – 80
6 20 - 24 7 0.11 0.92 81 – 91
7 24 - 28 3 0.05 0.97 92– 96
8 28 - 32 2 0.03 1 97– 100
Total - 65 1 - -
116 P.Umarani and S.Shanmugasundaram
Table 7: SERVICE DISTRIBUTION FOR DOCTOR II S.No Time No of Patients Probability
1 0 - 5 11 0.13
2 5 - 10 13 0.15
3 10 - 15 16 0.19
4 15 - 20 17 0.20
5 20 - 25 14 0.16
6 25 - 30 8 0.09
7 30 - 35 5 0.06
8 35 - 40 2 0.02
Total 86
Table 8: CHI-SQUARE TEST FOR DOCTOR II
X
No of
Patients
f
fX
P(x)
Ei
2
1 11 11 0.206 18 4.4
2 13 26 0.2 18 1.9
3 16 48 0.12 11 1.5
4 17 68 0.1 9 3.7
5 14 70 0.1 9 1.7
6 8 48 0.1 9 0.125
7 5 7
35 0.1 9 12
2.1
8 2 16 0.0311 3
Total 86 322 86 15.425
Level of significance : 𝛼 = 0.01 Test statistic: Under 𝐻0, the test statistic is
2 = ∑(𝑂𝑖−𝐸𝑖)2
𝐸𝑖
𝑘𝑖=1 ; �̅� = 3.7 ; λ = o.27 ; P(x) = λ 𝑒−𝜆𝑥 Degrees of
freedom = 6. Tabulated value of 2 for 6 degrees of freedom at 1% level of
significance is 16.812 . Since 2 < 20.01, we accept 𝐻0 and conclude that the
exponential distribution is a good fit to the given data.
Table 9: TAG NUMBER FOR SERVICE DISTRIBUTION OF DOCTOR II
S.No Time No of
Patients
Probability Cumulative
Probability
Tag
numbers
1 0 - 5 11 0.13 0.13 0 – 12
2 5 - 10 13 0.15 0.28 13 – 27
3 10 - 15 16 0.19 0.47 28 – 46
4 15 - 20 17 0.20 0.67 47 – 66
5 20 - 25 14 0.16 0.83 67 – 82
6 25 - 30 8 0.09 0.92 83 – 91
7 30 - 35 5 0.06 0.98 92 – 97
8 35 - 40 2 0.02 1 98 - 100
Total 86
A Study on M/M/C Queueing Model under Monte Carlo Simulation in a Hospital 117
Table 10 : DISTRIBUTION FOR DOCTOR CHOOSEN
S.No Server Probability Cumulative
Probability
1 1 0.5 0.5
2 2 0.5 1
Table 11: TAG NUMBER FOR DOCTOR CHOOSEN
S.No Server Probability Cumulative
Probability
Tag numbers
1 1 0.5 0.5 0 - 49
2 2 0.5 1 50 - 99
Table 12: SIMULATION FOR MULTI - SERVER MODEL
S.No
Ra
nd
o
m
nu
mb
er
Inte
r
arri
val
tim
e
Actu
al
tim
e R
an
do
m
nu
mb
er
Servic
e
Tim
e R
an
do
m
nu
mb
er
Server
ch
oo
sen
DOCTOR 1
DOCTOR 2
Wa
itin
g
tim
e o
f
cu
sto
me
r i
n
qu
eu
e
Wa
itin
g
tim
e o
f
cu
sto
me
r i
n
ho
spit
al
Qu
eu
e
len
gth
Service
begins
Service
ends
Idle
time
Service
begins
Service
ends
Idle
time
1 58 16 6.16 65 20 22 1 6.16 6.36 16 - - - - 20 -
2 68 16 6.32 91 30 98 2 - - - 6.32 7.02 32 - 30 -
3 53 15 6.47 30 12 01 1 6.47 6.59 11 - - - - 12 -
4 07 10 6.57 66 20 71 2 - - - 7.02 7.22 - 5 25 1
5 99 22 7.19 32 12 58 2 - - - 7.22 7.37 - 3 15 1
6 33 14 7.33 29 12 14 1 7.33 7.45 34 - - - - 12 -
7 42 15 7.48 11 8 28 1 7.48 7.56 3 - - - - 8 -
8 45 15 8.03 43 16 68 2 - - - 8.03 8.18 26 - 16 -
9 54 15 8.18 40 12 69 2 - - - 8.18 8.33 - - 12 -
10 15 12 8.30 65 20 46 1 8.30 8.50 34 - - - - 20 -
11 20 13 8.43 82 25 53 2 - - - 8.43 9.08 10 - 25 -
12 46 15 8.58 73 20 33 1 8.58 9.18 8 - - - - 20 -
13 57 16 9.14 15 10 78 2 - - - 9.14 9.24 6 - 10 -
14 81 18 9.32 70 20 97 2 - - - 9.32 9.57 8 - 20 -
15 78 17 9.49 65 20 86 2 - - - 9.57 10.17 - 8 28 1
16 12 12 10.01 33 12 59 2 - - - 10.17 10.32 - 16 28 1
17 50 15 10.16 54 16 75 2 - - - 10.32 10.52 - 16 32 1
18 95 20 10.36 87 24 70 2 - - - 10.52 11.22 - 16 40 1
19 82 18 10.54 27 10 02 1 10.54 11.06 96 - - - - 10 -
20 35 14 11.08 37 12 57 2 - - - 11.22 11.37 - 14 26 1
21 82 18 11.26 99 32 46 1 11.26 11.58 20 - - - - 32 -
22 63 16 11.42 94 35 66 2 - - - 11.42 12.17 5 - 35 -
23 03 9 11.51 12 8 09 1 11.58 12.06 - - - - 7 15 1
24 90 19 12.10 56 16 21 1 12.10 12.26 4 - - - - 16 -
25 39 14 12.24 51 20 48 1 12.26 12.42 - - - - 2 22 1
26 77 17 12.41 80 20 52 2 - - - 12.41 1.06 24 - 20 -
118 P.Umarani and S.Shanmugasundaram
27 88 19 1.00 66 20 91 2 - - - 1.06 1.26 - 6 26 1
28 63 16 1.16 03 4 02 1 1.16 1.20 34 - - - - 4 -
29 47 15 1.31 69 20 80 2 - - - 1.31 1.36 5 - 20 -
30 92 20 1.51 72 20 97 2 - - - 1.51 2.16 15 - 20 -
31 57 16 2.07 24 12 67 2 - - - 2.16 2.26 - 9 21 1
32 23 13 2.20 43 16 37 1 2.20 2.36 60 - - - - 16 --
33 17 12 2.32 0 5 92 2 - - - 2.32 2.37 6 - 5 -
34 56 15 2.47 07 4 55 2 - - - 2.47 2.52 10 - 4 -
35 38 14 3.01 83 24 28 1 3.01 3.25 25 - - - - 24 -
36 55 15 3.16 63 20 80 2 - - - 3.16 3.36 24 - 20 -
37 01 8 3.24 86 24 28 1 3.25 3.29 - - - - 1 25 1
38 41 14 3.38 39 15 80 2 - - - 3.38 3.53 2 - 15 -
39 03 9 3.47 46 16 52 2 - - - 3.53 4.08 - 6 22 1
40 14 12 3.59 30 15 06 1 3.59 4.11 30 - - - - 15 -
41 69 16 4.15 10 8 61 2 - - - 4.15 4.20 7 - 8 -
42 28 13 4.28 02 4 29 1 4.28 4.32 17 - - - - 4 -
43 98 22 4.50 19 12 52 2 - - - 4.50 5.00 30 - 12 -
44 98 22 5.12 07 4 78 2 - - - 5.12 5.17 12 - 4 -
45 88 19 5.31 45 16 70 2 - - - 5.31 5.46 14 - 16 -
46 89 19 5.50 13 8 88 2 - - - 5.50 6.00 4 - 8 -
47 90 19 6.09 31 12 10 1 6.09 6.21 97 - - - - 12 -
48 91 19 6.28 03 4 84 2 - - - 6.28 6.33 28 - 4 -
49 75 17 6.45 12 8 24 1 6.45 6.53 24 - - - - 8 -
50 57 16 7.01 12 8 15 1 7.01 7.09 8 - - - - 8 -
Total 781 - - 753 - - - - 521 - - 268 109 862 13
Simulation Calculation
Average Arrival Time = 15.62 hr
Average Service Time = 15.06 min
Average Waiting Time of a Patient in Queue = 2.18 𝑚𝑖𝑛
Average Waiting Time of a Patient in a hospital = 17.24
Average Number of Patients in the Queue = 0.26
Average Idle Time of doctor 1 = 7.08
Average Idle Time of doctor 2 = 10.02
Analytical Calculation
Average Arrival time = 15.52 hr
Average Service time of doctor 1 = 13.96 min
Average Service Time of doctor 2 = 16.1 min
Average Waiting Time of a Patient in Queue = 1.66
Average Waiting Time of a Patient in first doctor’s clinic= 15.6𝑚𝑖𝑛
Average Waiting Time of a Patient in second doctor’s clinic = 17.76 𝑚𝑖𝑛
Number of Patients in the Queue = 0.1
Number of Patients in first doctor’s clinic = 1
Number of Patients in second doctor’s clinic = 1
A Study on M/M/C Queueing Model under Monte Carlo Simulation in a Hospital 119
4. Numerical Study
Comparison of Arrival and Service in Simulation and Analytical method
0
2
4
6
8
10
12
14
16
18
λ Ls
Simulationmethod
Analyticalmethod
14.5
15
15.5
16
16.5
17
17.5
λ Ws
Simulationmethod
Analyticalmethod
0
5
10
15
20
μ1 Ws
Simulationmethod
Analyticalmethod
120 P.Umarani and S.Shanmugasundaram
CONCLUSION In this paper, we have presented a simulation table for queueing system with a
multiple service station. Here, we have developed a model for a multi-speciality
hospital and to decide whether two doctors are enough or to increase the number of
doctors in future. Numerical examples illustrate that analytical and simulation
methods are almost same. This has given the feasibility of the system. The main
purpose of this study is to develop an efficient procedure in a hospital for the future.
REFERENCES
[1] Syed Shujauddin Sameer (2014), “Simulation: Analysis of Single Server
Queueing Model”, International Journal of Information Theory,Vol.3, No.3,
doi:10.5121/ijit.2014.330547.
13.5
14
14.5
15
15.5
16
16.5
17
17.5
μ2 Ws
Simulationmethod
Analyticalmethod
0
2
4
6
8
10
12
14
16
18
20
Lq Ls Ws Wq
Simulationmethod
Analyticalmethod
A Study on M/M/C Queueing Model under Monte Carlo Simulation in a Hospital 121
[2] Erlang,A.K (1909), “The Theory of Probabilities of Telephone
Conversations”, Nyt Jindsskriff Mathematic, B20, 33-39.
[3] Banks,J., Carson,J.S., Nelson,B.L., and Nicol,D.M(2001), “Discrete Event
System Simulation”, Prentice Hall International Series, Third Edition, 24 - 37.
[4] Shanmugasundaram,S. and Banumathi.P (2015), “A Study on Single Server
Queue in Southern Railway using Monte Carlo Simulation”, Global Journal of
Pure and Applied Mathematics, ISSN 0973 – 1768, Volume 11.
[5] Little,J.D.C(1961), “A Proof for the Queueing formula : L = λw”, Operations
Research, Volume 9(3), pp.383 – 387, doi:10. 2307/167570.
[6] Shanmugasundaram,S. and Punitha,S (2014), “A Study on Multi Server
Queueing Simulation”, International Journal of Science and Research, ISSN:
2319 – 7064,Volume 3, Issue 7, pp 1519 - 1521.
[7] Wijewickrama,A.K.A (2006), “Simulation Analysis for Reducing Queues in
Mixed Patients’ Outpatient Department”, International Journal of Simulation
Modelling, 5, 56- 68.
[8] Kim,B.J(2011), Conceptualization of Traffic Flow for Designing, Toll Plaza
Configuration: A Case Study using Simulation with Estimated Traffic
Volume. 18(1): 51-57.
[9] Shanmugasundaram,S. and P.Umarani(2016), “A Simulation Study on M/M/1
Queueing Model in a Medical Centre”, International Journal of Science and
Research, pp284 – 288, e – ISSN :2319 - 7064, Volume5, Issue 3.
top related