![]() |
LINE Solver (C++)
Templated C++ port of the LINE queueing solver
|
Expected maximum of K i.i.d. More...
Go to the source code of this file.
Classes | |
| struct | line::fj::FJXmaxCoxianResult< T > |
| [Xmax, m1, c2] of fj_xmax_coxian. More... | |
Namespaces | |
| namespace | line |
| namespace | line::fj |
Functions | |
| template<class T> | |
| FJXmaxCoxianResult< T > | line::fj::fj_xmax_coxian (unsigned K, const T &mu1, const T &mu2, const T &q) |
| Expected maximum of K i.i.d. | |
Expected maximum of K i.i.d.
two-stage Coxian variables.
Templated port of matlab/src/api/fj/fj_xmax_coxian.m.
With X = T1 + B T2, T1 ~ Exp(mu1), T2 ~ Exp(mu2) and B ~ Bernoulli(q), the survival function is a two-term exponential mixture
S(t) = A exp(-mu1 t) + B exp(-mu2 t), A = (1-q) + q mu2/(mu2-mu1), B = -q mu1/(mu2-mu1),
so expanding 1 - (1-S)^K binomially and integrating term by term gives
E[Y_K] = sum_{j=1..K} (-1)^(j+1) C(K,j) sum_{i=0..j} C(j,i) A^(j-i) B^i / ((j-i) mu1 + i mu2).
At coincident stage rates the mixture degenerates into S(t) = (1 + q mu t) exp(-mu t) and the same expansion is carried out with integral t^m exp(-j mu t) dt = m!/(j mu)^(m+1), which is selected automatically.
Definition in file fj_xmax_coxian.h.