This is $\ M/M/1/\infty/\infty\ $ queue model.
The symbols in turn represent:
- The distribution of the time between successive customer arrivals is negatively exponential
- The distribution of hours of service is negatively exponential
- Number of service desks is 1
- The system capacity limit is infinity
- The number of customer sources is infinity
- (Default) FCFS, first-come, first-served
Solution
Write $\rho=\lambda /\mu$ for the utilization of the buffer.
Assuming $\rho=\lambda /\mu<1$ to ensure the convergence of the subsequent derivation.
We have $\sum\limits_{i=0}^{\infty} \pi_i =1 \quad \text{ and }\quad \pi_i=\rho^i \pi_0\text{ for } i=1,2,\cdots $
$
\quad \text{ thus }\quad \sum\limits_{i=0}^{\infty} \pi_0 \rho^i =1
$
The probability that the stationary process is in state $i$ (contains $i$ customers, including those in service) is $\pi_i = (1-\rho) \rho^i$
(a) The probability that the customer will straightaway get a ticket without having to wait in line, $\pi_0=1-\rho=1-\frac{\lambda}{\mu}$
(b) For what part of time will the railway clerk be busy? $1-\pi_0=\frac{\lambda}{\mu}$
(c)
The average queue length, $L_q= \sum\limits_{n=c}^{\infty} (n-c)\pi_n = \sum\limits_{n=1}^{\infty} (n-1)\pi_n = \sum\limits_{n=1}^{\infty}(n-1) (1-\rho)\rho^n =\frac{{\rho}^2}{1-{\rho}}=\frac{\lambda ^2}{\mu (\mu -\lambda)}$
The average number of customers in the system, $L_s=\sum\limits_{n=0}^{\infty} n \pi _n = \sum\limits_{n=0}^{\infty} n (1-\rho) \rho^n=\frac{\rho}{1-\rho}=
\frac{\lambda}{\mu -\lambda}$
The time $T$ that a customer spends in the system, is distributed accroding to negatively
exponential distribution with parameter $\mu-\lambda$:
$$
P(T>t) =e^{-(\mu-\lambda)t} , \quad t\geq 0
$$
The average time a customer spends in the system, $W_s=\mathbb{E} [T]=\frac{1}{\mu-\lambda}$
The average waiting time of a customer, $W_q=W_s-\frac{1}{\mu}= \frac{\lambda}{ \mu (\mu -\lambda)}$
(d)
MeanQueueSize of $M/M/c/\infty/\infty$ is
$$
W_q=
\frac{c \lambda \mu \Gamma (c) \left(\frac{\lambda }{\mu }\right)^c}{c! e^{\lambda /\mu } (\lambda -c \mu )^2 \Gamma \left(c,\frac{\lambda }{\mu }\right)+c \mu \Gamma (c) (c \mu -\lambda ) \left(\frac{\lambda }{\mu }\right)^c}
$$
When $c=2$, MeanQueueSize of $M/M/2/\infty/\infty$ is
$$
W_q=\frac{\lambda ^3}{4 \mu ^3-\lambda ^2 \mu }
$$
We want to solve the equation $W_q\operatorname{|}\limits_{\mu \rightarrow \frac{1}{6}}=45$ for variable $\lambda$
\[ScriptCapitalQ] = QueueingProcess[\[Lambda], \[Mu], 2];
\[Lambda] /.
NSolve[QueueProperties[\[ScriptCapitalQ], "MeanQueueSize"] ==
45 /. {\[Mu] -> 1/6}, \[Lambda]] // Select[#, # > 0 &] &
The new arrival rate should be 0.32631 services per minute
to justify a second clerk.
Mathematica code
some Mathematica APIs store the famous properties.
(* M/M/2/∞/∞ queue*)
\[ScriptCapitalQ] = QueueingProcess[\[Lambda], \[Mu], 2];
QueueProperties[\[ScriptCapitalQ]]