1function w = npfqn_rqna_weight(t)
2% w = NPFQN_RQNA_WEIGHT(t) - Canonical RBM correlation weight function w*(t)
3% used by
the Robust Queueing Network Analyzer (RQNA).
5% w*(t) = 1 - (1 - c*(t))/(2 t), where c*(t)
is the correlation function of
the
6% stationary version of canonical reflected Brownian motion (drift -1, diffusion
9% c*(t) = 2(1 - 2t - t^2) Phi^c(sqrt(t)) + 2 sqrt(t) phi(sqrt(t)) (1 + t),
11% with Phi^c
the standard-normal complementary cdf and phi its density. The
12% weight
is monotonically increasing with w*(0)=0 and w*(Inf)=1.
13% Reference: W. Whitt and W. You (2018),
"A Robust Queueing Network Analyzer
14% Based on Indices of Dispersion", eqs. (24)-(25).
16% Input: t - array of nonnegative time arguments
17% Output: w - array of weights w*(t), same shape as t
31 Phic = 0.5*erfc(st/sqrt(2)); % complementary standard-normal cdf
32 phi = exp(-ti/2)/sqrt(2*pi); % standard-normal density at sqrt(t)
33 cstar = 2*(1 - 2*ti - ti^2)*Phic + 2*st*phi*(1 + ti);
35 % limit w*(t) -> 0 as t -> 0; use series to avoid catastrophic cancellation
38 w(idx) = 1 - (1 - cstar)/(2*ti);
40 % numerical guard: w*
is a weight in [0,1]
41 if w(idx) < 0, w(idx) = 0; end
42 if w(idx) > 1, w(idx) = 1; end