LINE Solver
MATLAB API documentation
Loading...
Searching...
No Matches
pfqn_propfair.m
1%{
2%{
3 % @file pfqn_propfair.m
4 % @brief Proportionally fair allocation approximation (Walton 2009).
5%}
6%}
7
8%{
9%{
10 % @brief Proportionally fair allocation approximation (Walton 2009).
11 % @fn pfqn_propfair(L, N, Z)
12 % @param L Service demand matrix.
13 % @param N Population vector.
14 % @param Z Think time vector.
15 % @return G Normalizing constant estimate.
16 % @return lG Logarithm of normalizing constant.
17 % @return Xasy Asymptotic throughput vector.
18%}
19%}
20function [G,lG,Xasy] = pfqn_propfair(L,N,Z)
21% [G,LOG] = PFQN_PROPFAIR(L,N,Z)
22
23% Proportionally fair allocation
24%
25% Estimate the normalizing constant using a convex optimization program
26% that is asymptotically exact in models with single-server PS queues only.
27% The underlying optimization program is convex.
28% The script implements a heuristic to estimate the solution in the
29% presence of delay stations.
30%
31% Schweitzer, P. J. (1979). Approximate analysis of multiclass closed networks of
32% queues. In Proceedings of the International Conference on Stochastic Control
33% and Optimization. Free Univ., Amsterdam.
34%
35% Walton, Proportional fairness and its relationship with multi-class
36% queueing networks, 2009.
37
38[M,R]=size(L);
39optimopt = optimoptions(@fmincon,'MaxFunctionEvaluations',1e6,'Display','none');
40obj = @(X) -sum((N-X.*Z).*log(X+1e-6));
41[Xasy] = fmincon(@(x) obj(x), zeros(1,R), L, ones(M,1), [],[], zeros(1,R), [],[],optimopt);
42lG = 0;
43for r=1:R
44 if Z(r)>0
45 lG = lG + Xasy(r)*Z(r).*log(Z(r));
46 end
47end
48lG = sum((N-Xasy.*Z).*log(1./Xasy)) - sum(factln(Xasy.*Z));
49G = exp(lG);
50end