LINE Solver
MATLAB API documentation
Loading...
Searching...
No Matches
polling_qsys_1limited.m
1function W=polling_qsys_1limited(arvMAPs,svcMAPs,switchMAPs)
2% W=polling_qsys_1limited(arvMAPs,svcMAPs,switchMAPs)
3%
4% Approximate mean waiting time solution of a polling system with open
5% arrivals. All queues use 1-limited service.
6%
7% Unlike the exhaustive and gated formulas of this package, no exact
8% closed form is available for 1-limited service, so the result below is
9% an approximation and can deviate by more than 10% from the exact
10% solution (SolverCTMC, which supports arbitrary K).
11%
12% O. J. Boxma and B. Meister. Waiting-time approximations for
13% cyclic-service systems with switch-over times. SIGMETRICS
14% /PERFORMANCE '86, page 254-262, New York, NY, USA, 1986.
15%
16% Example:
17% W=polling_qsys_1limited({map_exponential(1/0.6),map_exponential(1/0.2)},{map_exponential(1),map_exponential(1)},{map_exponential(1),map_exponential(1)})
18
19n = length(arvMAPs); % number of classes
20for i=1:n
21 lambda(i) = map_lambda(arvMAPs{i});
22 b(i) = map_mean(svcMAPs{i});
23 b2(i) = map_moment(svcMAPs{i},2);
24 rho1(i) = lambda(i)*b(i);
25 r1(i) = map_mean(switchMAPs{i});
26 delta2(i) = map_var(switchMAPs{i});
27end
28rho=sum(rho1);
29R=sum(r1);
30% station time method Ferguson and Aminetzah 1985 as reported by Takagi
31W=onelimited(n,rho,delta2,lambda,b2,rho1,R);
32end
33
34function W=onelimited(n,rho,delta2,lambda,b2,rho1,R)
35W = zeros(1,n);
36for i=1:n
37 W(i)=(1-rho+rho1(i))/(1-rho-lambda(i)*R);
38 W(i)=W(i)*(1-rho)/((1-rho)*rho+sum(rho1.^2));
39 W(i)=W(i)*(rho/(2*(1-rho))*sum(lambda*b2(:))+rho*sum(delta2)/2/R + R/(2*(1-rho))*(rho1(i)*(1+rho1(i))));
40 end
41end
Definition Station.m:245