LINE Solver
MATLAB API documentation
Loading...
Searching...
No Matches
GM1FundamentalMatrix.m
1% R = GM1FundamentalMatrix(A, precision, maxNumIt, method)
2%
3% Returns matrix R corresponding to the G/M/1 type Markov
4% chain given by matrices A.
5%
6% Matrix R is the minimal non-negative solution of the
7% following matrix equation:
8%
9% .. math::
10% R = A_0 + R A_1 + R^2 A_2 + R^3 A_3 + \dots.
11%
12% The implementation is based on [1]_, please cite it if
13% you use this method.
14%
15% Parameters
16% ----------
17% A : length(M) list of matrices of shape (N,N)
18% Matrix blocks of the G/M/1 type generator in the
19% regular part, from 0 to M-1.
20% precision : double, optional
21% Matrix R is computed iteratively up to this
22% precision. The default value is 1e-14
23% maxNumIt : int, optional
24% The maximal number of iterations. The default value
25% is 50.
26% method : {"CR", "RR", "NI", "FI", "IS"}, optional
27% The method used to solve the matrix-quadratic
28% equation (CR: cyclic reduction, RR: Ramaswami
29% reduction, NI: Newton iteration, FI: functional
30% iteration, IS: invariant subspace method). The
31% default is "CR".
32%
33% Returns
34% -------
35% R : matrix, shape (N,N)
36% The R matrix of the G/M/1 type Markov chain.
37%
38% References
39% ----------
40% .. [1] Bini, D. A., Meini, B., Steffé, S., Van Houdt,
41% B. (2006, October). Structured Markov chains
42% solver: software tools. In Proceeding from the
43% 2006 workshop on Tools for solving structured
44% Markov chains (p. 14). ACM.
45
46function R = GM1FundamentalMatrix (A, precision, maxNumIt, method)
47
48 if ~exist('precision','var')
49 precision = 1e-14;
50 end
51
52 if ~exist('maxNumIt','var')
53 maxNumIt = 50;
54 end
55
56 if ~exist('method','var')
57 method = 'CR';
58 end
59
60 global BuToolsVerbose;
61
62 N = size(A{1},2);
63 Am = zeros(N, N*length(A));
64 for i=1:length(A)
65 Am(:,(i-1)*N+1:i*N) = A{i};
66 end
67
68 R = GIM1_R (Am, 'A', method, 'MaxNumIt', maxNumIt, 'Verbose', BuToolsVerbose, 'EpsilonValue', precision);
69end