0% found this document useful (0 votes)
49 views

Bulk Service

This document describes a simulation model of a bulk service queueing system. Clients arrive according to a Poisson process and servers arrive periodically to serve multiple clients simultaneously. The number of clients served per period is limited by the server's service capacity and time. The simulation tracks key metrics like waiting times, queue lengths, and throughput over multiple cycles. It compares the results to theoretical M/M/1 models and Powell's approximation to analyze differences in system performance under varying load levels. The objectives are to evaluate how well simpler models match the realistic simulation and to assess the variability in results from running simulations with different numbers of cycles.

Uploaded by

Unai Sanchez
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
49 views

Bulk Service

This document describes a simulation model of a bulk service queueing system. Clients arrive according to a Poisson process and servers arrive periodically to serve multiple clients simultaneously. The number of clients served per period is limited by the server's service capacity and time. The simulation tracks key metrics like waiting times, queue lengths, and throughput over multiple cycles. It compares the results to theoretical M/M/1 models and Powell's approximation to analyze differences in system performance under varying load levels. The objectives are to evaluate how well simpler models match the realistic simulation and to assess the variability in results from running simulations with different numbers of cycles.

Uploaded by

Unai Sanchez
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

A REALISTIC BULK SERVICE SYSTEM

A waiting system (W.S.) is organized as follows: clients arrive following a Poisson process with a
rate of clients per unit of time. At irregular time instants Ti a server is activated and tries to serve as
many clients as possible during a period of service xi . During this period of service the number of served
clients that the length xi of the period of service allows for, is Si , because, actually, each client requires
an individual service time, which, although very short is not neglected in this model. This individual
service time is also random with a given probability distribution. This individual service time will be on
average much shorter than the period between server arrivals. On the other hand a second limitation is
given by some physical capacity to allocate served clients. The maximum number of served clients that
can be allocated is physically limited by ci , also a random number of known probability distribution.
The systems working is made up by a number of N cycles (0 to N 1). Cycle i (i = 0, ..., N 1)
begins with the arrival of server i and ends with the arrival of server (i + 1); server 0 is a null server and
simply opens the clients arrival process. Nevertheless, the entire process ends upon departure of server
N , i.e. at time TN + xN in order to not exclude the clients served by the last server N .
If at the beginning of cycle i the number of non served clients is Xi , then the number of non-served
clients at the end of the next cycle (i + 1) is given by:
Xi+1 = max{Xi + Ai min{Si+1 , ci+1 }, 0}
and the number of served clients zi , which is carried out by server i at the beginning of cycle i is given
by:
zi = min{Xi + Ai , ci , Si };
where
i = inter-arrival time between server i and server i + 1. (0 is thus the time until arrival of the first
server)
i1
Ti = time instant of arrival of i-th server, thus Ti = =0
, i = 0, 1, ...N 1; T0 0
xi = available service time used for i-th server
Ai = number of client arrivals during i-th period. It is assumed that arrivals occur during a time
interval of length i + xi+1 . The first coming server that may provide service to these clients will be
server i + 1. Clients are assumed to arrive following a poissonian pattern process of arrivals per
unit of time. The time between client arrivals U is thus exponentially distributed and E[U ] = 1/.
Xi = amount of clients that remain in W.S. left without service by server i 1.
Yi = maximum amount of passengers in W.S. just before service i-th
ci = physical capacity of i-th server. It is assumed random but always bounded by a maximum
physical capacity C, i.e., ci C.
Si = maximum number of clients that can be served during service time xi . The limitation on the
time xi available for service makes that the actual maximum number of clients that can be served
and thus the actual capacity may be given by i = min{ci , Si }.
- Previous i , Ti , xi , Ai , Xi , Yi , ci , i and Si can be considered as instances of generic random variables
, T, x, A, X, Y, c, and S, then the loading factor of the queue is given by:
=

E[A]
(< 1)
min{E[c], E[S]}

- During a service period, clients are served at a rate and then E[S] = E[x]

2
cycle i=2

cycle i=1

cycle i=0
x1

Y0
X0=0

A01

x3

x2

Y1

z1
c1
S1

X1

2
T1 A0

A11

T2

z2
c2
S2

Y2
X2

A12

A21

T3

z3
c3
S3

X3

A22

Figura 1: A sample path of the queueing system.

