LINE Solver
MATLAB API documentation
Loading...
Searching...
No Matches
me_gegec_mql.m
1function L = me_gegec_mql(lambda, Ca, mu, Cs, c)
2%ME_GEGEC_MQL Mean queue length of a stable infinite-capacity GE/GE/c/FCFS queue
3%
4% Exact ME solution of Kouvatsos (1994), equation (3.9). Shared by the
5% infinite-capacity branch of ME_OQN_BLK; ME_OQN carries a numerically
6% identical local copy because it is compiled to a MEX file by MEXIFY.
7%
8% INPUTS:
9% lambda - Arrival rate
10% Ca - Squared coefficient of variation of the interarrival times
11% mu - Service rate of one server
12% Cs - Squared coefficient of variation of the service times
13% c - Number of servers (finite, c >= 1)
14%
15% OUTPUT:
16% L - Mean number of jobs in the queue
17%
18% Reference:
19% D.D. Kouvatsos, "Entropy Maximisation and Queueing Network Models",
20% Annals of Operations Research, 48:63-126, 1994, equation (3.9).
21%
22% Copyright (c) 2012-2026, Imperial College London
23% All rights reserved.
24
25alpha2 = 2 / (Cs + 1);
26alpha1 = 1 - alpha2;
27beta2 = 2 / (Ca + 1);
28beta1 = 1 - beta2;
29lambda2 = beta2 * lambda;
30mu2 = alpha2 * mu;
31g = zeros(c, 1);
32for j = 1:(c - 1)
33 g(j) = (lambda2 + (j - 1) * mu2 * beta1) * alpha2 / (j * mu2 * (1 - alpha1 * beta1));
34end
35g(c) = (lambda2 + (c - 1) * mu2 * beta1) * alpha2 / (lambda2 * alpha1 + c * mu2);
36x = (lambda2 + c * mu2 * beta1) / (lambda2 * alpha1 + c * mu2);
37Gn = cumprod(g);
38Z = 1 + sum(Gn(1:c-1)) + Gn(c) / (1 - x);
39S1 = 0;
40for n = 1:(c - 1)
41 S1 = S1 + n * Gn(n);
42end
43S2 = Gn(c) * (c / (1 - x) + x / (1 - x)^2);
44L = (S1 + S2) / Z;
45end