5#ifndef LINE_API_SN_SN_PATIENCE_HANDLES_H
6#define LINE_API_SN_SN_PATIENCE_HANDLES_H
47 std::function<T(
const T&)>
ccdf;
49 std::function<T(
const T&)>
pdf;
76 if (ist >=
sn.nstations || r >=
sn.nclasses)
return h;
99 const T theta = h.
rate;
100 h.
ccdf = [theta](
const T& t) {
return qsys::detail::num_exp(T(-theta * t)); };
101 h.
pdf = [theta](
const T& t) {
return T(theta * qsys::detail::num_exp(T(-theta * t))); };
102 h.
hazard = [theta](
const T&) {
return theta; };
107 h.
ccdf = [m, one](
const T& t) {
108 std::vector<T> pts(1, t);
111 h.
pdf = [m](
const T& t) {
112 std::vector<T> pts(1, t);
115 const T asymptotic = h.
rate;
116 std::function<T(
const T&)> ccdf = h.
ccdf;
117 std::function<T(
const T&)> pdf = h.
pdf;
118 h.
hazard = [ccdf, pdf, asymptotic](
const T& t) {
124 return T(pdf(t) / c);
A network plus its refreshed NetworkStruct.
What refreshProcessRepresentations and refreshLST compute FROM a distribution: the (D0,...
Enumerations and the minimal distribution descriptor shared by the model layer of the C++ port.
Cumulative distribution of the inter-arrival time of a MAP.
Probability density of the inter-arrival time of a MAP.
PatienceHandles< T > sn_patience_handles(const qn::NetworkStruct< T > &sn, std::size_t ist, std::size_t r)
Build the patience handles of station ist (0-based), class r.
mam::Map< T > dist_to_map(const Distrib< T > &d)
std::vector< T > map_cdf(const Map< T > &m, const std::vector< T > &points)
Cumulative distribution of the inter-arrival time at the given points.
std::vector< T > map_pdf(const Map< T > &m, const std::vector< T > &tset)
Probability density of the inter-arrival time at the given points.
A queueing network and its refreshed NetworkStruct.
Number-type abstraction for the templated API port.
Engineering solution of the call-center model M/GI/s/r+GI.
Shared return type and arithmetic helpers for the templated qsys port.
The patience law of one station-class pair, in the forms the solvers consume.
std::function< T(const T &)> pdf
The patience density.
qsys::Patience< T > as_patience() const
This law as the Patience argument of the abandonment solvers.
std::function< T(const T &)> ccdf
F^c(t) = P(patience > t).
bool present
Whether the pair declares reneging at all; everything below is unset when false.
std::function< T(const T &)> hazard
The hazard rate h = f/(1-F).
bool isExponential
Whether the law is exponential, in which case the analysis is exact.
T rate
The abandonment rate 1/mean.
A MAP as the pair of matrices (D0, D1).
One station of the network.
std::vector< Distrib< T > > patience
Queue.setPatience(class, dist): the abandonment timer of a WAITING job, with impatience[r] naming whi...
std::vector< lang::ImpatienceType > impatience
The patience (time-to-abandon) law, in the three forms the algorithm accepts.
static Patience hazard(std::function< T(const T &)> h)
Patience given by its hazard rate h = f/(1-F).
static Patience exponential(const T &theta)
Exponential patience of rate theta, h(t) = theta, the Erlang A case.