User:Ygh929/sandbox

In queueing theory, Jackson network is a kind of networks where Jackson's theorem or its extensions can be applied. A Jackson network consists of J nodes. Each node can be considered as a M/M/1 queue and the service rate at eac node i can be both node-dependent and state-dependent. Jobs travel among the nodes following a routing matrix $$P$$.

All jobs at each node belong to a single "class": All jobs follow the same service-time distribution and the same routing mechanism. Consequently, there is no notion of priority in serving the jobs: all jobs at each node are served on a first-come, first-served basis.

According to different specifications of the routing matrix, there are three different variations: the open, close and semi-open networks.

Open Jackson network
In an open network, jobs arrive from outside following a Poisson process with rate $$\alpha>0$$. Each arrival is independently routed to node j with probability $$p_{0j}\ge0$$ and $$\sum_{j=1}^J p_{0j}=1$$. Upon service completion at node i, a job may go to another node j with probability $$p_{ij}$$ or leave the network with probability $$p_{i0}=1-\sum_{j=1}^J p_{ij}$$.

Hence we have the overall arrival rate to node i, $$\lambda_i$$, including both external arrivals and internal transitions:


 * $$ \lambda_i =\alpha p_{0i} + \sum_{j=1}^J \lambda_j p_{ji}, i=1,\ldots,J.   \qquad (1)$$

