1% [H0, H1] = RAPFromMomentsAndCorrelations(moms, corr)
3% Returns a rational arrival process that has the same moments
4% and lag autocorrelation coefficients as given.
8% moms : vector of doubles
9% The vector of marginal moments. To obtain a RAP of
10% size M, 2*M-1 moments are required.
11% corr : vector of doubles
12% The vector of lag autocorrelation coefficients. To
13% obtain a RAP of size M, 2*M-3 coefficients are needed.
17% H0 : matrix, shape (M,M)
18% The H0 matrix of the rational arrival process
19% H1 : matrix, shape (M,M)
20% The H1 matrix of the rational arrival process
24% There
is no guarantee that the returned matrices define
25% a valid stochastic process. The joint densities may be
30% .. [1] Mitchell, Kenneth, and Appie van de Liefvoort.
31%
"Approximation models of feed-forward G/G/1/N
32% queueing networks with correlated arrivals."
33% Performance Evaluation 51.2 (2003): 137-152.
35function [D0,D1] = RAPFromMomentsAndCorrelations (moms, corr)
37 [alpha, D0] = MEFromMoments (moms);
40 if length(corr) < 2*M-3
41 error(
'RAPFromMomentsAndCorrelations: The number of correlations given is less than required the 2n-3!');
44 rcorr=corr(1:2*M-3)/((moms(2)/2-moms(1)^2)/(moms(2)-moms(1)^2));
45 rcorr = MomsFromReducedMoms (rcorr);
46 [~,X] = MEFromMoments (reshape(rcorr,1,length(rcorr)));
51 error('RAPFromMomentsAndCorrelations: Correlation order
is different from ME order');
64 U1(i,j) = 1 / (N-i+1);
78 U2(i,j) = 1 / (M-i+1);
82 Y = -inv(T1)*U1*inv(X)*inv(U1)*T1;
87 D1=-D0*inv(U2)*T2*Y*inv(T2)*U2;