LINE Solver
MATLAB API documentation
Loading...
Searching...
No Matches
APH3rdMomentUpperBound.m
1% m3 = APH3rdMomentUpperBound(m1, m2, n)
2%
3% Returns the upper bound of the third moment of acyclic
4% phase-type (APH) distributions of order n.
5%
6% Parameters
7% ----------
8% m1 : double
9% The first moment
10% m2 : double
11% The second moment
12% n : int
13% Number of states
14%
15% Returns
16% -------
17% m3 : double
18% The highest third moment an order-n APH can have with
19% the given first and second moment.
20%
21% References
22% ----------
23% .. [1] A. Bobbio, A. Horvath, M. Telek, "Matching three
24% moments with minimal acyclic phase type
25% distributions," Stochastic models, pp. 303-326, 2005.
26
27function m3 = APH3rdMomentUpperBound (m1, m2, n)
28
29 n2 = m2 / m1 / m1;
30 if n2<(n+1.0)/n
31 m3 = -inf;
32 elseif n2<=n/(n-1.0)
33 m3 = m1 * m2 * (2.0*(n-2.0)*(n*n2-n-1.0)*sqrt(1.0+(n*(n2-2.0))/(n-1.0)) + (n+2.0)*(3.0*n*n2-2.0*n-2.0)) / (n*n*n2);
34 else
35 m3 = inf;
36 end
37end