LINE Solver
MATLAB API documentation
Loading...
Searching...
No Matches
returnWait.m
1function [ wait_alpha, wait_Smat, prob_wait, alfa ]=returnWait( En1,pi0,T,phi,sum_Ajump )
2%
3% The function calculates the phase-type representation of the stationary
4% waiting time of a K-node FJ queue
5%
6
7%% Section 6
8alfa = -pi0/T;
9ds = length(phi);
10
11rhos = diag(phi*alfa)'/(alfa*phi);
12En0 = alfa*sum_Ajump/sum(pi0);
13
14prob_wait = (En0-1)/(En0-1+En1);
15wait_alpha = prob_wait*rhos;
16
17wait_Smat = zeros(ds,ds);
18for i = 1:ds
19 for j = 1:ds
20 wait_Smat(i,j) = alfa(j)*T(j,i)/alfa(i); % Gij
21 end
22end
23