LINE Solver
MATLAB API documentation
Loading...
Searching...
No Matches
matlab
src
api
qsys
qsys_gig1_approx_gelenbe.m
1
function [W,rhohat]=qsys_gig1_approx_gelenbe(lambda,mu,ca,cs)
2
% [W,RHOHAT]=QSYS_GIG1_APPROX_GELENBE(LAMBDA,MU,CA,CS)
3
%
4
% Gelenbe
's diffusion approximation with instantaneous-return boundary:
5
% p(0) = 1-rho, p(n) = rho*(1-rhat)*rhat^(n-1), n>=1
6
% rhat = exp(-2*(1-rho)/(rho*ca^2+cs^2))
7
% hence E[N] = rho/(1-rhat) and the mean response time (time in system)
8
% W = E[N]/lambda = 1/(mu*(1-rhat)).
9
%
10
% Reference: Gelenbe, E. (1975). On approximate computer system models.
11
% Journal of the ACM 22(2), 261-269.
12
13
rho=lambda/mu;
14
rhat=exp(-2*(1-rho)/(rho*ca^2+cs^2));
15
W=1/(mu*(1-rhat));
16
rhohat = W*lambda/(1+W*lambda); % so that M/M/1 formulas still hold
17
end
Generated by
1.9.8