5#ifndef LINE_SOLVERS_MVA_MVA_TYPES_H
6#define LINE_SOLVERS_MVA_MVA_TYPES_H
155 const std::string& method) {
159 return "solver_amva: the '" + base +
160 "' method approximates the arrival-instant queue length as a function of the "
161 "closed population vector N, so it is defined for closed models only; use "
162 "'default', 'lin', 'qd' or 'qna' for a model with open classes";
166 const bool check_means = !(base ==
"ab" || base ==
"schmidt" || base ==
"schmidt-ext");
168 return "solver_amva: the '" + base +
169 "' method is defined for strict product-form, load-independent models; use 'default', "
170 "'lin' or 'qd' for this model";
188 const std::string& method) {
190 if (base !=
"rqna" && base !=
"rqt")
return "";
191 const std::string label = (base ==
"rqna") ?
"RQNA" :
"RQT";
196 return "solver_" + base +
": " + label +
197 " decomposes an open network into GI/G/1 queues and has no synchronisation "
198 "term; a Join carries no service process for its index of dispersion to be "
199 "read from; use the 'default' method for a fork-join model";
201 return "solver_" + base +
": " + label +
202 " supports single-class open networks only; use method 'qna' for multiclass models";
229 const std::vector<bool>& fcfs,
230 const std::string& method) {
232 bool any_fcfs =
false;
233 for (std::size_t i = 0; i < fcfs.size(); ++i)
234 if (fcfs[i]) any_fcfs =
true;
235 if (!any_fcfs)
return "";
236 for (std::size_t r = 0; r < njobs.size(); ++r)
237 if (std::isfinite(njobs[r]) && njobs[r] < 1.0)
238 return "solver_amva: the 'schmidt-ext' method corrects an FCFS station from the "
239 "network with one customer of that class tagged, so it needs every class to "
240 "hold at least one customer; class " +
241 std::to_string(r + 1) +
242 " holds none; use 'schmidt' for the uncorrected recursion";
256 if (!L.
has_product_form())
return "solver_mvac_analyzer: MVAC requires a product-form model";
258 if (st.
sched == qn::SchedStrategy::INF || st.
sched == qn::SchedStrategy::EXT)
continue;
263 return "solver_mvac_analyzer: MVAC supports single-server (SSFR) queues only; use "
264 "method 'exact' for multiserver stations";
280 for (std::size_t i = 0; i < L.
stations.size(); ++i) {
282 if (L.
stations[i].nodetype == qn::NodeType::Join)
continue;
284 if (sched == qn::SchedStrategy::EXT || sched == qn::SchedStrategy::INF ||
285 sched == qn::SchedStrategy::PS || sched == qn::SchedStrategy::FCFS)
287 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.
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::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.