Define $$ a=(\alpha p_{0i})_{i=1}^J$$, then we can solve $$ \lambda=(I-P')^{-1}a$$.

All jobs leave each node also following Poisson process, and define $$ \mu_i(x_i) $$ as the service rate of node i when there are $$ x_i $$ jobs at node i.

Let $$X_i(t)$$ denote the number of jobs at node i at time t, and $$ \mathbf{X}=(X_i)_{i=1}^J$$. Then the equilibrium distribution of $$\mathbf{X}$$, $$\pi(\mathbf{x})=P(\mathbf{X}=\mathbf{x})$$ is determined by the following system of balance equations:


 * $$ \pi(\mathbf{x}) \sum_{i=1}^J [\alpha p_{0i} +\mu_i (x_i) (1-p_{ii})] =\sum_{i=1}^J[\pi(\mathbf{x}-\mathbf{e}_i) \alpha p_{0i}+\pi(\mathbf{x}+\mathbf{e}_i)\mu_i(x_i+1)p_{i0}]+\sum_{i=1}^J\sum_{j\ne i}\pi(\mathbf{x}+\mathbf{e}_i-\mathbf{e}_j)\mu_i(x_i+1)p_{ij}.\qquad (2)$$

where $$\mathbf{e}_i$$ denote the $$ i^{th}$$ unit vector.

Theorem
Suppose a vector of independent random variables $$ (Y_1,\ldots,Y_J)$$ with each $$ Y_i$$ having a probability mass function as


 * $$ P(Y_i=n)=p(Y_i=0)\cdot \frac{\lambda_i^n}{M_i(n)} \quad (3)$$

, where $$ M_i(n)=\prod_{j=1}^n \mu_i(j) $$. If $$ \sum_{n=1}^\infty \frac{\lambda_i^n}{M_i(n)} < \infty $$ i.e. $$P(Y_i=0)=(1+\sum_{n=1}^\infty \frac{\lambda_i^n}{M_i(n)})^{-1}$$ is well defined, then the equilibrium distribution of the open Jackson network has the following product form:


 * $$ \pi(\mathbf{x})=\prod _{i=1}^J P(Y_i=x_i).$$

for all $$\mathbf{x}\in \mathcal{Z}_{+}^J $$.⟩

It suffices to verify equation $$(2)$$ is satisfied. By the product form and formula (3), we have:


 * $$ \pi(\mathbf{x}) =\pi (\mathbf{x}+\mathbf{e}_i)\mu_i(x_i+1)/ \lambda_i

= \pi( \mathbf{x}+ \mathbf{e}_i- \mathbf{e}_j) \mu_i (x_i+1) \lambda_j /[\lambda_i \mu_j (x_j)]$$

Substituting these into the right side of $$(2)$$ we get:


 * $$ \sum_{i=1}^J [\alpha p_{0i}+\mu_i(x_i)(1-p{ii})]=\sum_{i=1}^J[\frac{\alpha p_{0i}}{\lambda_i}\mu_i(x_i)+\lambda_i p_{i0}]+\sum_{i=1}^J\sum_{j\ne i}\frac{\lambda_i}{\lambda_j}p_{ij}\mu_j(x_j). \qquad (4) $$

Then use $$(1)$$, we have:


 * $$ \sum_{i=1}^J\sum_{j\ne i}\frac{\lambda_i}{\lambda_j}p_{ij}\mu_j(x_j) = \sum_{j=1}^J [\sum_{i \ne j}\frac{\lambda_i}{\lambda_j}p_{ij}]\mu_j(x_j)=\sum_{j=1}^J[1-p_{jj}-\frac{\alpha p_{0j}}{\lambda_j}]\mu_j(x_j). $$

Substituting the above into $$(4)$$, we have:
 * $$ \sum_{i=1}^J \alpha p_{0i}=\sum_{i=1}^J \lambda_i p_{i0}$$

This can be verified by $$ \sum_{i=1}^J \alpha p_{0i}= \sum_{i=1}^J\lambda_i-\sum _{i=1}^J\sum_{j=1}^J\lambda_j p_{ji}=\sum_{i=1}^J\lambda_i-\sum_{j=1}^J\lambda_j(1-p_{j0})=\sum_{i=1}^J\lambda_ip_{i0} $$. Hence both side of $$ (2) $$ are equal.⟨

This theorem extends the one shown on Jackson's Theorem page by allowing state-dependent service rate of each node. It relates the distribution of $$\mathbf{X}$$ by a vector of independent variable $$ \mathbf{Y} $$.

Example
Suppose we have a three-node Jackson shown in the graph, the coefficients are:
 * $$\alpha=5, \quad

p_{01}=p_{02}=0.5, \quad p_{03}=0,\quad $$



P=\begin{bmatrix} 0 & 0.5 & 0.5\\ 0 & 0 & 0 \\ 0 & 0 & 0\end{bmatrix}, \quad \mu=\begin{bmatrix} \mu_1(x_1)\\ \mu_2(x_2)\\ \mu_3(x_3)\end{bmatrix} =\begin{bmatrix} 15\\ 12\\ 10\end{bmatrix} $$ for all $$ x_i>0$$

Then by the theorem, we can calculate:

$$\lambda=(I-P')^{-1}a=\begin{bmatrix} 1 & 0 & 0\\ -0.5 & 1 & 0 \\ -0.5 & 0 & 1\end{bmatrix}^{-1}\begin{bmatrix} 0.5\times5\\ 0.5\times5\\ 0\end{bmatrix}=\begin{bmatrix} 1&0&0\\ 0.5&1&0\\ 0.5&0&1\end{bmatrix}\begin{bmatrix} 2.5\\ 2.5\\ 0\end{bmatrix}=\begin{bmatrix} 2.5\\ 3.75\\ 1.25\end{bmatrix} $$

According to the definition of $$ \mathbf{Y} $$, we have:


 * $$ P(Y_1=0)=(1+\sum_{n=1}^\infty (\frac{2.5}{15})^n)^{-1}=\frac{5}{6} $$
 * $$ P(Y_2=0)=(1+\sum_{n=1}^\infty (\frac{3.75}{12})^n)^{-1}=\frac{11}{16} $$
 * $$ P(Y_3=0)=(1+\sum_{n=1}^\infty (\frac{1.25}{10})^n)^{-1}=\frac{7}{8} $$

Hence the probability that there is one job at each node is:


 * $$ \pi(1,1,1)=\frac{5}{6}\cdot\frac{2.5}{15}\cdot\frac{11}{16}\cdot\frac{3.75}{12}\cdot\frac{7}{8}\cdot\frac{1.25}{10}\approx 0.00326$$

Since the service rate here doesn't depend on state, the $$ Y_i's$$ simply follows geometric distribution.

Closed Jackson network
In some applications once a job leaves the network, a new job is immediately released into the network. This type of network can be viewed as having a fixed number of jobs in the network, with no job ever leaving the network and no external job entering the network. In this sense, the network is "closed". It is also referred to as Gordon-Newell network

In closed Jackson network, $$p_{0i}$$ and $$ p_{j0}$$ are 0 for all i and j., and $$ \sum_{j=1}^J p_{ij}=1 $$ for each row. Let $$ (\nu_i)_{i=1}^J$$ be the solution to


 * $$ \nu_i=\sum_{j=1}^J \nu_j p_{ji}\qquad(5) $$

The solution is not unique so we need to add another equation. For example $$\sum_{i=1}^J \nu_i=\nu_0$$ for some constant $$\nu_0$$ or $$ \nu_j =1 $$for some $$j$$.

The equilibrium balance equations are given by:


 * $$ \pi(\mathbf{x}) \sum_{i=1}^J \mu_i(x_i)(1-p_{ii})=\sum_{i=1}^J \sum_{j \ne i}\pi )\mathbf{x}+\mathbf{e}_i-\mathbf{e}_j)\mu_i(x_i+1)p_{ij}.$$

for all $$ \mathbf{x}\in \mathcal{Z}_{+}^J $$ such that $$ |\mathbf{x}|:=\sum_{i=1}^J x_i =N $$. Similarly, define $$ |\mathbf{X}|:=\sum_{i=1}^J X_i $$ and $$ |\mathbf{Y}|:=\sum_{i=1}^J Y_i $$ where $$\mathbf{X}$$ and $$ \mathbf{Y} $$ are defined before.

