LINE Solver
MATLAB API documentation
Loading...
Searching...
No Matches
qbd_bmapbmap1.m
1%{ @file qbd_bmapbmap1.m
2 % @brief Computes QBD blocks for a BMAP/BMAP/1 queue
3 %
4 % @author LINE Development Team
5%}
6
7%{
8 % @brief Constructs QBD blocks for batch arrival/service queue
9 %
10 % @details
11 % This function computes the QBD (Quasi-Birth-Death) transition blocks
12 % for a BMAP/BMAP/1 queue with batch arrivals and batch service.
13 %
14 % @par Syntax:
15 % @code
16 % qbd_bmapbmap1(MAPa, pbatcha, MAPs)
17 % @endcode
18 %
19 % @par Parameters:
20 % <table>
21 % <tr><th>Name<th>Description
22 % <tr><td>MAPa<td>Arrival process (MAP)
23 % <tr><td>pbatcha<td>Probability distribution of batch sizes
24 % <tr><td>MAPs<td>Service process (MAP)
25 % </table>
26 %
27 % @par Returns:
28 % <table>
29 % <tr><th>Name<th>Description
30 % </table>
31%}
32function qbd_bmapbmap1(MAPa, pbatcha, MAPs)
33na = length(MAPa{1});
34ns = length(MAPs{1});
35maxbatch = length(pbatcha);
36
37for b=1:maxbatch
38 A1{b} = kron(MAPa{2}*pbatcha(b),eye(ns));
39end
40A0 = krons(MAPa{1},MAPs{1});
41A_1 = kron(eye(na),MAPs{2});
42A0bar = kron(MAPa{1},eye(ns));
43B0 = krons(MAPa{1},eye(ns));
44for b=1:maxbatch
45 B1{b} = kron(MAPa{2}*pbatcha(b),eye(ns));
46end
47
48% first few levels of Q matrix
49%Z = 0*B0;
50%Q=[B0,cell2mat(B1),Z,Z,Z;
51% A_1,A0,cell2mat(A1),Z,Z;
52% Z,A_1,A0,cell2mat(A1),Z;
53% Z,Z,A_1,A0,cell2mat(A1)];
54
55end