LINE Solver (C++)
Templated C++ port of the LINE queueing solver
Loading...
Searching...
No Matches
mva_dispatch.h File Reference

Port of @@SolverMVA/mvaDispatch.m: one inner solve, choosing the analyzer that fits the model. More...

#include <algorithm>
#include <cmath>
#include <limits>
#include <memory>
#include <string>
#include <vector>
#include "line/api/qsys/qsys_gg1.h"
#include "line/api/qsys/qsys_ggnm_diffusion.h"
#include "line/api/qsys/qsys_gig1_bnds_extremal.h"
#include "line/api/qsys/qsys_gig1_approx_allencunneen.h"
#include "line/api/qsys/qsys_gig1_approx_gelenbe.h"
#include "line/api/qsys/qsys_gig1_approx_heyman.h"
#include "line/api/qsys/qsys_gig1_approx_kimura.h"
#include "line/api/qsys/qsys_gig1_approx_klb.h"
#include "line/api/qsys/qsys_gig1_approx_kobayashi.h"
#include "line/api/qsys/qsys_gig1_approx_marchal.h"
#include "line/api/qsys/qsys_gig1_rq.h"
#include "line/api/qsys/qsys_gig1_ubnd_kingman.h"
#include "line/api/qsys/qsys_gigk_approx.h"
#include "line/api/qsys/qsys_gigk_approx_kingman.h"
#include "line/api/qsys/qsys_gigk_approx_whitt.h"
#include "line/api/qsys/qsys_gigk_rqt.h"
#include "line/api/qsys/qsys_gigk_rqt_gamma.h"
#include "line/api/qsys/qsys_gimc.h"
#include "line/api/qsys/qsys_gm1.h"
#include "line/api/qsys/qsys_mg1.h"
#include "line/api/qsys/qsys_mg1_breakdown.h"
#include "line/api/qsys/qsys_mxg1.h"
#include "line/api/qsys/qsys_mxm1.h"
#include "line/api/mc/ctmc_solve.h"
#include "line/api/qsys/qsys_mg1k_loss_mgs.h"
#include "line/api/qsys/qsys_mgisrgi_whitt.h"
#include "line/api/qsys/qsys_mmk_qed.h"
#include "line/api/qsys/qsys_mg1_fb.h"
#include "line/api/qsys/qsys_mg1_lrpt.h"
#include "line/api/qsys/qsys_mg1_prio.h"
#include "line/api/qsys/qsys_ddckk.h"
#include "line/api/qsys/qsys_mg1_prio_pr.h"
#include "line/api/qsys/qsys_mg1_sjf.h"
#include "line/api/qsys/qsys_mg1kk.h"
#include "line/api/qsys/qsys_mmc_prio.h"
#include "line/api/qsys/qsys_mmckk.h"
#include "line/api/qsys/qsys_mg1_psjf.h"
#include "line/api/qsys/qsys_mg1_setf.h"
#include "line/api/qsys/qsys_mg1_srpt.h"
#include "line/api/qsys/qsys_mm1.h"
#include "line/api/qsys/qsys_mm1_dps.h"
#include "line/api/qsys/qsys_mmk.h"
#include "line/api/qsys/qsys_phm1.h"
#include "line/api/mam/map_count_idc.h"
#include "line/api/pfqn/pfqn_marie.h"
#include "line/lang/distribution.h"
#include "line/util/rootfind.h"
#include "line/lang/qn/network_struct.h"
#include "line/lang/qn/solver_feature_sets.h"
#include "line/solvers/cache_metrics.h"
#include "line/solvers/mva/solver_mva.h"
#include "line/solvers/mva/solver_mva_cache.h"
#include "line/solvers/mva/solver_mva_oi.h"
#include "line/solvers/mva/solver_mva_cacheqn.h"
#include "line/solvers/mva/solver_mva_cacheqn_retrieval.h"
#include "line/solvers/mva/solver_mva_polling.h"
#include "line/solvers/mva/solver_mva_retrieval.h"
#include "line/solvers/mva/solver_mva_sjn.h"
#include "line/solvers/mva/solver_mvac.h"
#include "line/solvers/mva/solver_qna.h"
#include "line/solvers/mva/solver_rqna.h"
#include "line/solvers/mva/solver_rqt.h"
#include "line/solvers/mva/solver_mapqn.h"
#include "line/api/sn/sn_has_bursty_arrival.h"
#include "line/api/sn/sn_patience_handles.h"
#include "line/api/sn/sn_renewal_lst.h"