Theorem
For all $$\mathbf{x}\in \mathcal{Z}_{+}^J, |\mathbf{x}|=N $$, we have:


 * $$ \pi(\mathbf{x})=\prod_{i=1}^J P(Y_i=x_i)/P(|\mathbf{Y}|=N)$$

Where $$\mathbf{Y}$$ follow the distribution in $$ (3) $$ with $$\lambda _i$$ is replaced by $$\nu_i $$.⟩

It sufficed to verify $$(4)$$, with terms involving $$ \alpha, p_i0$$ being zero and $$ \lambda_i $$ replaced by $$ \nu_i $$:


 * $$ \sum_{i=1}^J \nu_i(x_i)(1-p_{ii}) =\sum_{i=1}^J\sum_{j\ne i} \frac{\nu_i}{\nu_j}p_{ij}\mu_j(x_j). $$

Both sides of it are equal by taking using $$(5)$$ and interchanging summation on right side.⟩

This is an extension of Gordon-Newell theorem, where service rate can differ between states.

Example


We can modify the previous example a little to be a closed network with coefficients:

P=\begin{bmatrix} 0 & 0.5 & 0.5\\ 0.5 & 0.5 & 0 \\ 0.5 & 0.5 & 0\end{bmatrix}, \quad \mu=\begin{bmatrix} \mu_1(x_1)\\ \mu_2(x_2)\\ \mu_3(x_3)\end{bmatrix} =\begin{bmatrix} 15\\ 12\\ 10\end{bmatrix} $$ for all $$ x_i>0$$ Additionally, suppose there are totally 3 jobs in the network.

