2 % @brief Solves a RAP/RAP/1 queue
using QBD methods
4 % @author LINE Development Team
8 % @brief Analyzes RAP/RAP/1 queue
using Quasi-Birth-Death process
11 % This function solves a RAP/RAP/1 queue (Rational Arrival Process)
using
12 % QBD methods, computing throughput, queue length, utilization, and other
13 % performance metrics.
17 % [XN, QN, UN, pqueue, R, eta, G, B, L, F] = qbd_raprap1(RAPa, RAPs)
18 % [XN, QN, UN, pqueue, R, eta, G, B, L, F] = qbd_raprap1(RAPa, RAPs, util)
23 % <tr><th>Name<th>Description
24 % <tr><td>RAPa<td>Arrival process (RAP)
25 % <tr><td>RAPs<td>Service process (RAP)
26 % <tr><td>util<td>(Optional) Target utilization to scale service rate
31 % <tr><th>Name<th>Description
32 % <tr><td>XN<td>System throughput
33 % <tr><td>QN<td>Mean queue length
34 % <tr><td>UN<td>Utilization
35 % <tr><td>pqueue<td>Queue length distribution
36 % <tr><td>R<td>Rate matrix R
37 % <tr><td>eta<td>Caudal characteristic
38 % <tr><td>G<td>Rate matrix G
39 % <tr><td>B<td>Backward transition block
40 % <tr><td>L<td>Local transition block
41 % <tr><td>F<td>Forward transition block
44function [XN,QN,UN,pqueue,R,eta,G,B,L,F]=qbd_raprap1(RAPa,RAPs,util)
45% [XN,QN,UN,PQUEUE,R,ETA]=QBD_RAPRAP1(RAPA,RAPS,UTIL)
47%[XN,QN,UN,pqueue,R]=qbd_raprap1(RAPa,RAPs,util)
51if nargin>=3 %exist(
'util',
'var')
52 RAPs = map_scale(RAPs,util/map_lambda(RAPa));
54util = map_lambda(RAPa) / map_lambda(RAPs);
56[QN,pqueue,R,G,B,L,F] = Q_RAP_RAP_1(RAPa{1},RAPa{2},RAPs{1},RAPs{2});
57eta = max(abs(eigs(R,1)));
62 UN= 1 - sum(pqueue(1,:));