LINE Solver
MATLAB API documentation
Loading...
Searching...
No Matches
qsys_gigk_approx_cosmetatos.m
1function [W,rhohat]=qsys_gigk_approx_cosmetatos(lambda,mu,ca,cs,k)
2% [W,RHOHAT]=QSYS_GIGK_APPROX_COSMETATOS(LAMBDA,MU,CA,CS,K)
3%
4% G/G/k queue approximation using the Cosmetatos method.
5% Adjusts the M/M/k results based on the variability of arrival
6% and service processes.
7%
8% Inputs:
9% LAMBDA - Arrival rate
10% MU - Service rate per server
11% CA - Coefficient of variation of inter-arrival time
12% CS - Coefficient of variation of service time
13% K - Number of servers
14%
15% Returns:
16% W - Average time in system (response time)
17% RHOHAT - Modified utilization (so that M/M/1 formulas still hold)
18
19% Copyright (c) 2012-2026, Imperial College London
20% All rights reserved.
21
22% Get M/M/k baseline waiting time
23W_mmk = qsys_mmk(lambda, mu, k);
24
25% Cosmetatos approximation: adjust M/M/k queue waiting time
26% based on variability factor
27Wq_mmk = W_mmk - 1/mu;
28variabilityFactor = (ca^2 + cs^2) / 2;
29Wq = Wq_mmk * variabilityFactor;
30W = Wq + 1/mu;
31
32rhohat = W*lambda/(1+W*lambda); % so that M/M/1 formulas still hold
33
34end