LINE Solver
MATLAB API documentation
Loading...
Searching...
No Matches
QBD_Caudal.m
1function eta=QBD_CAUDAL(A0,A1,A2,varargin)
2%QBD_CAUDAL Computes the Spectral Radius of R
3%
4% eta=QBD_CAUDAL(A0,A1,A2) computes the dominant eigenvalue of the
5% matrix R, the smallest nonnegative solution to R= A2 + R A1 + R^2 A0,
6% in case the QBD is recurrent
7%
8% Optional Parameters:
9%
10% Dual: When set to 1, the dominant eigenvalue of the Ramaswami
11% dual is returned. The input QBD must be transient.
12
13OptionNames=['Dual '];
14OptionTypes=['numeric'];
15OptionValues=[];
16
17options=[];
18for i=1:size(OptionNames,1)
19 options.(deblank(OptionNames(i,:)))=[];
20end
21
22% Default settings
23options.Dual=0;
24
25% Parse Optional Parameters
26options=ParseOptPara(options,OptionNames,OptionTypes,OptionValues,varargin);
27
28if (options.Dual == 1)
29 % the dominant eigenvalue of the Ramaswami dual is
30 % identical to the dominant eigenvalue of the process
31 % where A2 and A0 are switched.
32 A2old=A2;
33 A2=A0;
34 A0=A2old;
35end
36
37eta_min=0;
38eta_max=1;
39eta=1/2;
40while (eta_max - eta_min > 10^(-15))
41 new_eta=max(eig(A2+A1*eta+A0*eta^2));
42 if (new_eta > eta)
43 eta_min=eta;
44 else
45 eta_max=eta;
46 end
47 eta=(eta_min+eta_max)/2;
48end
49