LINE Solver
MATLAB API documentation
Loading...
Searching...
No Matches
qbd_R_logred.m
1%{ @file qbd_R_logred.m
2 % @brief Computes the rate matrix R using logarithmic reduction
3 %
4 % @author LINE Development Team
5%}
6
7%{
8 % @brief Computes QBD rate matrix R via logarithmic reduction
9 %
10 % @details
11 % This function computes the rate matrix R for a Quasi-Birth-Death (QBD)
12 % process using the logarithmic reduction method.
13 %
14 % @par Syntax:
15 % @code
16 % R = qbd_R_logred(B, L, F)
17 % R = qbd_R_logred(B, L, F, iter_max)
18 % @endcode
19 %
20 % @par Parameters:
21 % <table>
22 % <tr><th>Name<th>Description
23 % <tr><td>B<td>Backward transition block A_(-1)
24 % <tr><td>L<td>Local transition block A_0
25 % <tr><td>F<td>Forward transition block A_1
26 % <tr><td>iter_max<td>(Optional) Maximum iterations (default: 100000)
27 % </table>
28 %
29 % @par Returns:
30 % <table>
31 % <tr><th>Name<th>Description
32 % <tr><td>R<td>Rate matrix R
33 % </table>
34%}
35function R=qbd_R_logred(B,L,F,iter_max)
36% Logarithmic reduction method
37if nargin<4
38 iter_max = 100000;
39end
40iLF = -inv(L)*F;
41iLB = -inv(L)*B;
42T = iLF;
43S = iLB;
44for iter=1:iter_max
45 D = iLF*iLB + iLB*iLF;
46 iLF = inv(eye(r)-D) *iLF*iLF;
47 iLB = inv(eye(r)-D) *iLB*iLB;
48 S = S + T*iLB;
49 T = T*iLF;
50 if norm(ones(r,1)-S*ones(r,1) ,1) <= 1e-12
51 break
52 end
53end
54U = L + F*S;
55R = -F * inv(U);
56end