5#ifndef LINE_LANG_QN_RR_INFO_H
6#define LINE_LANG_QN_RR_INFO_H
61 std::vector<std::size_t>
K,
Q,
off;
62 std::vector<Matrix<T>>
qT;
63 std::vector<std::vector<T>>
qt,
qa;
70 std::size_t
col(std::size_t r, std::size_t k, std::size_t q)
const {
return off[r] + k *
Q[r] + q; }
97 if (ind == 0 || ind >
sn.nodes.size())
return ri;
98 const std::size_t ist =
sn.nodes[ind - 1].station;
100 const std::size_t R =
sn.nclasses;
111 for (std::size_t r = 0; r < R; ++r) {
112 ri.
K[r] =
sn.phasessz_of(ist, r + 1);
114 (void)
sn.rr_quantum_phases(ist, r + 1);
123 ri.
qt[r] = std::vector<T>(1, one);
124 ri.
qa[r] = std::vector<T>(1, one);
127 const std::size_t Q = d.
D0.rows();
130 ri.
qt[r].assign(Q, zero);
131 for (std::size_t i = 0; i < Q; ++i) {
133 for (std::size_t j = 0; j < Q; ++j) s += d.
D0(i, j);
142 for (std::size_t r = 0; r < R; ++r) {
144 c += ri.
K[r] * ri.
Q[r];
147 if (ind <=
sn.nvars.size())
148 for (std::size_t j = 0; j < 2 * R && j <
sn.nvars[ind - 1].size(); ++j) ri.
boff +=
sn.nvars[ind - 1][j];
158 "Round-robin with a non-phase-type quantum (e.g. Det) has no state-space form; "
159 "use a phase-type quantum (Exp, Erlang, HyperExp, APH, Coxian, PH) or a "
160 "simulation solver.");
UnsupportedError(const std::string &what)
A network plus its refreshed NetworkStruct.
The exception types the port throws.
Enumerations and the minimal distribution descriptor shared by the model layer of the C++ port.
Markovian arrival process descriptors: stationary vectors, rate, moments, autocorrelation and the ind...
Dense matrix and non-owning view.
ProcessType
Distribution kinds, with the values of MATLAB ProcessType.
std::vector< T > map_pie(const Map< T > &m)
Phase distribution seen by an arriving job, pie = pi D1 / (pi D1 e).
bool rr_quantum_is_ph(lang::ProcessType p)
True for the renewal phase-type families a quantum can be walked in.
void rr_require_ph(const RrInfo< T > &ri)
Refuses an RR station whose quantum is not phase-type (LINE:unsupported:Det).
RrInfo< T > rr_info(const NetworkStruct< T > &sn, std::size_t ind)
Port of State.rrInfo.
Conservation laws of a layered queueing network, enumerated from its structure.
A queueing network and its refreshed NetworkStruct.
The <kind> part of a LINE:<category>:<kind> identifier (see _kb/17-error-vocabulary....
Matrix< T > D0
The (D0,D1) pair when the type carries one directly.
A MAP as the pair of matrices (D0, D1).
The derived description of an RR station's quantum block, MATLAB's rinfo.
std::vector< std::vector< T > > qt
std::vector< std::vector< T > > qa
std::vector< std::size_t > off
std::vector< std::size_t > K
std::size_t col(std::size_t r, std::size_t k, std::size_t q) const
0-based column of m(r,k,q) inside the block; r, k, q 0-based.
std::vector< std::size_t > Q
std::vector< bool > markovian
std::vector< Matrix< T > > qT
One station of the network.
std::vector< Distrib< T > > quantum
Queue.setQuantum(class, distrib): the per-class time slice of a round-robin (SchedStrategy::RR) stati...