LINE Solver
MATLAB API documentation
Loading...
Searching...
No Matches
MRAPFromMoments.m
1% H = MRAPFromMoments(moms, Nm)
2%
3% Creates a marked rational arrival process that has the same
4% marginal and lag-1 joint moments as given (see [1]_).
5%
6% Parameters
7% ----------
8% moms : vector of doubles
9% The list of marginal moments. To obtain a marked
10% rational process of order M, 2*M-1 marginal moments
11% are required.
12% Nm : list of matrices, shape (M,M)
13% The list of lag-1 joint moment matrices. The
14% length of the list determines K, the number of arrival
15% types of the rational process.
16%
17% Returns
18% -------
19% H : list of matrices, shape (M,M)
20% The H0, H1, ..., HK matrices of the marked rational
21% process
22%
23% Notes
24% -----
25% There is no guarantee that the returned matrices define
26% a valid stochastic process. The joint densities may be
27% negative.
28%
29% References
30% ----------
31% .. [1] Andras Horvath, Gabor Horvath, Miklos Telek, "A
32% traffic based decomposition of two-class queueing
33% networks with priority service," Computer Networks
34% 53:(8) pp. 1235-1248. (2009)
35
36function H = MRAPFromMoments (moms, Nm)
37
38 [v, H0] = MEFromMoments (moms);
39 H0i = inv(-H0);
40
41 N = size(H0,1);
42 Ge = zeros(N);
43 G1 = zeros(N);
44
45 H0ip = eye(N);
46 for i=1:N
47 Ge(i,:) = v * H0ip;
48 G1(:,i) = sum(H0ip, 2);
49 H0ip = H0ip * i * H0i;
50 end
51
52 Gei = inv(Ge);
53 G1i = inv(G1);
54
55 H = cell(1,length(Nm)+1);
56 H{1} = H0;
57 for i=2:length(Nm)+1
58 H{i} = -H0*Gei*Nm{i-1}*G1i;
59 end
60end
61