4.
Consider a model in which customers arrive at a system having two servers. Upon arrival
the customer will join the queue if both servers are busy, enter service with server 1 if that
server is free, or enter service with server 2 otherwise. When the customer completed
service with a server (no matter which one), that customer then deports the system and the
customer that has been in queue the longest (if there are any customers in queue) enters
service. The service distribution at server I is G
, i=1,2. Customer arrives in accordance
with a non homogeneous Poisson Process. Define variables and event lists to analyze this
model and write the procedure for this system.
(20 marks)
solution
(A Queuing System with Two Parallel Severs)
Time variables
t
System State Variables (SS)
SS = (n, i
1
, i
2
)
n = number of customers in system.
i
1
= the number of customers being served by server 1.
i
2
= the number of customers being served by server 2.
Counter variables
N
A
= the number of arrivals by time t.
C
j
= the number of served by j, j = 1,2, by time t.
Output variables
A(n) = the arrival time of customer n, n
≥
1.
D(n) = the departure time of customer n, n
≥
1.
Event List: t
A
, t
1
, t
2
t
A
= the time of next arrival.
t
i
= the sever completion time of the customer presently being served by server i,
i = 1, 2.
Initialize
Set t =
N
A
= C
1
= C
2
= 0.
Set SS = (0).
Generate T
0
and set t
A =
T
0
, t
1
= t
2
=
∞
.
Case 1:
SS = (n, i
1
, i
2
) and t
A
= min(t
A
, t
1
, t
2
)
Reset: t = t
A
.
Reset: N
A
= N
A
+1.
Generate T
t
and reset t
A
= T
t
.
Collect output data A(N
A
) = t.
If SS = (0):
Reset: SS = (1, N
A
, 0).
Generate Y
1
and reset t
1
= t + Y
1
.
If SS = (1, j, 0):
Reset: SS = (2, j, N
A
).
Generate Y
2
and reset t
2
= t + Y
2
.
If SS = (1, 0, j):
Reset: SS = (2, N
A
, j).
Generate Y
1
and reset t
1
= t + Y
1
.
If n > 1:
Reset: SS = (n + 1, i
1
, i
2
).
Case 2:
SS = (n, i
1
, i
2
) and t
1
≤
t
A,
t
1
≤
t
2