owned this note
owned this note
Published
Linked with GitHub
# NTUEE Queueing Theory 2022 FALL HW3
## 1
Solve Problem 4.13 in textbook, using open Jackson network.

:::spoiler Answer
From the above figure, we can write down the **traffic equation**($\lambda = \gamma + \lambda P$) for this network:
$$(\lambda_A, \lambda_B, \lambda_C, \lambda_D) = (30, 0, 0, 0) + (\lambda_A, \lambda_B, \lambda_C, \lambda_D)
\begin{bmatrix}
0.1 & 0.6 & 0.2 & 0 \\
0 & 0 & 0.1 & 0.8 \\
0 & 0.1 & 0 & 0.8 \\
0 & 0 & 0 & 0 \\
\end{bmatrix}$$
solve the equation we get the arrival rate for Node A, B, C, D:
$$(\lambda_A, \lambda_B, \lambda_C, \lambda_D) = (\frac{100}{3}, \frac{6200}{297}, \frac{2600}{297}, \frac{7040}{297})$$
According to the problem description, Node A is a $M/M/\infty$ queue, with service rate equals $120$, and Node B, C, D are all $M/M/1$ queue, with service rate $30, 10, 30$, respectively.
From [M/M/1](/XvXWlqwTTAuFAXpscoWHVw) & [Erlang's Loss Formula(M/M/c/c) & M/M/無限大](/B9Rgdk_1SIeylYy-iHBJUw), we know that for $M/M/1$, $L = \frac{\lambda}{\mu}$. For $M/M/\infty$, $L = \frac{\rho}{1 - \rho}$. $W$ can be calculated using Little's Formula: $L = \lambda W$.
$$\begin{aligned} (\rho_A, \rho_B, \rho_C, \rho_D) &= (\frac{\lambda_A}{\mu_A}, \frac{\lambda_B}{\mu_B}, \frac{\lambda_C}{\mu_C}, \frac{\lambda_D}{\mu_D}) \newline
&= (\frac{\frac{100}{3}}{120}, \frac{\frac{6200}{297}}{30}, \frac{\frac{2600}{297}}{10}, \frac{\frac{7040}{297}}{30}) \newline
&= (\frac{5}{18}, \frac{620}{891}, \frac{260}{297}, \frac{64}{81})
\end{aligned}$$
$$\begin{aligned}(L_A, L_B, L_C, L_D) &= (\frac{\lambda_A}{\mu_A}, \frac{\rho_B}{1 - \rho_B}, \frac{\rho_C}{1 - \rho_C}, \frac{\rho_D}{1 - \rho_D}) \newline &= (\frac{5}{18}, \frac{620}{271}, \frac{260}{37}, \frac{64}{17})
\end{aligned}$$
For the network:
$$L = L_A + L_B + L_C + L_D = 13.35733357\cdots$$
$$\begin{aligned} W &= \frac{L}{\lambda} \newline
&= \frac{L}{\gamma} \newline
&= \frac{13.3573}{30} \newline
&= 0.445244522 \cdots
\end{aligned}$$
:::
## 2
Using the JMT simulator to verify the answer obtained in previous problem.
:::spoiler Answer
Note: If there's a red X on the left side of simulation results(instead of a green checkmark), one can increase **Maximum number of samples** as below, and run the simulation again.

* 架構圖

* $L$
Calculated: 13.3573

* $W$
Calculated: 0.4452

:::
## 3
1. Please calculate and compare $W$ and $L$ for $M/M/1$, $M/D/1$, $M/E_2/1$ and $M/E_{10}/1$ with the same traffic intensity. Please assume $\lambda = 0.8$ and $\mu = 1$ for all queues.
:::spoiler Answer
$$\rho = \frac{\lambda}{\mu} = 0.8$$
For $M/M/1$:
$$L = \frac{\rho}{1 - \rho} = 4, W = \frac{L}{\lambda} = 5$$
For $M/D/1$:
from [M/Ek/1](/FetwhmN7Q3OhiDWLc3oTSQ), we know
$$W_q = \rho \frac{\frac{\frac{1}{\mu}}{2}}{1 - \rho} = 2$$
and $$W = W_q + \frac{1}{\mu} = 2 + 1 = 3$$
so
$$L = \lambda W = 2.4$$
For $M/E_2/1$:
$$\begin{aligned} L_q &= \frac{1 + \frac{1}{k}}{2} \cdot \frac{\rho^2}{(1 - \rho)} \newline
&= \frac{1 + \frac{1}{2}}{2} \cdot \frac{\rho^2}{(1 - \rho)} \newline
&= 2.4
\end{aligned}$$
and
$$L = L_q + \rho = 3.2$$
$$W = \frac{L}{\lambda} = 4$$
For $M/E_{10}/1$:
$$\begin{aligned} L_q &= \frac{1 + \frac{1}{k}}{2} \cdot \frac{\rho^2}{(1 - \rho)} \newline
&= \frac{1 + \frac{1}{10}}{2} \cdot \frac{\rho^2}{(1 - \rho)} \newline
&= 1.76
\end{aligned}$$
and
$$L = L_q + \rho = 2.56$$
$$W = \frac{L}{\lambda} = 3.2$$
:::
2. Use JMT simulator to validate your answer in (i).
:::spoiler Answer
* $M/M/1$



* $M/D/1$



* $M/E_2/1$



* $M/E_{10}/1$



:::