LINE Solver
MATLAB API documentation
Loading...
Searching...
No Matches
MinimalRepFromMRAP.m
1% D = MinimalRepFromMRAP(H, how, precision)
2%
3% Returns the minimal representation of a marked rational
4% arrival process.
5%
6% Parameters
7% ----------
8% H : list of matrices of shape (M,M)
9% The list of H0, H1, ..., HK matrices of the marked
10% rational arrival process
11% how : {"obs", "cont", "obscont"}, optional
12% Determines how the representation is minimized.
13% "cont" means controllability, "obs" means
14% observability, "obscont" means that the rational arrival
15% process is minimized in both respects. Default value
16% is "obscont".
17% precision : double, optional
18% Precision used by the Staircase algorithm. The default
19% value is 1e-12.
20%
21% Returns
22% -------
23% D : list of matrices of shape (M,M)
24% The D0, D1, ..., DK matrices of the minimal
25% representation
26%
27% References
28% ----------
29% .. [1] P. Buchholz, M. Telek, "On minimal representation of
30% rational arrival processes." Madrid Conference on
31% Qeueuing theory (MCQT), June 2010.
32
33function D = MinimalRepFromMRAP (H, how, precision)
34
35 if ~exist('precision','var')
36 precision = 1e-12;
37 end
38
39 if ~exist('how','var')
40 how = 'obscont';
41 end
42
43 global BuToolsCheckInput;
44 if isempty(BuToolsCheckInput)
45 BuToolsCheckInput = true;
46 end
47
48 if BuToolsCheckInput && ~CheckMRAPRepresentation (H)
49 error('MinimalRepFromMRAP: Input isn''t a valid MRAP representation');
50 end
51
52 if strcmp(how,'cont')
53 [B, n] = MStaircase (H, ones(size(H{1},1),1), precision);
54 D = cell(1,length(H));
55 for i=1:length(H)
56 Di = inv(B)*H{i}*B;
57 D{i} = Di(1:n,1:n);
58 end
59 elseif strcmp(how,'obs')
60 [alpha, A] = MarginalDistributionFromMRAP (H);
61 G = cell(1,length(H));
62 for i=1:length(H)
63 G{i} = H{i}';
64 end
65 [B, n] = MStaircase (G, alpha', precision);
66 for i=1:length(H)
67 Di = inv(B)*H{i}*B;
68 D{i} = Di(1:n,1:n);
69 end
70 elseif strcmp(how,'obscont')
71 D = MinimalRepFromMRAP(H, 'cont', precision);
72 D = MinimalRepFromMRAP(D, 'obs', precision);
73 end
74end
75