1% order = MEOrder(alpha, A, kind, prec)
3% Returns the order of the ME distribution (which
is not
4% necessarily equal to the size of the representation).
8% alpha : vector, shape (1,M)
9% The initial vector of the matrix-exponential
11% A : matrix, shape (M,M)
12% The matrix parameter of the matrix-exponential
14% kind : {
'obs',
'cont',
'obscont',
'moment'}, optional
15% Determines which order
is computed. Possibilities:
16%
'obs': observability,
17%
'cont': controllability,
18%
'obscont': the minimum of observability and
19% controllability order,
20%
'moment': moment order (which
is the
default).
21% prec : double, optional
22% Precision used to detect
if the determinant of the
23% Hankel matrix
is zero (in
case of kind=
"moment" only),
24% or the tolerance
for the rank calculation. The
25%
default value
is 1e-10.
30% The order of ME distribution
34% .. [1]
P. Buchholz, M. Telek,
"On minimal representation
35% of rational arrival processes." Madrid Conference on
36% Qeueuing theory (MCQT), June 2010.
38function order = MEOrder (alpha, A, kind, prec)
40 if ~exist(
'prec',
'var')
44 if ~exist('kind','var')
48 global BuToolsCheckInput;
49 if isempty(BuToolsCheckInput)
50 BuToolsCheckInput = true;
53 if BuToolsCheckInput && ~CheckMERepresentation(alpha, A)
54 error('MinimalRepFromME: Input isn''t a valid ME distribution!');
58 if strcmp(kind,'cont')
61 re(n,:) = sum(A'^(n-1), 1);
63 order = rank (re, prec);
64 elseif strcmp(kind,'obs')
67 re(n,:) = alpha*A^(n-1);
69 order = rank (re, prec);
70 elseif strcmp(kind,'obscont')
73 re(n,:) = alpha*A^(n-1);
75 obsOrder = rank (re, prec);
77 re(n,:) = sum(A'^(n-1), 1);
79 contOrder = rank (re, prec);
80 order = min(obsOrder,contOrder);
81 elseif strcmp(kind,'moment')
82 order = MEOrderFromMoments (MomentsFromME (alpha, A), prec);
84 error('MEOrder: Invalid ''kind'' parameter!')