Go to the source code of this file.

Classes

struct  line::mva::DispatchResult< T >
 What the dispatch returns: the metrics plus the algorithm that produced them. More...

Namespaces

namespace  line
 Conservation laws of a layered queueing network, enumerated from its structure.
namespace  line::mva

Functions

template<class T>
std::string line::mva::mva_erlanga_patience_reason (const qn::NetworkStruct< T > &L)
 Why method 'erlanga' cannot answer this model's patience, or "".
template<class T>
std::string line::mva::mva_finite_source_variant (const qn::NetworkStruct< T > &L, const std::string &method)
 Port of SolverMVA.finiteSourceVariant(sn, method): the finite-source closed form solver_mva_finite_source_analyzer answers under method on a closed single-class model of N jobs cycling between a Delay and one FCFS Queue (one visit each), or "" when there is none: "mg1kk" - exponential Delay, one server with a renewal service law (PH with rank-one D1, or a law with an LST); under default/exact only when the service is not exponential (product form covers that) "ddckk" - deterministic Delay and service, c servers "mmckk" - exponential Delay and service, c servers (by name).
template<class T>
std::string line::mva::mva_qsys_prio_variant (const qn::NetworkStruct< T > &L)
 Port of SolverMVA.qsysPrioVariant(sn): the exact priority closed form solver_mva_qsys_prio_analyzer answers on a multiclass open Source -> Queue -> Sink model with Poisson sources, or "" when there is none: "mg1.prio" - HOL, one server (Cobham; qsys_mg1_prio) "mg1.prio.pr" - FCFSPRPRIO, one server (qsys_mg1_prio_pr) "mmc.prio" - HOL, c > 1 servers, exponential service with a common rate for every class (qsys_mmc_prio).
