2 % @brief Computes QBD matrices R and G
for MAP/MAP/1 queue
4 % @author LINE Development Team
8 % @brief Computes QBD transition matrices
for MAP/MAP/1 queue
11 % This function computes the QBD (Quasi-Birth-Death) matrices R and G
12 % along with transition blocks B, L, F
for a MAP/MAP/1 queue.
16 % [R, G, B, L, F, U] = qbd_rg(MAPa, MAPs)
17 % [R, G, B, L, F, U] = qbd_rg(MAPa, MAPs, util)
22 % <tr><th>Name<th>Description
23 % <tr><td>MAPa<td>Markovian Arrival Process
for arrivals
24 % <tr><td>MAPs<td>Markovian Arrival Process
for service
25 % <tr><td>util<td>(Optional) Target utilization
for scaling service rate
30 % <tr><th>Name<th>Description
31 % <tr><td>R<td>Rate matrix R (forward transitions)
32 % <tr><td>G<td>Rate matrix G (backward transitions)
33 % <tr><td>B<td>Backward transition matrix
34 % <tr><td>L<td>Local transition matrix
35 % <tr><td>F<td>Forward transition matrix
36 % <tr><td>U<td>Utilization
39function [R,G,B,L,F,U]=qbd_rg(MAPa,MAPs,util)
40% [XN,QN,UN,PQUEUE,R,ETA]=QBD_MAPMAP1(MAPA,MAPS,UTIL)
42%[XN,QN,UN,pqueue,R]=qbd_mapmap1(MAPa,MAPs,util)
46if nargin>=3%exist(
'util',
'var')
47 MAPs = map_scale(MAPs,util/map_lambda(MAPa));
49util = map_lambda(MAPa) / map_lambda(MAPs);
50F = kron(MAPa{2},eye(ns));
51L = krons(MAPa{1},MAPs{1});
52B = kron(eye(na),MAPs{2});
53A0bar = kron(MAPa{1},eye(ns));
55[G,R,U] = QBD_CR(B,L,F);