1% D = DMMAPFromDMRAP(H, precision)
3% Obtains a Markovian representation of a discrete rational
4% arrival process of the same size,
if possible,
using the
5% procedure published in [1]_.
9% H : list/cell of matrices of shape(M,M), length(N)
10% The H0...HN matrices of the DMRAP to transform
11% precision : double, optional
12% A representation
is considered to be a Markovian one
13%
if it
is closer to it than
this precision
17% D : list/cell of matrices of shape(M,M), length(N)
18% The D0...DN matrices of the DMMAP (
if found)
22% .. [1] András Horváth, Gábor Horváth, Miklós Telek,
"A
23% traffic based decomposition of two-class queueing
24% networks with priority service". COMPUTER NETWORKS
25% 53:(8) pp. 1235-1248. (2009)
27function D = DMMAPFromDMRAP(H,prec)
29 if ~exist(
'prec',
'var')
33 global BuToolsCheckInput;
35 if isempty(BuToolsCheckInput)
36 BuToolsCheckInput = true;
39 if BuToolsCheckInput && ~CheckDMRAPRepresentation(H)
40 error('DMMAPFromDMRAP: Input isn''t a valid DMRAP representation');
43 function nH = transfun (oH, B)
44 nH = cell(1,length(oH));
46 nH{i} = inv(B)*oH{i}*B;
50 function dist = evalfun (oH, k)
54 Ones = ones(size(oH{1}));
58 dist = min(dist, min(min(min(oH{k})),min(min(Ones-oH{k}))));
64 dist = dist + min(sum(oHk(oHk<0)), sum(oHk((Ones-oHk)<0)));
70 D = FindMarkovianRepresentation (H, @transfun, @evalfun, prec);