= 0, Y = 0, ...
Init Set all variables to 0. x0 = 0; T0 = 0, X
For i = 0, 2, 3, ....N 1
1. Generate servers capacity ci+1 ; Generate service time xi+1 ;
Generate servers inter-arrival time i xi .
2. Generate number of arrivals A1i during a time interval of length i xi .
Evaluate the accumulated waiting time Wq,i of the A1i arrived clients.
3. Generate number of arrivals A2i during a time interval of length xi+1 .
Evaluate the accumulated serviced time Di of the A2i arrived clients during the service cycle i.
4. Let Ai = A1i + A2i ;
5. Let Wi = Wq,i + A1i xi+1 + Di ; Let Wi = Wq,i + Di ;
6. Generate maximum number of services Si+1 that can be carried out
during a service time of length xi+1
7. Xi+1 = max{Xi + Ai min{Si+1 , ci+1 }, 0}; (non-served clients)
8. zi+1 = min{Xi + Ai , ci+1 , Si+1 }; (served clients)
9. Yi = Xi + A1i (peak number of clients) ; Ti+1 = Ti + i
10. Evaluate statistics:
2
;
a) = + i2 ; c = c + c2i+1 ; z = z + zi+1
b) A = A + Ai ; W = W + Wi ; W = W + Wi ; Z = Z + zi+1 ;, S = S + Si+1
= max{X,
Xi+1 }; Xmin = min{Xmin , Xi+1 }; X = X + Xi+1 ; X = X + X 2
c) X
i+1
= + min{Si , ci+1 } (the served clients); c = c + ci+1 ; = + min2 {Si+1 , ci+1 }
Y = max{Y , Yi }; Ymin = min{Ymin , Yi }; Ym = Ym + Yi ; Y = Y + Yi2

11. Xi = Xi+1 ; Ti = Ti+1 ; i = i+1 ; xi = xi+1 .


End For
Report:
1. Mean values for the samples generated for variables , x, A, X, Y, c, and S using cumulative
variables calculated in step 10. and loading factor :
=

A
A
S

, A=
, S=
, =
min{, S}
N
N
N

c =

c
, ...
N

2. Standard deviations and coefficients of variation for the samples generated for variables , x, A, X,
Y, c, and S
(
(
))1/2
(
))1/2
(
N

TN2
c
C2
N
, sc =
...
s =
2
2
N 1
N
N
N 1
N
N
3. Mean waiting times per client W, W and average queue lengths L, L :
L=

W
W
W
W
, L =
, W =
, W =
(TN + xN )
(TN + xN )
N A
N A

4. Also, W0 as well as W/W0 and W /W0 , where W0 is the mean waiting time for the first server to
come experienced by a client and is given by:
TN
W0 =
2N

(
)
N 2 s2
1+
TN2

(Remember that
t1 , t2 , ..., tn , the standard deviation st of the sample can be expressed as
n for2a sample
n
1
1/2

st = ( n1 (n ( i=1 ti ) t)) )

Generate a random number n of events occurring within [0, t]


= 0; n = 0; W = 0; (*)
While < t do
- generate (accordingly to a specified distribution of probabilities)
- W = W + n (min{t, + } ) (*)
- = +
- if < t then n = n + 1
End While
(*) In case that these events are client arrivals that remain waiting until the end of period [0, t], variable
W counts the total cumulative waiting time of the final total number n of these clients.

The objectives of this exercise are:


1. to compare the behaviour of a realistic bulk service system with that of a theoretical M/M [K] /1
system and with the values provided by the Powells approximation.
2. to assess the variability in evaluating the systems performance using a limited number of cycles.
In order to carry out the exercise (that can be made jointly by two students), each student will be
given the probability distributions for , the inter-arrival time between servers, x the period of service,
the service rate and c the arriving servers capacity along with its maximum allowable value C. Thus, it
must be understood that the probability distribution for c is a truncated distribution to a maximum value
C.
The report will address the following questions:
- To fulfill objective 1: for a large number of cycles, say N = 3000, and for the specified set of values
for the following table will be generated and included in the report:
= 0, 2 = 0, 4 = 0, 6 = 0, 8 = 0, 95 = 0, 98
0

2
C
3
W0
4
x
5
Cx
6 c (= c )
7
Cc
S
8
9
CS
10

11
A
12
L
13
L

14
X
15
16
17
18
19
20
21
22
23
24
25

X
Xmin
CX
Y
Y
Ymin
CY
z
Cz
W/W0
W /W0

The values for magnitudes L, Y , A and W/W0 must be compared with those in the excel file implementing Powells formula (Aproximaci
o de Powell-eng.xls) for the corresponding loading
factors . Differences or similitudes between the simulated values and those provided by Powells approximation must be commented and if possible, explained. This excel file should be delivered along with
the report.
Also, taking appropriate mean values for the corresponding inputs, evaluate the previous magnitudes
with those calculated by the excel suite Qts plus (section Bulk systems, M/M [k] /1 type 1 queue)
4

To fulfill objective 2: for a limited number of cycles (e.g., N = 100), repeat n = 15 times the simulation for = 0,98 using different initial seeds and obtain mean and standard deviations for , L, Y , A and
W/W0 . Obtain for this sample of size n = 15 the corresponding confidence intervals for the previous
magnitudes.
Now repeat the process with the same parameters and n = 15 but for N = 3000. Compare the length
of confidence intervals between simulations for N = 100 and N = 3000. Comment and justify the
results.
Include in the report how these confidence intervals have been calculated, including snapshots or
instructions used with statistical packages to obtain them.

The following material should be delivered:


1. A report with names and IDs of the students and with the values assigned for the parameters of the
exercise. The report will follow previous indications and will answer the stated questions.
2. The file Aproximaci
o de Powell-eng.xls duly fulfilled.
3. Running programs, input data files and outputs, used to carry out the simulations (source files and
executables). Also, a brief description of how to run the previous programs.

You might also like