5#ifndef LINE_API_SN_SN_RENEWAL_LST_H
6#define LINE_API_SN_SN_RENEWAL_LST_H
52 if (ist < 1 || ist >
sn.service.size() ||
sn.service[ist - 1].empty())
return {};
65 const std::size_t n = D0.
rows();
66 if (n == 0 || D0.
cols() != n || D1.
rows() != n || D1.
cols() != n)
return {};
68 for (std::size_t i = 0; i < n; ++i)
69 for (std::size_t j = 0; j < n; ++j) {
78 std::vector<double> e1(n, 0.0);
79 for (std::size_t i = 0; i < n; ++i)
80 for (std::size_t j = 0; j < n; ++j) e1[i] += D1d(i, j);
81 return [pie, D0d, e1, n](
double s) {
83 for (std::size_t i = 0; i < n; ++i)
84 for (std::size_t j = 0; j < n; ++j) A(i, j) = (i == j ? s : 0.0) - D0d(i, j);
85 const std::vector<double> x =
solve(A, e1);
87 for (std::size_t i = 0; i < n; ++i) v += pie[i] * x[i];
91 const auto handles =
sn.lst();
92 if (ist - 1 < handles.size() && !handles[ist - 1].empty() && handles[ist - 1][0]) {
93 const auto h = handles[ist - 1][0];
94 return [h](
double s) {
return h(std::complex<double>(s, 0.0)).real(); };
A network plus its refreshed NetworkStruct.
What refreshProcessRepresentations and refreshLST compute FROM a distribution: the (D0,...
Eigenvalues and singular values, backed by LAPACK.
Enumerations and the minimal distribution descriptor shared by the model layer of the C++ port.
LU factorization with partial pivoting, templated on the number type.
Markovian arrival process descriptors: stationary vectors, rate, moments, autocorrelation and the ind...
Dense matrix and non-owning view.
RenewalLst sn_renewal_lst(const qn::NetworkStruct< T > &sn, std::size_t ist)
Renewal inter-arrival LST of class 1 at station ist (1-based).
std::function< double(double)> RenewalLst
A real-argument Laplace-Stieltjes transform; empty when there is none.
mam::Map< T > dist_to_map(const Distrib< T > &d)
The (D0,D1) pair that reaches sn.proc.
bool process_is_markovian(ProcessType p)
ProcessType.isMarkovian: true when sn.proc carries an exact matrix representation of the law,...
std::vector< T > map_pie(const Map< T > &m)
Phase distribution seen by an arriving job, pie = pi D1 / (pi D1 e).
Conservation laws of a layered queueing network, enumerated from its structure.
std::vector< T > solve(const Matrix< T > &A, const std::vector< T > &b)
Convenience: solve Ax = b, leaving A and b untouched.
std::size_t matrix_rank(const Matrix< double > &A)
Numerical rank at the standard max(m,n) eps sigma_1 threshold.
A queueing network and its refreshed NetworkStruct.
Number-type abstraction for the templated API port.
bool has_map() const
True when the type carries a (D0,D1) pair of its own.
Matrix< T > D0
The (D0,D1) pair when the type carries one directly.
A MAP as the pair of matrices (D0, D1).