Set $$ \nu_1=1$$ and solve $$ (I-P')\nu=0 $$, we get:


 * $$\nu=\begin{bmatrix}

1\\1.5\\0.5\end{bmatrix} $$

Hence we can know the distribution of $$ \mathbf{Y} $$:


 * $$ P(Y_1=0)=(1+\sum_{n=1}^\infty (\frac{1}{15})^n)^{-1}=\frac{14}{15} $$
 * $$ P(Y_2=0)=(1+\sum_{n=1}^\infty (\frac{1.5}{12})^n)^{-1}=\frac{7}{8} $$
 * $$ P(Y_3=0)=(1+\sum_{n=1}^\infty (\frac{0.5}{10})^n)^{-1}=\frac{19}{20} $$

This time, the probability that there is one job at each node is:

$$\pi(1,1,1)=(P(Y_1=1)\cdot P(Y_2=1) \cdot P(Y_3=1))/P(|\mathbf{Y}|=3)=\prod_{j=1}^3 P(Y_j=1)/\sum_{|\mathbf{y}|=3}P(\mathbf{Y}=\mathbf{y})\approx 0.07097 $$

Semi-open Jackson Network
Semi-open net work has features of both open and closed networks: it follows the descriptions of the open model with the exception that the total number in the network is limited to a maximum of K jobs at any time.

It turns out that the semiopen model can be reduced to a closed network with K jobs and J+1 nodes. The additional node, indexed as node 0, represents the external world. Its service rate is defined as $$ \mu_0(n)=\alpha $$ if $$ n>0$$ and $$ \mu_0(0)=0$$. This captures the blocking of the external arrivals when the buffer is full.

Set $$\nu_0=1$$ and $$ \nu_i=\lambda_i / \alpha $$, then they are solutions to the set of equations:
 * $$ \nu_i=\sum_{j=0}^J \nu_j p_{ji}\qquad $$

It is same as the one described in $$ (5) $$ for a J+1 closed work.

Theorem
The semiopen Jackson network with an overall buffer capacity of K, has the following distribution: For all $$ \mathbf{x}\in\mathcal{Z}_{+}^J $$ such that $$ |\mathbf{x}|\le K$$,


 * $$ \pi(\mathbf{x})=\prod_{i=1}^J P(Y_i=x_i)/P(|\mathbf{Y}|\le K),$$

where $$Y_i $$ follows distribution in $$(3)$$.⟩

In a J+1 closed network, the equilibrium distribution satisfies:
 * $$ P(X_0=x_0,\ldots,X_J=x_J)=P(X_1=x_1,\ldots,X_J=x_J),$$

with $$ x_0=K-|\mathbf{x}|$$.

Hence with $$\nu_0=1$$ and $$\nu_i=\lambda_i/\alpha$$, we have:
 * $$\pi(\mathbf{x})=P(X_1=X_1,\ldots,X_J=x_j)=P(X_0=X_0,\ldots,X_J=x_j$$
 * $$=\frac{1}{C}\cdot\frac{1^{x_0}\prod_{i=1}^{J} (\frac{\lambda_i}{\alpha})^{x_i}}{\alpha^{x_0} \prod_{i=1}^{J} M_i(x_i)}=\frac{1}{C\alpha^K}\cdot\prod_{i=1}^J \frac{\lambda_i^{x_i}}{ M_i(x_i)},$$

where $$C$$ is a normalizing constant. Hence we can write $$ \pi(\mathbf{x})=\prod_{i=1}^J P(Y_i=x_i)/C' $$, and $$ C' $$ is decided by:


 * $$ C'=\sum_{|\mathbf{x}|\le K}\prod_{i=1}^J P(Y_i=x_i)=P(|\mathbf{Y}|\le K)). $$⟩

Example
Suppose we have a semi-open network (consisting of nodes 1,2 and 3)with coefficients:
 * $$\alpha=5, \quad

p_{01}=p_{02}=0.5, \quad p_{03}=0,\quad $$



P=\begin{bmatrix} 0 & 0.5 & 0.5\\ 0 & 0 & 0 \\ 0 & 0 & 0\end{bmatrix}, \quad \mu=\begin{bmatrix} \mu_1(x_1)\\ \mu_2(x_2)\\ \mu_3(x_3)\end{bmatrix} =\begin{bmatrix} 15\\ 12\\ 10\end{bmatrix} $$ for all $$ x_i>0$$ and the number of jobs in the system is smaller than 4.

When the systme is not full, the arrival rate is $$\lambda=\begin{bmatrix}2.5\\3.75\\1.25\end{bmatrix}.$$

We can use node 0 to represent the out-side world, and its service rate is $$ \mu_0(x_0)=\alpha=5 $$. Then we have a closed network with 4 jobs and coefficients:

P_{close}=\begin{bmatrix} 0 & 0.5 & 0.5 & 0\\ 0 & 0 & 0.5 & 0.5\\ 1 & 0 & 0 & 0 \\ 1 & 0 & 0 & 0\end{bmatrix}, \quad \mu_{close}=\begin{bmatrix} \mu_0(x_0)\\ \mu_1(x_1)\\ \mu_2(x_2)\\ \mu_3(x_3)\end{bmatrix} =\begin{bmatrix} 5\\ 15\\ 12\\ 10\end{bmatrix} $$ for all $$ x_i>0$$

By setting $$ \nu_0=1$$ and dividing $$\lambda$$ by $$ \alpha $$, we can calculate $$\nu_{close}=\begin{bmatrix} 1\\0.5\\0.75\\0.25\end{bmatrix}$$

Then we have


 * $$ P(Y_0=0)=(1+\sum_{n=1}^\infty (\frac{1}{5})^n)^{-1}=\frac{4}{5} $$
 * $$ P(Y_1=0)=(1+\sum_{n=1}^\infty (\frac{0.5}{15})^n)^{-1}=\frac{29}{30} $$
 * $$ P(Y_2=0)=(1+\sum_{n=1}^\infty (\frac{0.75}{12})^n)^{-1}=\frac{15}{16} $$
 * $$ P(Y_3=0)=(1+\sum_{n=1}^\infty (\frac{0.25}{10})^n)^{-1}=\frac{39}{40} $$

Then the probability that there is one job at each node is:


 * $$\pi(X_1=X_2=X_3=1)=\prod_{j=1}^3 P(Y_j=1)/\sum_{|\mathbf{y}|\le 4} P(\mathbf{Y}=\mathbf{y})\approx 0.00329$$

Generalized Jackson Network
In generalized Jackson network, arrival processes can be renewal process that is not Poisson, and i.i.d. service time that needs not follow exponential distribution. The stationary distribution of generalized Jackson network usually does not have an explicit analytical form.

Approximation
Under some mild conditions the queue-length process $$Q(t)$$ of a open generalized Jackson network can be approximated by a reflected Brownian motion defined as $$ RBM_{Q(0)}(\theta,\Gamma;R).$$, where $$ \theta $$ is the drift of the process, $$ \Gamma $$ is the covariance matrix, and $$ R $$ is the reflection matrix. This is a two-order approximation obtained by relation between general Jackson network with homogeneous fluid network and reflected Brownian motion.

The parameters of the reflected Brownian process is specified as follows:


 * $$ \theta= \alpha -(I-P')\mu $$
 * $$ \Gamma=(\Gamma_{kl}) $$ with  $$ \Gamma_{kl}=\sum_{j=1}^J (\lambda_j \wedge \mu_j)[p_{jk}(\delta_{kl}-p_{jl})+c_j^2(p_{jk}-\delta_{jk})(p_{jl}-\delta_{jl})]+\alpha_k c_{0,k}^2 \delta_{kl} $$
 * $$ R=I-P' $$

where the symbols are defined as: