5#ifndef LINE_SOLVERS_MVA_MVA_TYPES_H
6#define LINE_SOLVERS_MVA_MVA_TYPES_H
146 const std::string& method) {
150 return "solver_amva: the '" + base +
151 "' method approximates the arrival-instant queue length as a function of the "
152 "closed population vector N, so it is defined for closed models only; use "
153 "'default', 'lin', 'qd' or 'qna' for a model with open classes";
157 const bool check_means = !(base ==
"ab" || base ==
"schmidt" || base ==
"schmidt-ext");
159 return "solver_amva: the '" + base +
160 "' method is defined for strict product-form, load-independent models; use 'default', "
161 "'lin' or 'qd' for this model";
179 const std::string& method) {
181 if (base !=
"rqna" && base !=
"rqt")
return "";
182 const std::string label = (base ==
"rqna") ?
"RQNA" :
"RQT";
187 return "solver_" + base +
": " + label +
188 " decomposes an open network into GI/G/1 queues and has no synchronisation "
189 "term; a Join carries no service process for its index of dispersion to be "
190 "read from; use the 'default' method for a fork-join model";
192 return "solver_" + base +
": " + label +
193 " supports single-class open networks only; use method 'qna' for multiclass models";
220 const std::vector<bool>& fcfs,
221 const std::string& method) {
223 bool any_fcfs =
false;
224 for (std::size_t i = 0; i < fcfs.size(); ++i)
225 if (fcfs[i]) any_fcfs =
true;
226 if (!any_fcfs)
return "";
227 for (std::size_t r = 0; r < njobs.size(); ++r)
228 if (std::isfinite(njobs[r]) && njobs[r] < 1.0)
229 return "solver_amva: the 'schmidt-ext' method corrects an FCFS station from the "
230 "network with one customer of that class tagged, so it needs every class to "
231 "hold at least one customer; class " +
232 std::to_string(r + 1) +
233 " holds none; use 'schmidt' for the uncorrected recursion";
247 if (!L.
has_product_form())
return "solver_mvac_analyzer: MVAC requires a product-form model";
250 if (st.
sched == qn::SchedStrategy::INF || st.
sched == qn::SchedStrategy::EXT)
continue;
256 return "solver_mvac_analyzer: MVAC supports single-server (SSFR) queues only; use "
257 "method 'exact' for multiserver stations";
260 return "solver_mvac_analyzer: MVAC recurs on the queueing centers and needs at least one; "
261 "this model has only delay stations";
274 for (std::size_t i = 0; i < L.
stations.size(); ++i) {
276 if (L.
stations[i].nodetype == qn::NodeType::Join)
continue;
278 if (sched == qn::SchedStrategy::EXT || sched == qn::SchedStrategy::INF ||
279 sched == qn::SchedStrategy::PS || sched == qn::SchedStrategy::FCFS)
281 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
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)
Per-method structural gates, shared by list_valid_methods and by the analyzers themselves.
std::string mva_base_method(const std::string &method)
SolverMVA.getFeatureSet, plus getMethodFeatureSet's per-method deltas.
bool mva_is_closed_population_method(const std::string &method)
The AMVA algorithms whose recursion is over a CLOSED population vector.
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.
std::optional< bool > converged
Whether the fixed point met its tolerance, or empty when the handler reports none.
One station of the network.
double nservers
may be infinite (a Delay, or an inf-scheduled task)