LINE Solver
MATLAB API documentation
Loading...
Searching...
No Matches
MG1StationaryDistr.m
1% pi = MG1StationaryDistr (A, B, G, K)
2%
3% Returns the stationary distribution of the M/G/1 type
4% Markov chain up to a given level K.
5%
6% Parameters
7% ----------
8% A : length(M) list of matrices of shape (N,N)
9% Matrix blocks of the M/G/1 type generator in the
10% regular part, from 0 to M-1.
11% B : length(M) list of matrices of shape (N,N)
12% Matrix blocks of the M/G/1 type generator at the
13% boundary, from 0 to M-1.
14% G : matrix, shape (N,N)
15% Matrix G of the M/G/1 type Markov chain
16% K : integer
17% The stationary distribution is returned up to
18% this level.
19%
20% Returns
21% -------
22% pi : array, shape (1,(K+1)*N)
23% The stationary probability vector up to level K
24
25function pi = MG1StationaryDistr (A, B, G, K)
26
27 global BuToolsVerbose;
28
29 N = size(A{1},2);
30 Am = zeros(N, N*length(A));
31 for i=1:length(A)
32 Am(:,(i-1)*N+1:i*N) = A{i};
33 end
34
35 Bm = zeros(N, N*length(B));
36 for i=1:length(B)
37 Bm(:,(i-1)*N+1:i*N) = B{i};
38 end
39
40 pi = MG1_pi(Bm,Am,G,'MaxNumComp', K+1, 'Verbose', double(BuToolsVerbose));
41end