LINE Solver (C++)
Templated C++ port of the LINE queueing solver
Loading...
Searching...
No Matches
qsys_mgisrgi_whitt.h File Reference

Engineering solution of the call-center model M/GI/s/r+GI. More...

#include <algorithm>
#include <complex>
#include <cstddef>
#include <functional>
#include <string>
#include <type_traits>
#include <vector>
#include "line/api/lti/laplace_invert.h"
#include "line/api/qsys/qsys_types.h"
#include "line/num/number.h"
#include "line/util/error.h"
Include dependency graph for qsys_mgisrgi_whitt.h:

Go to the source code of this file.

Classes

struct  line::qsys::Patience< T >
 The patience (time-to-abandon) law, in the three forms the algorithm accepts. More...
struct  line::qsys::QsysAbandonResult< T >
 Steady-state measures of a multiserver queue with customer abandonment. More...
struct  line::qsys::MgisrgiOptions
 Options of qsys_mgisrgi_whitt, all with the MATLAB defaults. More...

Namespaces

namespace  line
namespace  line::qsys

Enumerations

enum class  line::qsys::PatienceForm { line::qsys::Exponential , line::qsys::Hazard , line::qsys::Ccdf }
 Which of the three accepted descriptions of the patience law is carried. More...

Functions

template<class T>
QsysAbandonResult< T > line::qsys::qsys_mgisrgi_whitt (const T &lambda, const T &mu, unsigned s, double r, const Patience< T > &patience, const MgisrgiOptions &opts=MgisrgiOptions())
 Engineering solution of the call-center model M/GI/s/r+GI.
template<class T>
QsysAbandonResult< T > line::qsys::qsys_erlanga (const T &lambda, const T &mu, const T &theta, unsigned s, double r=std::numeric_limits< double >::infinity(), const MgisrgiOptions &opts=MgisrgiOptions())
 Exact analysis of the Erlang A model M/M/s/r+M.

Detailed Description

Engineering solution of the call-center model M/GI/s/r+GI.

Templated port of matlab/src/api/qsys/qsys_mgisrgi_whitt.m, cross-checked against jar/src/main/java/jline/api/qsys/Qsys_mgisrgi_whitt.java.

Poisson arrivals at rate lambda, iid general service of mean 1/mu, s servers, r extra waiting spaces and iid general patience.

TWO APPROXIMATIONS. The general patience law becomes STATE-DEPENDENT Markovian abandonment, a customer jth from the end of the queue abandoning at rate delta_j = h(j/lambda) for the patience hazard h (eq. 3.3), because such a customer has been waiting for about j/lambda; the total with k waiting is Delta_k = sum_{j<=k} delta_j (eq. 3.4). The general service law becomes an exponential of the same mean (Sec. 5). What is left is M/M/s/r+M(n), a birth-and-death process:

mu_k = k mu 1 <= k <= s = s mu + Delta_{k-s} s+1 <= k <= s+r (7.1) x_s = 1, x_{s+k+1} = lambda x_{s+k}/mu_{s+k+1}, x_{k-1} = mu_k x_k/lambda p_k = x_k / sum_j x_j (7.4)-(7.7)

and the customer experience follows from the kernel

m_k(j) = 1/(s mu + Delta_k - Delta_{j-1}) (7.11) phi_k(j) = delta_j m_k(j) (7.10) sigma_k = prod_j (1 - phi_k(j)) (7.13)

which is EXACT for M/M/s/r+M (eq. 7.12), i.e. for qsys_erlanga.

ARITHMETIC. The birth-death leg and every moment are field operations, so the hazard and exponential forms instantiate at T = Rational. The ccdf form needs a logarithm and the waiting-time cdfs need a numerical Laplace inversion, so the first throws and the second is skipped unless T is double.

DIVERGENCE from the printed eqs. (3.5)-(3.6): they read delta_j = int_{(j-1)/lambda}^{j/lambda} h(t) dt and Delta_k = -log F^c(k/lambda), which are cumulative hazards, i.e. dimensionless, while delta and Delta are rates everywhere else in the paper. They are the AVERAGE hazard over an interval of length 1/lambda, so the factor lambda is missing. Restoring it makes the ccdf form reduce to the exact Erlang A rates under exponential patience, which the paper states this approximation does (eq. 7.12).

Reference: W. Whitt (2005). Engineering solution of a basic call-center model. Management Science 51(2), 221-235.

Definition in file qsys_mgisrgi_whitt.h.