template<class T>
bool line::mva::mva_is_mxg1_system (const qn::NetworkStruct< T > &L)
 Port of SolverMVA.isMxg1System: the single-class Source -> Queue -> Sink shape whose source is a batch Poisson stream (a BMAP of order one) and whose queue is one FCFS server with a non-exponential service law, the M^X/G/1 queue that solver_mva_qsys_analyzer answers with qsys_mxg1 (Haverkort 1998, eq.
template<class T>
std::string line::mva::mva_breakdown_reason (const qn::NetworkStruct< T > &L, const std::string &method)
 Port of SolverMVA.supportsBreakdown: a station with Queue.setBreakdown is served by one arm, the M/G/1 FCFS closed form qsys_mg1_breakdown (Gaver 1962; Avi-Itzhak and Naor 1963; Welch 1964), under 'default' or 'exact', on the single-class Source -> Queue -> Sink shape with a Poisson source, one FCFS server of infinite capacity, exponential failures that also strike an idle server, exponential repairs and no service while down.
template<class T>
DispatchResult< T > line::mva::solver_mva_qsys_analyzer (const qn::NetworkStruct< T > &L, const MvaOptions &opt)
 Port of solver_mva_qsys_analyzer.m: the closed forms for a single-class open Source-Queue-Sink model.
template<class T>
DispatchResult< T > line::mva::solver_mva_qsys_prio_analyzer (const qn::NetworkStruct< T > &L, const MvaOptions &opt)
 Port of solver_mva_qsys_prio_analyzer.m: the exact priority closed form for a single open queue with Poisson per-class arrivals, in the variant mva_qsys_prio_variant names: the Cobham formula for HOL M/G/1 (qsys_mg1_prio), the preemptive-resume M/G/1 formula (qsys_mg1_prio_pr) and HOL M/M/c with a common service rate (qsys_mmc_prio).
template<class T>
DispatchResult< T > line::mva::solver_mva_finite_source_analyzer (const qn::NetworkStruct< T > &L, const MvaOptions &opt)
 Port of solver_mva_finite_source_analyzer.m: the finite-source (machine repair) closed forms for the closed single-class model of N jobs cycling between a Delay (the operating time of the sources) and one FCFS Queue, in the variant mva_finite_source_variant names: "mg1kk" (exponential think time, one server with a renewal service law; Takacs 1962), "ddckk" (deterministic think and service times, c servers) and "mmckk" (exponential think and service times, c servers).
template<class T>
DispatchResult< T > line::mva::solver_mva_dps_exact (const qn::NetworkStruct< T > &L, const MvaOptions &opt)
 The exact multiclass M/M/1-DPS solve the reference inlines in mvaDispatch: the truncated multiclass chain of qsys_mm1_dps, which the AMVA cross-term correction cannot reproduce (it violates the equal-rate conservation law).
template<class T>
DispatchResult< T > line::mva::solver_mvald_analyzer (const qn::NetworkStruct< T > &L, const MvaOptions &opt, const Matrix< T > &init_sol)
 Port of solver_mvald_analyzer.m: the load-dependent branch.
template<class T>
DispatchResult< T > line::mva::solver_mva_qsys_sizebased_analyzer (const qn::NetworkStruct< T > &L, const MvaOptions &opt)
 Port of solver_mva_qsys_sizebased_analyzer.m: the M/G/1 formulas for the size-based disciplines (Wierman and Harchol-Balter, SIGMETRICS 2003).
template<class T>
DispatchResult< T > line::mva::solver_mva_marie_analyzer (const qn::NetworkStruct< T > &L, const MvaOptions &opt)
 Port of solver_mva_marie_analyzer.m: Marie's iterative aggregation-decomposition for a CLOSED network with non-exponential FCFS service.
template<class T>
DispatchResult< T > line::mva::mva_dispatch (const qn::NetworkStruct< T > &L, const MvaOptions &opt, const Matrix< T > &init_sol)
 The ladder itself.

Detailed Description

Port of @@SolverMVA/mvaDispatch.m: one inner solve, choosing the analyzer that fits the model.

THE ORDER IS THE CONTRACT. The branches are NOT disjoint – a single-class open Source-Queue-Sink model with a size-based discipline satisfies two of them, a cache model with load dependence satisfies two more – so the first match wins and reordering silently changes which algorithm a model gets. The sequence below is the reference's, top to bottom:

0 closed models with a shortest-job-next station <- ported 1 order-independent / pass-and-swap stations 2 delayed-hit retrieval caches, open then closed 3 size-based scheduling in an open Source-Queue-Sink model 4 single-class open Source-Queue-Sink <- ported 5 multiclass open polling 6 multiclass open HOL priority <- ported 7 multiclass open DPS, at most three classes <- ported 8 non-reentrant cache (Source-Cache-Sink) 9 integrated caching-queueing 10 bound methods (moved to SolverBA in the reference) 11 Marie's aggregation-decomposition 12 load- or class-dependent scaling <- ported 13 everything else <- solver_mva_analyzer, of whose method switch 'mvac' is dispatched here (solver_mvac.h)

WHAT IS NOT PORTED IS REFUSED BY NAME, never allowed to fall through to the generic analyzer. A cache model solved as an ordinary queueing network returns numbers – they are simply not the model's – and the same holds for a polling system and for an OI station, whose rate function the AMVA cannot represent at all.

Definition in file mva_dispatch.h.