# Time-Dependent Performance of a Multi-Hop Software Defined Network
## 2 Diffusion Model of an SDN Switch
### Transient Diffusion Model with General Interarrival and Service Processes  
We express the time-dependent solution \(f(x,t;x_{0})\) of Equation (1) for the diffusion process having barriers with jumps with the use of the pdf \(\phi(x,t;x_{0})\) of another diffusion process which has absorbing barriers at \(x=0\) and \(x=N\). There is no jumps, the process ends once it reaches any of the barriers. The density of such a process is known [66]:  
\[\phi(x,t;x_{0})=\left\{ \begin{array}{ll}\delta(x-x_{0})&\mbox{for}\quad t=0\;,\\ \frac{1}{\sqrt{2\Pi t}}\sum_{n=-\infty}^{\infty}\{a(t)+b(t)\}&\mbox{for}\quad t >0\;,\end{array} \right. \tag{11}\]  
where:  
\[a(t)=\exp\left[\frac{\beta x_{n}^{\prime}}{\alpha}-\frac{(x-x_{0}-x_{n}^{ \prime}-\beta t)^{2}}{2\alpha t}\right],\]  
\[b(t)=\exp\left[\frac{\beta x_{n}^{\prime\prime}}{\alpha}-\frac{(x-x_{0}-x_{n} ^{\prime\prime}-\beta t)^{2}}{2\alpha t}\right],\]  
and \(x_{n}^{\prime}=2 nN\), \(x_{n}^{\prime\prime}=-2x_{0}-x_{n}^{\prime}\). If the initial condition is not given by a single point \(x_{0}\) but by a density \(\psi(\xi)\), \(\xi\in(0,N)\), \(\lim_{\xi\to 0}\psi(\xi)=\lim_{\xi\to N}\psi(\xi)=0\), then the pdf of the process with absorbing barriers has the form:  
\[\phi(x,t;\psi)=\int_{0}^{N}\phi(x,t;\xi)\psi(\xi)d\xi. \tag{12}\]  
The Laplace transform of \(\phi(x,t;x_{0})\) is  
\[\tilde{\phi}(x,s;x_{0})=\frac{\exp[\frac{\beta(x-x_{0})}{\alpha}]}{A(s)}\sum_ {n=-\infty}^{\infty}\Bigl{\{}\exp\Bigl{[}-\frac{|x-x_{0}-x_{n}^{\prime}|}{ \alpha}A(s)\Bigr{]}-\exp\Bigl{[}-\frac{|x-x_{0}-x_{n}^{\prime\prime}|}{\alpha }A(s)\Bigr{]}\Bigr{\}}, \tag{13}\]  
with \(A(s)=\sqrt{\beta^{2}+2\alpha s}\). The process with jumps from barriers is a sequence of processes started by jumps at \(x=1\) and \(x=N-1\), ending at the barriers, and then after a time spent there starting again due to jumps, therefore the pdf \(f(x,t;\psi)\) of the diffusion processs with jumps may be represented by functions \(\phi(x,t;\psi)\) as follows: [51; 67]:  
\[f(x,t;\psi)=\phi(x,t;\psi)+\int_{0}^{t}g_{1}(\tau)\phi(x,t-\tau;1)d\tau+\int_{ 0}^{t}g_{N-1}(\tau)\phi(x,t-\tau;N-1)d\tau\;. \tag{14}\]  
where \(g_{1}(t)\) and \(g_{N}(t)\) are the densities of jumps and are related to the pdfs \(l_{0}(x)\), \(l_{N}(x)\), the densities of sojourn times at \(x=0\) and \(x=N\) respectively, and to \(\gamma_{0}(t)\) and \(\gamma_{N}(t)\), the probability densities that at time \(t\) the process enters \(x=0\) or \(x=N\), in the following way:  
\[g_{1}(\tau) = \int_{0}^{\tau}\gamma_{0}(t)l_{0}(\tau-t)dt\;,\] \[g_{N-1}(\tau) = \int_{0}^{\tau}\gamma_{N}(t)l_{N}(\tau-t)dt\;, \tag{15}\]where:  
\[\gamma_{0}(t) = p_{0}(0)\delta(t)+[1-p_{0}(0)-p_{N}(0)]\gamma_{\psi,0}(t) \tag{16}\] \[+\int_{0}^{t}g_{1}(\tau)\gamma_{1,0}(t-\tau)d\tau+\int_{0}^{t}g_{N- 1}(\tau)\gamma_{N-1,0}(t-\tau)d\tau\,\] \[\gamma_{N}(t) = p_{N}(0)\delta(t)+[1-p_{0}(0)-p_{N}(0)]\gamma_{\psi,N}(t)\] \[b(t)=\exp\left[\frac{\beta x_{n}^{\prime\prime}}{\alpha}-\frac{(x-x_{0}-x_{n} ^{\prime\prime}-\beta t)^{2}}{2\alpha t}\right],\]0  
and \(\gamma_{1,0}(t)\), \(\gamma_{1,N}(t)\), \(\gamma_{N-1,0}(t)\), \(\gamma_{N-1,N}(t)\) are the densities of the first passage time between corresponding points--e.g.,:  
\[b(t)=\exp\left[\frac{\beta x_{n}^{\prime\prime}}{\alpha}-\frac{(x-x_{0}-x_{n} ^{\prime\prime}-\beta t)^{2}}{2\alpha t}\right],\]1  
For absorbing barriers:  
\[b(t)=\exp\left[\frac{\beta x_{n}^{\prime\prime}}{\alpha}-\frac{(x-x_{0}-x_{n} ^{\prime\prime}-\beta t)^{2}}{2\alpha t}\right],\]2  
Hence: \(\gamma_{1,0}(t)=\lim_{x\to 0}\frac{\alpha\,\frac{\partial\phi(x,t;1)}{ \partial x}}{\partial x}\). The functions \(\gamma_{\psi,0}(t)\), \(\gamma_{\psi,N}(t)\) are the pdfs of first passage time when the initial condition is given by the density \(\psi(\xi)\).