LINE Solver
MATLAB API documentation
Loading...
Searching...
No Matches
qsys_gig1_ubnd_kingman.m
1function [W,rhohat]=qsys_gig1_ubnd_kingman(lambda,mu,ca,cs)
2% [W,RHOHAT]=QSYS_GIG1_UBND_KINGMAN(LAMBDA,MU,CA,CS)
3%
4% Kingman's upper bound on the mean waiting time of a G/G/1 queue:
5% Wq <= lambda*(sa^2+ss^2)/(2*(1-rho)), sa^2=ca^2/lambda^2, ss^2=cs^2/mu^2
6% The returned W adds the mean service time, so it upper-bounds the mean
7% response time (time in system).
8%
9% Reference: Kingman, J.F.C. (1962). Some inequalities for the queue GI/G/1.
10% Biometrika 49(3/4), 315-324.
11
12rho=lambda/mu;
13Wq = lambda*(ca^2/lambda^2 + cs^2/mu^2)/(2*(1-rho));
14W = Wq + 1/mu;
15rhohat = W*lambda/(1+W*lambda); % so that M/M/1 formulas still hold
16end