5#ifndef LINE_SOLVERS_MVA_MVA_TYPES_H
6#define LINE_SOLVERS_MVA_MVA_TYPES_H
160 const std::string& method) {
164 return "solver_amva: the '" + base +
165 "' method approximates the arrival-instant queue length as a function of the "
166 "closed population vector N, so it is defined for closed models only; use "
167 "'default', 'lin', 'qd' or 'qna' for a model with open classes";
171 const bool check_means = !(base ==
"ab" || base ==
"schmidt" || base ==
"schmidt-ext");
173 return "solver_amva: the '" + base +
174 "' method is defined for strict product-form, load-independent models; use 'default', "
175 "'lin' or 'qd' for this model";
193 const std::string& method) {
195 if (base !=
"rqna" && base !=
"rqt")
return "";
196 const std::string label = (base ==
"rqna") ?
"RQNA" :
"RQT";
201 return "solver_" + base +
": " + label +
202 " decomposes an open network into GI/G/1 queues and has no synchronisation "
203 "term; a Join carries no service process for its index of dispersion to be "
204 "read from; use the 'default' method for a fork-join model";
206 return "solver_" + base +
": " + label +
207 " supports single-class open networks only; use method 'qna' for multiclass models";
234 const std::vector<bool>& fcfs,
235 const std::string& method) {
237 bool any_fcfs =
false;
238 for (std::size_t i = 0; i < fcfs.size(); ++i)
239 if (fcfs[i]) any_fcfs =
true;
240 if (!any_fcfs)
return "";
241 for (std::size_t r = 0; r < njobs.size(); ++r)
242 if (std::isfinite(njobs[r]) && njobs[r] < 1.0)
243 return "solver_amva: the 'schmidt-ext' method corrects an FCFS station from the "
244 "network with one customer of that class tagged, so it needs every class to "
245 "hold at least one customer; class " +
246 std::to_string(r + 1) +
247 " holds none; use 'schmidt' for the uncorrected recursion";
261 if (!L.
has_product_form())
return "solver_mvac_analyzer: MVAC requires a product-form model";
263 if (st.
sched == qn::SchedStrategy::INF || st.
sched == qn::SchedStrategy::EXT)
continue;
268 return "solver_mvac_analyzer: MVAC supports single-server (SSFR) queues only; use "
269 "method 'exact' for multiserver stations";
285 for (std::size_t i = 0; i < L.
stations.size(); ++i) {
287 if (L.
stations[i].nodetype == qn::NodeType::Join)
continue;
289 if (sched == qn::SchedStrategy::EXT || sched == qn::SchedStrategy::INF ||
290 sched == qn::SchedStrategy::PS || sched == qn::SchedStrategy::FCFS)
292 return std::string(
"solver_qna: QNA decomposes every station as a GI/G/m centre and has "
A network plus its refreshed NetworkStruct.
bool has_product_form_not_het_fcfs(bool check_means=true) const
Port of sn_has_product_form_not_het_fcfs: LCFS is excluded, and at FCFS the service must be exponenti...
std::vector< Station< T > > stations
stations[k-1] is the k-th station
std::vector< NodeDef > nodes
every node, in creation order
bool has_open_classes() const
bool has_product_form() const
sn_has_product_form, conjunct for conjunct.
Fork-join section metrics: FJQLen, FJRespT and FJTput of every Fork/Join pair.
Dense matrix and non-owning view.
SchedStrategy
Scheduling disciplines, with the values of MATLAB SchedStrategy.
const char * sched_to_text(SchedStrategy s)
std::string mva_single_class_open_reason(const qn::NetworkStruct< T > &L, const std::string &method)
RQNA and RQT decompose an open network into GI/G/1 queues and build one uncertainty set per flow out ...
std::string mva_schmidt_ext_reason(const std::vector< double > &njobs, const std::vector< bool > &fcfs, const std::string &method)
The extended Schmidt method needs a customer of every class to tag.
std::string mva_mvac_reason(const qn::NetworkStruct< T > &L, const std::string &method)
MVAC is the exact chain recursion over single-server fixed-rate (SSFR) queues and infinite-server cen...
std::string mva_qna_scheduling_reason(const qn::NetworkStruct< T > &L)
QNA's station update has an arm for INF, PS and FCFS and none for any other discipline,...
std::string mva_closed_population_reason(const qn::NetworkStruct< T > &L, const std::string &method)
The closed-population AMVA family: an open chain, or a network outside strict product form,...
std::string mva_base_method(const std::string &method)
The method name with any leading "amva." alias stripped.
bool mva_is_closed_population_method(const std::string &method)
The AMVA algorithms whose recursion is over a CLOSED population vector.
Conservation laws of a layered queueing network, enumerated from its structure.
A queueing network and its refreshed NetworkStruct.
The DECLARED side of the gate: one feature set per solver.
The options SolverMVA reads.
std::string np_priority
options.config.np_priority: which non-preemptive priority correction a HOL station takes.
bool has_init_sol
Warm start, (nstations x nchains) chain-aggregated queue lengths; empty for none.
bool base_has_fork
Whether the model this solve came from has a Fork, which the model handed to the analyzer no longer d...
double rqt_alpha_a
options.config.rqt_alpha_a: arrival tail coefficient in (1,2]; 0 = 2.
std::string rqt_regime
options.config.rqt_regime: which service adaptation regime of the Robust Queueing Theory Table 1 the ...
bool rqt_exact
options.config.rqt_exact: use the exact worst case over the uncertainty sets instead of the closed-fo...
double rqt_alpha_s
options.config.rqt_alpha_s: service tail coefficient in (1,2]; 0 = 2.
std::vector< std::vector< double > > interlock
options.config.interlock: the interlocked-flow matrix of Franks (1999), Eq.
std::string fork_join
options.config.fork_join: which fork-join arm the fixed point takes.
Class-level results, the [Q,U,R,T,C,X] of the MATLAB analyzers.
std::vector< T > QNfcr
Finite capacity region row (1 x K each), filled by solver_oqnrc alone and EMPTY otherwise: jobs in th...
double lG
log of the normalizing constant, the reference's lG.
Matrix< T > AN
Analyzer-supplied station arrival rates (M x K), NaN where the runner derives them from the routing; ...
std::vector< T > DropRateNfcr
std::optional< bool > converged
Whether the fixed point met its tolerance, or empty when the handler reports none.
solvers::FjMetrics< T > fj
Fork-join section metrics set by the fork-join fixed point (fj_driver.h); empty otherwise.
One station of the network.
double nservers
may be infinite (a Delay, or an inf-scheduled task)
self.result.FJ: one row per Fork/Join pair, one column per class.