Questions:
Jackson’s theorem states that provided the rate at each queue is such that equilibrium exits, the probability of the overall system state (n1………nk) for k queues will be given by the product form expression:
It also states that provided the arrival rate at each queue is such that equilibrium exists, the probability of the overall system state (n1………nk) will be:
With pj (nj)=p(nj customers in Qj)
- Model this street network as a Jackson queuing network. Draw the diagram of this network and identify all relevant parameters of the system.
Arrivals rates to nodes 1, 2, 3 and 4 are,, and respectively.
Service rates to nodes 1, 2, 3 and 4 are,, and respectively.
Recirculated portions of the traffic from nodes 2, 3 and 4 to node 1 are , and respectively.
Circulated portions of the traffic to nodes 2 and 3 from node 1 are and respectively.
Overall arrivals rates to nodes 1, 2, 3 and 4 are ,, and respectively.
Total average delay:
Delay in each node:
Assumption:
We have assumed that there is only one lane in the streets. That is the type of queue is m/m/1.
Yes it is correct. As you increase the value of k (that is similar to increasing the service rates) the congestion is reduced since the number of the vehicles passing through the street is increased.
close all;
P = [2.6 0.5 0.5 0;0.2 2.5 0 0;0.2 0 2.5 0;0.2 0 0 2];% Traffic flow rates to the nodes
u = [8;8;8;8]; %service rates in each node
N = 3;
%% calculate rho’s (utilization rate)
sp= size(P);
B = zeros(sp(1),1);
B(1) = 1;
sb=length(B);
Pp = P – eye(sp(1));
for i = 1:sb
if B(i) ~= 0
Pp(i,i) =0;
end
end
v=PpB;
% to make rho 1 = 1
if v(1)/u(1) ~= 1
v_new = v(:)/(v(1)/u(1));
end
v = v_new;
rho = v./u;
%% convolution Algorithm
%N = 2; %use j
M = sp(1); %use i
G = zeros(M,N+1);
%G(i, j)
G([1:M],1) = 1;
for j= 1:N+1
g(1,j) = rho(1).^(j-1);
G(1,j)= g(1,j);
end
for i=2:M
for j=2:N+1
G(i,j) = rho(i)*G(i,j-1)+G(i-1,j);
end
end
G;
for i = 1:N
TH(i) = G(M,i)/G(M,i+1);
end
for i=1:M
for j=2:N+1
node_TH1(j,i) = v(i) * TH(j-1);
node_Ut1(j,i) = rho(i)*TH(j-1);
end
end
TH
k=size(node_TH1)
node_TH2 = mat2cell(node_TH1,ones(1,k(1)),ones(k(2),1));
node_TH3 = [cell(1,k(2)+1);cell(k(1),1) node_TH2];
sn=size(node_TH3)
for i = 1:sn(1)
for j = 1:sn(2)
if i==j && i==1
node_TH3{i,j} = [‘Amount of traffic node ‘];
elseif i==1
node_TH3{i,j} = [‘node’ num2str(j-1)];
elseif j==1
node_TH3{i,j} = [ ‘Amount of traffic=’ num2str(i-2)];
end
end
end
node_TH = node_TH3;
for i = 1:sn(1)
for j = 1:sn(2)
if j==1 && i >1
node_Ut{i,j} = [‘Amount of traffic==’ num2str(i-2)]
end;
if i==1 && j > 1;
node_Ut{i,j} = [‘node’ num2str(j-1)];
end;
if i>1 && j >1 ;
node_Ut{i,j} = node_Ut1(i-1,j-1);
end;
end
end
RESULTS:
TH =
1.8750 0.7843 1.0605
k =
4 4
sn =
5 5
node_Ut =
2×5 cell array
[] ‘node1’ ‘node2’ ‘node3’ ‘node4’
‘Amount of traffic==0’ [] [] [] []
node_Ut =
3×5 cell array
[] ‘node1’ ‘node2’ ‘node3’ ‘node4’
‘Amount of traffic==0’ [ 0] [ 0] [ 0] [ 0]
‘Amount of traffic==1’ [] [] [] []
node_Ut =
4×5 cell array
[] ‘node1’ ‘node2’ ‘node3’ ‘node4’
‘Amount of traffic==0’ [ 0] [ 0] [ 0] [ 0]
‘Amount of traffic==1’ [1.8750] [-0.2500] [-0.2500] [-0.3750]
‘Amount of traffic==2’ [] [] [] []
node_Ut =
5×5 cell array
[] ‘node1’ ‘node2’ ‘node3’ ‘node4’
‘Amount of traffic==0’ [ 0] [ 0] [ 0] [ 0]
‘Amount of traffic==1’ [1.8750] [-0.2500] [-0.2500] [-0.3750]
‘Amount of traffic==2’ [0.7843] [-0.1046] [-0.1046] [-0.1569]
‘Amount of traffic==3’ [] [] [] []
Reference
[1] Hamarashid, H. K. (2012). Queuing Theory: Understanding of how to use queuing theory in practical. Saarbru?cken: Lap Lambert Academic Publishing.
[2] Lipsky, L. R. (2009). Queuing theory: A linear algebraic approach. New York, NY: Springer.