1% [beta, B] = DPHFromMG(alpha, A, precision)
3% Obtains a Markovian representation of a matrix
4% geometric distribution of the same size,
if possible.
8% alpha : vector, shape (1,M)
9% The initial vector of the matrix-geometric
11% A : matrix, shape (M,M)
12% The matrix parameter of the matrix-geometric
14% precision : double, optional
15% A representation
is considered to be a Markovian one
16%
if it
is closer than the precision
20% beta : vector, shape (1,M)
21% The initial probability vector of the Markovian
23% B : matrix, shape (M,M)
24% Transition probability matrix of the Markovian
29% .. [1] G Horváth, M Telek,
"A minimal representation of
30% Markov arrival processes and a moments matching
31% method," Performance Evaluation 64:(9-12) pp.
34function [beta, B] = DPHFromMG (alpha, A, precision)
36 function nrep = transfun (orep, B)
37 nrep = {orep{1}*B, inv(B)*orep{2}*B};
40 function d = evalfun (orep, k)
47 Ad = Ao - diag(diag(Ao));
49 d = -min([min(ao), min(av), min(min(Ad))]);
51 d = -sum(ao(ao<0)) - sum(av(av<0)) - sum(sum(Ad(Ad<0)));
55 if ~exist(
'precision',
'var')
59 global BuToolsCheckInput;
60 if isempty(BuToolsCheckInput)
61 BuToolsCheckInput = true;
64 if BuToolsCheckInput && ~CheckMGRepresentation(alpha, A)
65 error('DPHFromMG: Input isn''t a valid MG distribution!');
68 nrep = FindMarkovianRepresentation ({alpha, A}, @transfun, @evalfun, precision);