QUEUING THEORY

[M/M/S and M/M/S/K]

Queuing theory for servers performing per an exponential distribution and for customers arriving per a Poisson process, with a cap for customers present in the system.

Using material from
Frederick S. Hiller, Gerald J. Lieberman. Introduction to Operations Research. New York: McGraw Hill, 2005. Print.

INPUT
L: Mean entry rate follows POISSON input process

U: Mean service rate follows EXPONENTIAL distribution

S: Number of servers

K: Number of waiting places

FIRST COME FIRST SERVED ASSUMPTION

OUTPUT
A: Average number of customers in the system

B: Average number of customers in the queue

C: Average waiting time in the system

D: Average waiting time in the queue

P: Likelihood that mean entry rate will yield this N customers in the system

 =================================================

OUTPUT “Specify mean entry rate using quantity/minute”
INPUT L
OUTPUT “Specify mean service rate using quantity/minute”
INPUT U
OUTPUT “Specify number of servers, at least 1”
INPUT S
OUTPUT “Specify 1 if there is a maximum quantity permitted in the system, specify 2 otherwise”
INPUT X

IF X = 1
THEN
OUTPUT “Specify number of waiting places”
INPUT K
K + S → K
OUTPUT “Maximum quantity permitted in the system”
OUTPUT K
ELSE
0 → K
END

L/(S*U) → R

IF R => 1
THEN
OUTPUT “Input rates yield utilization beyond 100%, decrease rates of entry or increase either quantity of servers or service rate”
ELSE
IF K = 0
THEN
IF S = 1
THEN
L/(U - L) → A
(L^2)/U*(U-L)) → B
A/L → C
B/L → D
OUTPUT “Specify quantity present in system”
INPUT N
(1 - R) → Q
(R^N)*Q → P
OUTPUT “Likelihood that mean entry rate will yield this quantity”
OUTPUT P
ELSE
S - 1 → M
0 → Z
FOR(N,0,M,1)
Z + ((L/U)^N)/N! → Z
END

1/(Z+((L/U)^S)/(S!*(1-R)) ) → Q
Q*((L/U)^S)*R/(S!*(1-R)^2) → B
B + L/U → A
B/L → D
A/L → C
OUTPUT “Specify quantity present in system”
INPUT N
IF N<S
THEN
Q*((L/U)^N)/N! → P
ELSE
Q*((L/U)^N)/(S!*S^(N-S)) → P
END
OUTPUT “Likelihood that mean entry rate will yield this quantity”
OUTPUT P
END
ELSE
IF S = 1
THEN
(1-R)/(1-R^(K+1)) → Q
(R/(1-R)) - ((K+1)*R^(K+1))/(1-R^(K+1))→A
A - (1 - Q) → B
A/L → C
B/L → D
OUTPUT “Specify quantity present in system”
INPUT N
Q*R^N → P
OUTPUT “Likelihood that mean entry rate will yield this quantity”
OUTPUT P
ELSE
S - 1 → M
S + 1 → T
0 → Z
0 → Y
FOR(N,0,S,1)
Z + ((L/U)^N)/N! → Z
END
FOR(N,T,K,1)
Y + R^(N-S) → Y
END
1/(Z+((L/U)^S)*Y/S!) → Q
0 → Z
0 → Y
Q*((L/U)^S)*R*(1-R^(K-S)-(K-S)*(1-R)*R^(K-S))/(S!*(1-R)^2)→B
FOR(N,0,M,1)
Z+N*((L/U)^N)*Q/N!→ Z
END
FOR(N,0,M,1)
Y + Q*((L/U)^N)/N! → Y
END
Z + B + S*(1 - Y) → A
A/L → C
B/L → D
OUTPUT “Specify quantity present in system”
INPUT N
IF N < K
THEN
IF N > S
THEN
Q*((L/U)^N)/(S!*S^(N-S))→P
ELSE
Q*((L/U)^N)/N! → P
END
ELSE
0 → P
END

OUTPUT “Likelihood that mean entry rate will yield this quantity”
OUTPUT P

END

OUTPUT “Average number of customers in the system”
OUTPUT A

OUTPUT “Average number of customers in the queue”
OUTPUT B

OUTPUT “Average waiting time in the system”
OUTPUT C

OUTPUT “Average waiting time in the queue”
OUTPUT D



Comments