LINE Solver (C++)
Templated C++ port of the LINE queueing solver
Loading...
Searching...
No Matches
line::mva Namespace Reference

Classes

struct  AggrResult
 Port of @@SolverMVA/getProbAggr.m: P(n1 jobs of class 1, n2 of class 2, ...) at station ist for the model's state, a scalar in [0,1] with its log. More...
struct  AvgResult
 The metrics getAvg returns, after filtering. More...
struct  CacheResult
 What the cache analyzer reports beyond the [Q,U,R,T] block. More...
struct  ChainDemands
 The chain-level view of a layer, as sn_get_demands_chain returns it. More...
struct  ClassResults
 Class-level results, as sn_deaggregate_chain_results returns them. More...
struct  DispatchResult
 What the dispatch returns: the metrics plus the algorithm that produced them. More...
struct  Distrib
struct  FjMmt
 The transformed layer and the bookkeeping the fixed point needs to drive it and to merge its results back. More...
struct  GlobalConstants
 The MATLAB GlobalConstants, as reported by lineStart at its defaults. More...
struct  MargResult
 A marginal distribution and its logarithm, over the states asked for. More...
struct  MvaCacheqnCacheOutputs
 The cache half of the reference's return list: the (ncaches x nclasses) hit and miss split, plus the per-item occupancy the reference writes straight onto each Cache node with setResultItemProb. More...
struct  MvaCacheqnRetrievalSolution
 What the closed delayed-hit analyzer returns. More...
struct  MvaOptions
 The options SolverMVA reads. More...
struct  MvaRetrievalCacheOutputs
 The cache half of the reference's return list: hitprob, missprob, delayedprob, latency, hitproblist and itemprob of solver_mva_retrieval_analyzer.m. More...
struct  MvaSolution
 Class-level results, the [Q,U,R,T,C,X] of the MATLAB analyzers. More...
struct  PfChainParams
 Product-form chain parameters, the split into queueing and delay stations. More...
struct  SjnAnalyzerResult
 What the analyzer returns, the reference's metrics plus its actualmethod. More...

Enumerations

enum class  MetricKind {
  QLen , Util , RespT , ResidT ,
  Tput , ArvR
}
 Which metric is being filtered. More...
enum class  JobClassType
 Job class kinds, with the values of MATLAB JobClassType. More...
enum class  NodeType
 Node kinds, with the values of MATLAB NodeType. More...
enum class  SchedStrategy
 Scheduling disciplines, with the values of MATLAB SchedStrategy. More...
enum class  SchedStrategy
 Scheduling disciplines, with the values of MATLAB SchedStrategy. More...

Functions

template<class T>
fj_node_time (const qn::NetworkStruct< T > &V, std::size_t nd, const std::vector< std::size_t > &merge, const Matrix< T > &QN, const Matrix< T > &TN)
 Port of ModelAdapter.findPathsCS' per-node charge: the queue length of the merge set at this station divided by its throughput, which is the time a job of that set spends at the node.
template<class T>
void fj_find_paths (FjMmt< T > &tr, std::size_t curNode, std::size_t endNode, std::size_t curClass, const std::vector< std::size_t > &merge, const Matrix< T > &QN, const Matrix< T > &TN, const T &t0, std::vector< T > &out, std::vector< std::pair< std::size_t, std::size_t > > visited)
 Port of ModelAdapter.findPathsCS: the response time along every path from a fork to ITS join, in the given class.
template<class T>
Matrix< T > fj_leading_cols (const Matrix< T > &A, std::size_t n)
 The leading n columns of a class-indexed metric.
template<class T>
bool fj_converged (const Matrix< T > &A, const Matrix< T > &B, double iter_tol)
 The mixed absolute/relative stopping test of the fork-join loop.
template<class T>
std::vector< T > fj_fork_tput (const qn::NetworkStruct< T > &L, const FjMmt< T > &tr, const Matrix< T > &TN, std::size_t fa)
 Port of fjFixedPoint.m:130-136: the firing throughput of fork fa, per class of the BASE model.
template<class T>
fj_finite_or_zero (const T &x)
 A metric read out of a solve, with a non-finite entry read as zero.
template<class T>
void fj_ht_sync_delays (const qn::NetworkStruct< T > &L, FjMmt< T > &tr, const MvaSolution< T > &out)
 Port of the heidelberger-trivedi arm of fjFixedPoint.m:212-255: the synchronisation delays of one pass, written onto the transformed model.
template<class T>
void fj_ht_merge (const qn::NetworkStruct< T > &L, const FjMmt< T > &tr, MvaSolution< T > &out)
 Port of the heidelberger-trivedi arm of fjFixedPoint.m:263-291: fold the auxiliary columns back into the classes they stand for.
template<class T, class InnerSolve>
MvaSolution< T > fj_fixed_point (const qn::NetworkStruct< T > &L, FjMmt< T > &tr, std::vector< T > &lam, const MvaOptions &opt, InnerSolve inner)
 Drive the fork-join fixed point of a transformed model to convergence.
template<class T>
FjMmt< T > fj_ht (const qn::NetworkStruct< T > &L)
 Build the H-T transform of L.
template<class T>
FjMmt< T > fj_fork_join_transform (const qn::NetworkStruct< T > &L, const std::string &method)
 options.config.fork_join -> the transform it names.
template<class T>
fj_expected_ordstat (const std::vector< T > &means, std::size_t k)
 The instant the join fires: E[X_(k)] of independent exponentials with the given means, by inclusion-exclusion.
template<class T>
fj_expected_max (const std::vector< T > &means)
 The AND-join case, i.e.
template<class T>
std::size_t fj_join_quorum (const qn::NetworkStruct< T > &sn, std::size_t joinNode, std::size_t nbranches)
 The number of siblings the Join node fires on, out of nbranches forked.
template<class T>
Distrib< T > fj_exp_fit_mean (const T &mean)
 Exp.fitMean(m), including its clamp.
template<class T>
void fj_sort_forks (FjMmt< T > &tr)
 Port of ModelAdapter.sortForks: fill in outer and parent on every fork record.
template<class T>
void fj_widen_csmatrix (FjMmt< T > &tr)
 Widen every explicit ClassSwitch matrix to the auxiliary-expanded class set.
template<class T>
FjMmt< T > fj_mmt (const qn::NetworkStruct< T > &L)
 Build the transformed layer.
template<class T>
DispatchResult< T > 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 > solver_mva_qsys_prio_analyzer (const qn::NetworkStruct< T > &L, const MvaOptions &opt)
 Port of solver_mva_qsys_prio_analyzer.m: the exact Cobham formula for a single open M/G/1 queue with non-preemptive priorities.
template<class T>
DispatchResult< T > 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 > 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 > 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 > 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 > mva_dispatch (const qn::NetworkStruct< T > &L, const MvaOptions &opt, const Matrix< T > &init_sol)
 The ladder itself.
template<class T>
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.
template<class T>
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 of the first two moments of a SINGLE stream, so a multiclass model has no counterpart in their equations.
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.
template<class T>
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 centres of a product-form network, and it recurs on the queueing centres, so it needs at least one.
template<class T>
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, so a SIRO, LCFS, LCFS-PR, HOL or priority station used to leave its whole row of Q, U, R and T at zero and the table was returned as a solution.
template<class T>
ChainDemands< T > sn_get_demands_chain (const qn::NetworkStruct< T > &L)
 Port of sn_get_demands_chain.
template<class T>
ClassResults< T > sn_deaggregate_chain_results (const qn::NetworkStruct< T > &L, const ChainDemands< T > &d, const Matrix< T > &Qchain, const Matrix< T > &Uchain, const Matrix< T > &Rchain, const Matrix< T > &Tchain, const std::vector< T > &Xchain)
 Port of sn_deaggregate_chain_results.
template<class T>
PfChainParams< T > sn_get_product_form_chain_params (const qn::NetworkStruct< T > &L, const ChainDemands< T > &d)
 Port of sn_get_product_form_chain_params.
template<class T>
Matrix< T > sn_interlock_chain (const qn::NetworkStruct< T > &L, const std::vector< std::vector< double > > &ILclass)
 Aggregate a class-indexed interlock matrix to the chain basis the MVA analyzers work in.
template<class T>
std::string mva_mapqn_reason (const qn::NetworkStruct< T > &L, const std::string &method)
 The reason 'amva.mapqn' cannot solve L, or "" when it can (and "" for any other method).
template<class T>
MvaSolution< T > solver_mapqn (const qn::NetworkStruct< T > &L, const MvaOptions &opt)
template<class T>
MvaSolution< T > solver_mva_lcfsqn (const qn::NetworkStruct< T > &L, std::size_t lcfs_ist, std::size_t lcfspr_ist)
 Port of solver_mva_lcfsqn.m: the closed two-station LCFS + LCFS-PR network.
template<class T>
MvaSolution< T > solver_mva (const qn::NetworkStruct< T > &L, const ChainDemands< T > &d, const MvaOptions &opt)
 Port of solver_mva.m, closed and mixed product-form networks.
template<class T>
MvaSolution< T > solver_amvald (const qn::NetworkStruct< T > &L, const ChainDemands< T > &d, const MvaOptions &opt, const std::string &method, bool &converged, const Matrix< T > &init_sol=Matrix< T >())
 Port of solver_amvald.m together with solver_amvald_forward.m, restricted to the INF / PS / FCFS-family disciplines with no load or class dependence.
std::string amva_method_alias (const std::string &m)
 The amva.
template<class T>
MvaSolution< T > solver_amva (const qn::NetworkStruct< T > &L, const ChainDemands< T > &d, MvaOptions opt, const Matrix< T > &init_sol, bool &converged)
template<class T>
MvaSolution< T > solver_mvald (const qn::NetworkStruct< T > &L, const MvaOptions &opt)
 Port of solver_mvald.m: exact MVA on a load-dependent model, through pfqn_mvaldmx.
template<class T>
MvaSolution< T > solver_mva_sum (const qn::NetworkStruct< T > &L, const MvaOptions &opt)
 Port of solver_mva_sum.m: the SUM / ESUM summation method (Bolch et al., Secs.
template<class T>
MvaSolution< T > solver_sqd (const qn::NetworkStruct< T > &L, const ChainDemands< T > &d)
 Port of solver_sqd.m: Smith queue decomposition for blocking-after-service.
template<class T>
bool mva_is_bas_model (const qn::NetworkStruct< T > &L)
 Port of isBasModel in solver_mva_analyzer.m: a closed single-CHAIN model with at least one blocking-after-service drop rule, which SQD handles and neither exact MVA nor AMVA does.
template<class T>
bool sn_is_bas_model (const qn::NetworkStruct< T > &L)
 Port of matlab/src/api/sn/sn_is_bas_model.m: a closed single-CLASS model with a BAS drop rule.
template<class T>
bool sn_is_mm1k_loss (const qn::NetworkStruct< T > &L)
 Port of matlab/src/api/sn/sn_is_mm1k_loss.m: a single-class open Source-Queue-Sink system whose queue is a single-server exponential M/M/1/K with tail drop.
template<class T>
bool amva_uses_pf_kernels (const qn::NetworkStruct< T > &L)
 Conservative form of the branch test in solver_amva: true when this model may be solved by the product-form AMVA kernels rather than by solver_amvald.
template<class T>
bool mva_carries_interlock (const qn::NetworkStruct< T > &L, const MvaOptions &opt)
 True when the MVA path this model already dispatches to carries a class-level interlock matrix (Franks 1999, Eq.
template<class T>
MvaSolution< T > solver_mva_analyzer (const qn::NetworkStruct< T > &L, const MvaOptions &opt, const Matrix< T > &init_sol)
 Port of solver_mva_analyzer.m, default and the explicit method names.
template<class T>
CacheResult< T > solver_mva_cache_analyzer (const qn::NetworkStruct< T > &L, const MvaOptions &opt)
 Port of solver_mva_cache_analyzer.m for a Source-Cache-Sink model.
template<class T>
MvaSolution< T > solver_mva_cacheqn_analyzer (const qn::NetworkStruct< T > &L, const MvaOptions &opt, qn::NetworkStruct< T > *refreshed_out=nullptr, MvaCacheqnCacheOutputs< T > *cache_out=nullptr)
template<class T>
MvaCacheqnRetrievalSolution< T > solver_mva_cacheqn_retrieval_analyzer (const qn::NetworkStruct< T > &L, const MvaOptions &opt)
 Port of solver_mva_cacheqn_retrieval_analyzer.m.
template<class T>
std::vector< std::size_t > find_oi_stations (const qn::NetworkStruct< T > &L)
 The OI stations of a model, 1-based station indices.
template<class T>
bool nc_is_oi_model (const qn::NetworkStruct< T > &L)
 Port of nc_is_oi_model: whether the model as a WHOLE is order-independent, which is a strictly stronger condition than having an OI station.
template<class T>
MvaSolution< T > solver_mva_oi_analyzer (const qn::NetworkStruct< T > &L, const MvaOptions &opt)
 Port of solver_mva_oi_analyzer.m.
template<class T>
MvaSolution< T > solver_mva_polling_analyzer (const qn::NetworkStruct< T > &L, const MvaOptions &opt)
 Port of solver_mva_polling_analyzer.m.
template<class T>
MargResult< T > solver_mva_get_prob_marg (const qn::NetworkStruct< T > &L, const AvgResult< T > &avg, std::size_t ist, std::size_t r, const std::vector< long > &states, const std::string &method="default")
 Port of @@SolverMVA/getProbMarg.m: P(n jobs of class r at station i) for the states in states (or the reference's own default range when empty).
template<class T>
solver_mva_get_prob_norm_const_aggr (const qn::NetworkStruct< T > &L, const MvaOptions &opt)
 Port of @@SolverMVA/getProbNormConstAggr.m: log G.
template<class T>
AggrResult< T > solver_mva_get_prob_aggr (const qn::NetworkStruct< T > &L, const AvgResult< T > &avg, std::size_t ist, const std::string &method="default")
template<class T>
AggrResult< T > solver_mva_get_prob_sys_aggr (const qn::NetworkStruct< T > &L, const AvgResult< T > &avg, const std::string &method="default")
 Port of @@SolverMVA/getProbSysAggr.m: the joint probability of the model's whole state across all stations, a scalar in [0,1] with its log.
template<class T>
MvaSolution< T > solver_mva_retrieval_analyzer (const qn::NetworkStruct< T > &L, const MvaOptions &opt, MvaRetrievalCacheOutputs< T > *cache_out=nullptr)
template<class T>
std::vector< std::string > list_valid_methods (const qn::NetworkStruct< T > &L)
 Port of SolverMVA.listValidMethods.
template<class T>
void check_method (const qn::NetworkStruct< T > &L, const std::string &method)
 Port of runAnalyzerChecks' method gate: a method the solver does not list is refused before any analyzer sees it.
template<class T>
std::string resolve_method (const qn::NetworkStruct< T > &L, const std::string &method)
 Port of SolverMVA.resolveMethod: the feature-driven default -> rqna upgrade for a bursty single-class open network.
template<class T>
Matrix< T > sn_get_residt_from_respt (const qn::NetworkStruct< T > &L, const Matrix< T > &RN)
 Port of sn_get_residt_from_respt: the per-JOB residence time.
template<class T>
void sn_apply_join_respt (const qn::NetworkStruct< T > &L, const Matrix< T > &QN, const Matrix< T > &AN, Matrix< T > &RN)
 Port of sn_get_arvr_from_tput: the arrival rate each station sees, from the throughputs and the class-expanded routing sn.rt.
template<class T>
Matrix< T > sn_get_arvr_from_tput (const qn::NetworkStruct< T > &L, const Matrix< T > &TN)
template<class T>
Matrix< T > filter_metric (const qn::NetworkStruct< T > &L, const Matrix< T > &metric, MetricKind kind, const std::vector< std::vector< bool > > *zero_mask)
 Port of filterMetric: what @@NetworkSolver/getAvg does between the analyzer and the caller.
template<class T>
void mva_check_finite_capacity (const qn::NetworkStruct< T > &L, const std::string &method)
 Port of SolverMVA.supportsFiniteCapacity (SolverMVA.m:158-186), the structural capacity gate SolverMVA.supportsModelMethod (SolverMVA.m:143-153) lays on top of the universal feature gate.
template<class T>
AvgResult< T > solver_mva_run_analyzer (const qn::NetworkStruct< T > &L, const MvaOptions &opt_in, const Matrix< T > &init_sol)
 Port of @@SolverMVA/runAnalyzer.m for the lang='matlab' path: gate, solve, convert, filter.
template<class T>
bool sn_has_sjn (const qn::NetworkStruct< T > &L)
 True when the layer has an SJF station, the reference's any(sn.sched == SchedStrategy.SJF).
template<class T>
SjnAnalyzerResult< T > solver_mva_sjn_analyzer (const qn::NetworkStruct< T > &L, const MvaOptions &opt)
 Port of solver_mva_sjn_analyzer.m.
template<class T>
MvaSolution< T > solver_mvac_analyzer (const qn::NetworkStruct< T > &L, const MvaOptions &opt)
 Port of solver_mvac.m.
template<class T>
MvaSolution< T > solver_qna (const qn::NetworkStruct< T > &L, const MvaOptions &opt)
 Port of solver_qna.m.
template<class T>
MvaSolution< T > solver_rqna (const qn::NetworkStruct< T > &L, const MvaOptions &opt)
template<class T>
MvaSolution< T > solver_rqt (const qn::NetworkStruct< T > &L, const MvaOptions &opt)

Variables

constexpr double kSjnLatticeMax = 1e5
 Lattice size above which default prefers the fixed point.

Enumeration Type Documentation

◆ JobClassType

enum class line::lang::JobClassType
strong

Job class kinds, with the values of MATLAB JobClassType.

Definition at line 367 of file lang_types.h.

◆ MetricKind

enum class line::mva::MetricKind
strong

Which metric is being filtered.

@@MNetwork/getAvgHandles.m disables a metric handle per KIND, not per station, and filterMetric turns a disabled handle into a zero – so the kind is what decides which rows survive:

Q, R, W disabled at a Source and at a Sink U disabled at a Source, a Sink, a Fork AND A JOIN – a Join is an infinite server whose "utilization" would just restate its queue length, and the reference declines to report it T, A never disabled by station kind, only by an undefined service

Every kind is additionally disabled where the class has no service defined.

Enumerator
QLen 
Util 
RespT 
ResidT 
Tput 
ArvR 

Definition at line 537 of file solver_mva_runner.h.

◆ NodeType

enum class line::lang::NodeType
strong

Node kinds, with the values of MATLAB NodeType.

Definition at line 324 of file lang_types.h.

◆ SchedStrategy [1/2]

enum class line::lang::SchedStrategy
strong

Scheduling disciplines, with the values of MATLAB SchedStrategy.

Definition at line 181 of file lang_types.h.

◆ SchedStrategy [2/2]

enum class line::lang::SchedStrategy
strong

Scheduling disciplines, with the values of MATLAB SchedStrategy.

Definition at line 181 of file lang_types.h.

Function Documentation

◆ amva_method_alias()

std::string line::mva::amva_method_alias ( const std::string & m)
inline

The amva.

  • spellings of solver_amva.m, mapped onto the bare method names.

The reference accepts both, and a model or a test may use either, so the alias table is part of the interface rather than a convenience: an unrecognised name must reach the method switch and be refused there by its own name, not silently resolved to default.

Definition at line 1390 of file solver_mva.h.

References amva_method_alias().

Referenced by amva_method_alias(), mva_dispatch(), solver_amva(), solver_mva_qsys_analyzer(), and solver_mvald_analyzer().

◆ amva_uses_pf_kernels()

template<class T>
bool line::mva::amva_uses_pf_kernels ( const qn::NetworkStruct< T > & L)

Conservative form of the branch test in solver_amva: true when this model may be solved by the product-form AMVA kernels rather than by solver_amvald.

The mixed case is reported true for every resolved method, while the branch itself takes it only for some, so a caller is never told that solver_amvald will run when it might not.

Definition at line 2442 of file solver_mva.h.

References amva_uses_pf_kernels(), line::qn::NetworkStruct< T >::has_open_classes(), line::qn::NetworkStruct< T >::has_product_form(), line::qn::NetworkStruct< T >::has_product_form_not_het_fcfs(), and line::qn::NetworkStruct< T >::stations.

Referenced by amva_uses_pf_kernels(), and mva_carries_interlock().

◆ check_method()

template<class T>
void line::mva::check_method ( const qn::NetworkStruct< T > & L,
const std::string & method )

Port of runAnalyzerChecks' method gate: a method the solver does not list is refused before any analyzer sees it.

Definition at line 321 of file solver_mva_runner.h.

References check_method(), list_valid_methods(), and line::UnsupportedError::UnsupportedError().

Referenced by check_method(), and solver_mva_run_analyzer().

◆ filter_metric()

◆ find_oi_stations()

template<class T>
std::vector< std::size_t > line::mva::find_oi_stations ( const qn::NetworkStruct< T > & L)

The OI stations of a model, 1-based station indices.

Port of find_oi_stations. Empty when the model has none, which is what the dispatch tests before entering this analyzer.

Definition at line 66 of file solver_mva_oi.h.

References find_oi_stations(), line::qn::NetworkStruct< T >::nstations, line::qn::Station< T >::sched, line::qn::station_swap_graph_is_zero(), line::qn::NetworkStruct< T >::stations, and line::qn::Station< T >::svc_rate_fun.

Referenced by find_oi_stations(), mva_dispatch(), and solver_mva_oi_analyzer().

◆ fj_converged()

template<class T>
bool line::mva::fj_converged ( const Matrix< T > & A,
const Matrix< T > & B,
double iter_tol )

The mixed absolute/relative stopping test of the fork-join loop.

Definition at line 173 of file fj_driver.h.

References line::Matrix< T >::cols(), fj_converged(), line::Matrix< T >::rows(), and line::mva::GlobalConstants::Zero.

Referenced by fj_converged(), and fj_fixed_point().

◆ fj_exp_fit_mean()

template<class T>
Distrib< T > line::mva::fj_exp_fit_mean ( const T & mean)

Exp.fitMean(m), including its clamp.

The reference builds every synchronisation delay through this factory, and the clamp is load-bearing at both ends: a zero delay would otherwise be an exponential of infinite rate, and it comes out as GlobalConstants.Immediate instead, which is exactly the rate the join carried before the fork loop touched it.

Definition at line 252 of file fj_mmt.h.

References line::mva::Distrib< T >::exp_rate(), fj_exp_fit_mean(), line::mva::GlobalConstants::Immediate, and line::mva::GlobalConstants::Zero.

Referenced by fj_exp_fit_mean(), fj_find_paths(), fj_fixed_point(), and fj_ht_sync_delays().

◆ fj_expected_max()

template<class T>
T line::mva::fj_expected_max ( const std::vector< T > & means)

The AND-join case, i.e.

E[max].

Definition at line 210 of file fj_mmt.h.

References fj_expected_max(), and fj_expected_ordstat().

Referenced by fj_expected_max().

◆ fj_expected_ordstat()

template<class T>
T line::mva::fj_expected_ordstat ( const std::vector< T > & means,
std::size_t k )

The instant the join fires: E[X_(k)] of independent exponentials with the given means, by inclusion-exclusion.

This is the d0 of the reference, generalised from its maximum to the k-th order statistic so that a quorum join is charged the completion it actually waits for. k = means.size() is the ordinary AND-join and reproduces the reference term for term.

A zero-length branch no longer degenerates the whole expression to zero, as this port used to have it: it completes instantly, so it neither delays the join nor suppresses the others, which is what the reference computes through its 1/Inf terms.

Definition at line 204 of file fj_mmt.h.

References fj_expected_ordstat(), and line::fj::fj_ordstat_exp().

Referenced by fj_expected_max(), fj_expected_ordstat(), fj_find_paths(), fj_fixed_point(), and fj_ht_sync_delays().

◆ fj_find_paths()

template<class T>
void line::mva::fj_find_paths ( FjMmt< T > & tr,
std::size_t curNode,
std::size_t endNode,
std::size_t curClass,
const std::vector< std::size_t > & merge,
const Matrix< T > & QN,
const Matrix< T > & TN,
const T & t0,
std::vector< T > & out,
std::vector< std::pair< std::size_t, std::size_t > > visited )

Port of ModelAdapter.findPathsCS: the response time along every path from a fork to ITS join, in the given class.

merge's first entry is the class being traversed and its remaining entries the auxiliary classes of the forks whose branches are being walked; the end node's own time is subtracted back off, since the synchronisation delay is what is being computed and must not be counted into the branch it delays.

NESTED FORKS ARE COLLAPSED IN PLACE. Meeting a fork part-way along a branch, the walk recurses to THAT fork's join, forms its E[max] there and then continues from its join with t0 + E[max] – so an inner fork contributes the time its own branches take in parallel, not the time they would take in series. It also WRITES the inner join's synchronisation delay for the merge set as a side effect, which is why V is taken by non-const reference here: the reference does the same, and it is the only place an inner join's delay is set (the driver's own loop sets it only for outer forks).

The visited set of (node, class) pairs is the reference's own cycle guard: a path returning to a pair it already holds is a routing loop, such as the .Aux self-loop of a call whose mean exceeds one, not a new branch. It replaces the depth cap this port used while it handled a single fork, which could not tell a legitimate deep nest from a cycle.

Definition at line 95 of file fj_driver.h.

References line::qn::NetworkStruct< T >::classes, fj_exp_fit_mean(), fj_expected_ordstat(), fj_find_paths(), fj_join_quorum(), fj_node_time(), line::qn::NetworkStruct< T >::nodes, and line::qn::NetworkStruct< T >::set_service().

Referenced by fj_find_paths(), and fj_fixed_point().

◆ fj_finite_or_zero()

template<class T>
T line::mva::fj_finite_or_zero ( const T & x)

A metric read out of a solve, with a non-finite entry read as zero.

Definition at line 235 of file fj_driver.h.

References fj_finite_or_zero().

Referenced by fj_finite_or_zero(), and fj_ht_sync_delays().

◆ fj_fixed_point()

template<class T, class InnerSolve>
MvaSolution< T > line::mva::fj_fixed_point ( const qn::NetworkStruct< T > & L,
FjMmt< T > & tr,
std::vector< T > & lam,
const MvaOptions & opt,
InnerSolve inner )

Drive the fork-join fixed point of a transformed model to convergence.

Parameters
Lthe base model, whose services are copied back into the transform at the start of every solve (ModelAdapter.refreshServicesFromBase)
trthe transform, mutated in place: its join and Source services carry the current pass's synchronisation delays and auxiliary arrivals
lamthe auxiliary arrival rates, self.fjForkLambda; warm-started by the caller across outer iterations and updated here in place
optMVA options (iter_max, iter_tol)
innerthe inner solve over the auxiliary-expanded model
Returns
the merged MvaSolution over the base class set (auxiliary columns dropped, join and Source throughputs kept at their original-class value)

Definition at line 401 of file fj_driver.h.

References line::qn::NetworkStruct< T >::classes, line::Matrix< T >::cols(), line::mva::Distrib< T >::disabled_dist(), line::mva::Distrib< T >::exp_rate(), line::mva::GlobalConstants::FineTol, fj_converged(), fj_exp_fit_mean(), fj_expected_ordstat(), fj_find_paths(), fj_fixed_point(), fj_fork_tput(), fj_ht_merge(), fj_ht_sync_delays(), fj_join_quorum(), fj_leading_cols(), line::mva::GlobalConstants::Immediate, line::mva::Distrib< T >::immediate(), line::qn::NetworkStruct< T >::name, line::qn::NetworkStruct< T >::nclasses, line::NumericError::NumericError(), line::util::LineConsole::owns_log(), line::mva::MvaSolution< T >::Q, line::mva::MvaSolution< T >::R, line::qn::NetworkStruct< T >::refresh_chains(), line::Matrix< T >::rows(), line::qn::NetworkStruct< T >::service, line::qn::NetworkStruct< T >::set_service(), line::qn::NetworkStruct< T >::stations, line::util::LineConsole::step(), line::mva::MvaSolution< T >::Tp, and line::mva::MvaSolution< T >::U.

Referenced by fj_fixed_point(), solver_mva_run_analyzer(), and line::nc::solver_nc_solve().

◆ fj_fork_join_transform()

template<class T>
FjMmt< T > line::mva::fj_fork_join_transform ( const qn::NetworkStruct< T > & L,
const std::string & method )

options.config.fork_join -> the transform it names.

The reference spells the same switch twice (fjFixedPoint.m:47 and :130); this port resolves it once, at the point the transform is built. An unknown name is refused rather than silently taking the default, since answering with the MMT transform under another method's name is the one failure mode a method switch must not have.

Definition at line 380 of file fj_ht.h.

References fj_fork_join_transform(), fj_ht(), fj_mmt(), and line::InputError::InputError().

Referenced by fj_fork_join_transform(), solver_mva_run_analyzer(), and line::nc::solver_nc_solve().

◆ fj_fork_tput()

template<class T>
std::vector< T > line::mva::fj_fork_tput ( const qn::NetworkStruct< T > & L,
const FjMmt< T > & tr,
const Matrix< T > & TN,
std::size_t fa )

Port of fjFixedPoint.m:130-136: the firing throughput of fork fa, per class of the BASE model.

A fork is not a station and has no throughput of its own, so the reference derives one from the visit ratios: the fork's node visits, divided by the class's total visits to its reference station, times the throughput observed there. The divisor is the CHAIN's visit total at the reference station and the multiplier the CHAIN's throughput there, because visits are normalised per chain and a class-only ratio would not be scale-free under class switching.

TWO INDEX SPACES MEET HERE, exactly as in the reference. visits is indexed by STATEFUL node and refstat is a STATION, so the reference station must be mapped through stateful_of_station before it indexes visits; nodevisits is indexed by NODE, which is what parent names. The throughput TN comes from the solve of the TRANSFORMED model and is indexed by its station rows, which the transform leaves aligned with the base model's – the same assumption fjFixedPoint.m makes when it writes TN(nodeToStation(joinIdx)).

parent is this fork's own index when it is not nested: an inner fork fires as often as the outer one it sits behind, so the visits that measure it are the OUTER fork's, which is what sortForks returns in parent_forks.

Definition at line 211 of file fj_driver.h.

References line::qn::NetworkStruct< T >::classes, fj_fork_tput(), line::qn::NetworkStruct< T >::inchain, line::qn::NetworkStruct< T >::nchains, line::qn::NetworkStruct< T >::nclasses, line::qn::NetworkStruct< T >::nodevisits, line::qn::NetworkStruct< T >::stateful_of_station(), and line::qn::NetworkStruct< T >::visits.

Referenced by fj_fixed_point(), and fj_fork_tput().

◆ fj_ht()

template<class T>
FjMmt< T > line::mva::fj_ht ( const qn::NetworkStruct< T > & L)

Build the H-T transform of L.

Returns an inactive record when the layer holds no fork, in which case the caller solves the layer directly.

Definition at line 116 of file fj_ht.h.

References line::qn::NetworkStruct< T >::add_class(), line::qn::NetworkStruct< T >::add_station(), line::qn::JobClass::attr_idx, line::qn::JobClass::attr_kind, line::qn::NetworkStruct< T >::classes, line::qn::JobClass::completes, line::mva::FjMmt< T >::ForkRec::fanOut, line::qn::NetworkStruct< T >::fj, fj_ht(), fj_sort_forks(), fj_widen_csmatrix(), line::qn::NetworkStruct< T >::get_route(), line::mva::Distrib< T >::immediate(), line::qn::NetworkStruct< T >::inchain, line::InputError::InputError(), line::qn::JobClass::is_ref_class, line::mva::FjMmt< T >::ForkRec::joinNode, line::qn::JobClass::name, line::qn::NetworkStruct< T >::name, line::qn::Station< T >::name, line::qn::NetworkStruct< T >::nchains, line::qn::NetworkStruct< T >::nclasses, line::mva::FjMmt< T >::ForkRec::node, line::qn::NetworkStruct< T >::nodes, line::qn::Station< T >::nodetype, line::qn::NetworkStruct< T >::nodevisits, line::qn::Station< T >::nservers, line::mva::FjMmt< T >::ForkRec::origfanout, line::qn::JobClass::population, line::qn::JobClass::prio, line::qn::NetworkStruct< T >::refresh_capacity(), line::qn::NetworkStruct< T >::refresh_chains(), line::qn::NetworkStruct< T >::refresh_routing(), line::qn::JobClass::refstat, line::qn::Station< T >::sched, line::qn::NetworkStruct< T >::service, line::qn::NetworkStruct< T >::set_route(), line::qn::NetworkStruct< T >::set_service(), line::qn::NetworkStruct< T >::station_to_node, line::qn::NetworkStruct< T >::stations, line::qn::JobClass::type, and line::UnsupportedError::UnsupportedError().

Referenced by fj_fork_join_transform(), and fj_ht().

◆ fj_ht_merge()

template<class T>
void line::mva::fj_ht_merge ( const qn::NetworkStruct< T > & L,
const FjMmt< T > & tr,
MvaSolution< T > & out )

Port of the heidelberger-trivedi arm of fjFixedPoint.m:263-291: fold the auxiliary columns back into the classes they stand for.

EVERY JOIN LOSES ITS ORIGINAL-CLASS METRICS FIRST. The original class was routed straight past the branches and charged the whole span at the join, so what the solve reports for it there is the transform's own bookkeeping and not a queue the model has; the branches' figures, which the auxiliary classes carry, are what belongs there. Throughput is the exception: the join's original-class rate is how often the fork-join completes, so it is saved and put back after the merge, where the reference puts it back too.

The auxiliary DELAY rows are left in place rather than deleted. The reference deletes them; they are appended after every base station, so the leading block the caller reads is the same either way, and deleting them would only move the join rows the restore step above indexes by their pre-deletion position.

Definition at line 346 of file fj_driver.h.

References fj_ht_merge(), fj_leading_cols(), line::qn::NetworkStruct< T >::nclasses, line::mva::MvaSolution< T >::Q, line::mva::MvaSolution< T >::R, line::mva::MvaSolution< T >::Tp, and line::mva::MvaSolution< T >::U.

Referenced by fj_fixed_point(), and fj_ht_merge().

◆ fj_ht_sync_delays()

template<class T>
void line::mva::fj_ht_sync_delays ( const qn::NetworkStruct< T > & L,
FjMmt< T > & tr,
const MvaSolution< T > & out )

Port of the heidelberger-trivedi arm of fjFixedPoint.m:212-255: the synchronisation delays of one pass, written onto the transformed model.

The branch response time of an auxiliary class is its TOTAL response time over the model, less what it spends at the join (the residual synchronisation delay this function is about to overwrite) and at the auxiliary delay (the original class's time outside the span). That leaves exactly the time the branch takes. From those,

d0 = E[X_(k)] fires the join. k is the branch count on a standard join and the declared quorum on a PARTIAL one. di = d0 - ri is what branch i still waits at the join once it has finished. r0 is the original class's cycle response time less its own time at the join, i.e. everything outside the span, which is what the auxiliary delay must hold so that the auxiliary token cycles at the original's rate.

The join charges d0 * fanOut to the ORIGINAL class, which is the whole span: fj_ht routed it straight past the branches. fanOut is 1 on every model that reaches here – fj_ht refuses tasksPerLink > 1 by name – and is kept as a named factor because the reference multiplies by it.

UNDER A QUORUM d0 can precede a branch's own completion, and then that branch waits no further; di floors at zero, which is a boundary of the transform and not a choice. The reference raises a line_warning there; this port has no warning channel out of the fixed point (see mva_dispatch.h).

Definition at line 269 of file fj_driver.h.

References fj_exp_fit_mean(), fj_expected_ordstat(), fj_finite_or_zero(), fj_ht_sync_delays(), fj_join_quorum(), line::qn::NetworkStruct< T >::inchain, line::qn::NetworkStruct< T >::nchains, line::qn::NetworkStruct< T >::nodevisits, line::mva::MvaSolution< T >::R, and line::qn::NetworkStruct< T >::set_service().

Referenced by fj_fixed_point(), and fj_ht_sync_delays().

◆ fj_join_quorum()

template<class T>
std::size_t line::mva::fj_join_quorum ( const qn::NetworkStruct< T > & sn,
std::size_t joinNode,
std::size_t nbranches )

The number of siblings the Join node fires on, out of nbranches forked.

Port of matlab/src/api/fj/sn_join_quorum.m; a standard join, an absent declaration, a non-positive quorum and a quorum that is not smaller than the sibling count all return nbranches, the ordinary AND-join.

NOTE the index space: joindecl is keyed by the BASE node index, and this port's JoinDecl carries ONE quorum per join rather than one per class, so a multiclass model with a different quorum per class cannot be expressed here (the JSON interchange has the same limitation, see network_writer.h).

Definition at line 227 of file fj_mmt.h.

References fj_join_quorum(), and line::lang::STD.

Referenced by fj_find_paths(), fj_fixed_point(), fj_ht_sync_delays(), and fj_join_quorum().

◆ fj_leading_cols()

template<class T>
Matrix< T > line::mva::fj_leading_cols ( const Matrix< T > & A,
std::size_t n )

The leading n columns of a class-indexed metric.

Definition at line 164 of file fj_driver.h.

References line::Matrix< T >::cols(), fj_leading_cols(), and line::Matrix< T >::rows().

Referenced by fj_fixed_point(), fj_ht_merge(), and fj_leading_cols().

◆ fj_mmt()

template<class T>
FjMmt< T > line::mva::fj_mmt ( const qn::NetworkStruct< T > & L)

Build the transformed layer.

Returns an inactive FjMmt when the layer has no fork, in which case the caller solves the layer directly.

The auxiliary arrivals are left at GlobalConstants.FineTol, which is what a cold ModelAdapter.mmt call sets and what refreshServicesFromBase restores at the start of every outer iteration; the fixed point overwrites them with (fanout - 1) * forkLambda from its second pass onwards.

Definition at line 444 of file fj_mmt.h.

References line::qn::NetworkStruct< T >::add_class(), line::qn::NetworkStruct< T >::add_node(), line::qn::NetworkStruct< T >::add_station(), line::qn::JobClass::attr_idx, line::qn::JobClass::attr_kind, line::qn::NetworkStruct< T >::classes, line::qn::JobClass::completes, line::mva::Distrib< T >::disabled_dist(), line::mva::Distrib< T >::exp_rate(), line::mva::FjMmt< T >::ForkRec::fanOut, line::mva::GlobalConstants::FineTol, line::qn::NetworkStruct< T >::fj, fj_mmt(), fj_sort_forks(), fj_widen_csmatrix(), line::qn::NetworkStruct< T >::get_route(), line::mva::Distrib< T >::immediate(), line::qn::NetworkStruct< T >::inchain, line::InputError::InputError(), line::qn::JobClass::is_ref_class, line::mva::FjMmt< T >::ForkRec::joinNode, line::mva::FjMmt< T >::ForkRec::joinStation, line::qn::JobClass::name, line::qn::NetworkStruct< T >::name, line::qn::Station< T >::name, line::qn::NetworkStruct< T >::nchains, line::qn::NetworkStruct< T >::nclasses, line::mva::FjMmt< T >::ForkRec::node, line::qn::NetworkStruct< T >::nodes, line::qn::Station< T >::nodetype, line::qn::NetworkStruct< T >::nodevisits, line::qn::Station< T >::nservers, line::mva::FjMmt< T >::ForkRec::origfanout, line::qn::JobClass::population, line::qn::JobClass::prio, line::qn::NetworkStruct< T >::refresh_capacity(), line::qn::NetworkStruct< T >::refresh_chains(), line::qn::NetworkStruct< T >::refresh_routing(), line::qn::NetworkStruct< T >::refresh_rt(), line::qn::JobClass::refstat, line::qn::Station< T >::sched, line::qn::NetworkStruct< T >::service, line::qn::NetworkStruct< T >::set_route(), line::qn::NetworkStruct< T >::set_service(), line::qn::NetworkStruct< T >::sinkNode, line::qn::NetworkStruct< T >::sourceIdx, line::qn::NetworkStruct< T >::station_to_node, line::qn::NetworkStruct< T >::stations, line::qn::JobClass::type, and line::UnsupportedError::UnsupportedError().

Referenced by fj_fork_join_transform(), fj_mmt(), and line::api::sn_fj_nodevisits_mmt().

◆ fj_node_time()

template<class T>
T line::mva::fj_node_time ( const qn::NetworkStruct< T > & V,
std::size_t nd,
const std::vector< std::size_t > & merge,
const Matrix< T > & QN,
const Matrix< T > & TN )

Port of ModelAdapter.findPathsCS' per-node charge: the queue length of the merge set at this station divided by its throughput, which is the time a job of that set spends at the node.

See the reference comment carried in solver_ln.h: a non-station node, and a station the merge set never completes at, contribute nothing.

Definition at line 56 of file fj_driver.h.

References fj_node_time(), and line::qn::NetworkStruct< T >::nodes.

Referenced by fj_find_paths(), and fj_node_time().

◆ fj_sort_forks()

template<class T>
void line::mva::fj_sort_forks ( FjMmt< T > & tr)

Port of ModelAdapter.sortForks: fill in outer and parent on every fork record.

Runs on the TRANSFORMED layer, as the reference does (nonfjmodel.getLinkedRoutingMatrix{r,r}), and on the ORIGINAL class r, whose routing support the transform leaves alone – the fork is a Router by now, but with the same out-edges.

A fork is outer on class r until some other fork's span is found to pass through it. The parent of every fork found inside f's span becomes f's OWN parent, not f, so a three-deep nest collapses onto the outermost fork exactly as the reference's single assignment does. The reference also writes parents at non-fork nodes, where it is never read; this port keeps it per fork record.

Definition at line 357 of file fj_mmt.h.

References fj_sort_forks(), line::mva::FjMmt< T >::ForkRec::joinNode, line::mva::FjMmt< T >::ForkRec::node, line::qn::NetworkStruct< T >::nodes, and line::mva::FjMmt< T >::ForkRec::parent.

Referenced by fj_ht(), fj_mmt(), and fj_sort_forks().

◆ fj_widen_csmatrix()

template<class T>
void line::mva::fj_widen_csmatrix ( FjMmt< T > & tr)

Widen every explicit ClassSwitch matrix to the auxiliary-expanded class set.

AN EXPLICIT ClassSwitch MATRIX IS (nclasses x nclasses), and a fork-join transform has just widened nclasses. refresh_routing checks that width and refuses the model outright when it no longer holds, which is what killed SolverMVA on every fork-join model carrying a switch – and since link() now SYNTHESIZES a ClassSwitch node for any class-switching arc, that is every fj_cs_* example ("the class-switch matrix of node 'CS_Fork1_to_Queue1' is not (nclasses x nclasses)"). fj_tag and tag_chain already widen it at their own augmentation points.

An auxiliary class stands for the original it was split from, so it must switch the way that original does, among auxiliaries: C(a,b) = old(x,y) where a,b are the auxiliaries of x,y. Any auxiliary block the map does not pair keeps the identity, which is the only admissible row for a class that never switches.

Definition at line 407 of file fj_mmt.h.

References line::qn::NetworkStruct< T >::classes, line::Matrix< T >::cols(), line::qn::NetworkStruct< T >::csmatrix, fj_widen_csmatrix(), and line::Matrix< T >::rows().

Referenced by fj_ht(), fj_mmt(), and fj_widen_csmatrix().

◆ list_valid_methods()

◆ mva_carries_interlock()

template<class T>
bool line::mva::mva_carries_interlock ( const qn::NetworkStruct< T > & L,
const MvaOptions & opt )

True when the MVA path this model already dispatches to carries a class-level interlock matrix (Franks 1999, Eq.

4.7) itself, so that supplying one does not silently move the model to a DIFFERENT algorithm.

Only two kernels implement the correction: pfqn_mva (exact, closed single-server) and the AMVA forward step of solver_amvald. A model that would otherwise be solved by exact multiserver or mixed MVA, or by the product-form AMVA kernels, cannot take the matrix without swapping its algorithm, and the swap is worth far more than the correction it carries: inside SolverLN it can turn a converging Picard iteration into a limit cycle. A caller holding a matrix such a model cannot carry must apply its own correction instead.

Definition at line 2463 of file solver_mva.h.

References amva_uses_pf_kernels(), line::qn::NetworkStruct< T >::classes, line::qn::NetworkStruct< T >::has_fractional_populations(), line::qn::NetworkStruct< T >::has_product_form(), mva_carries_interlock(), mva_is_bas_model(), line::qn::NetworkStruct< T >::nchains, and line::qn::NetworkStruct< T >::stations.

Referenced by mva_carries_interlock().

◆ mva_check_finite_capacity()

template<class T>
void line::mva::mva_check_finite_capacity ( const qn::NetworkStruct< T > & L,
const std::string & method )

Port of SolverMVA.supportsFiniteCapacity (SolverMVA.m:158-186), the structural capacity gate SolverMVA.supportsModelMethod (SolverMVA.m:143-153) lays on top of the universal feature gate.

WHY IT IS SEPARATE FROM feature_gate. Finite capacity has no LINE_QN_FEATURE_LIST enumerator: it is a NUMBER on a station, not a construct, so no declared feature set can express it. Without this check a model built with setCapacity is solved as if uncapacitated and returns a WRONG NUMBER instead of a refusal (BUG-39).

WHY IT RUNS AFTER THE FEATURE GATE. The reference calls supportsModelMethod@NetworkSolver first and only tests capacity if bool, so a model that fails both is refused by the FEATURE, whose message names the construct to remove. The order is therefore load-bearing, not incidental.

THE TWO EXEMPTIONS.

  • A BAS model, because solver_mva_analyzer routes it to solver_sqd under default too, so the finite buffers ARE honoured on every MVA path. The predicate is the api/sn one (single CLASS), not the analyzer's dispatch test mva_is_bas_model (single CHAIN); see solver_mva.h.
  • A single-station M/M/1/K with tail drop under any method but exact, which the mg1k.mgs branch of solver_mva_qsys_analyzer solves. That branch is an approximation away from scv=1, so exact is NOT exempted and must refuse here. method is the RESOLVED method, which is what runAnalyzerChecks (NetworkSolver.m:184) passes on.

Definition at line 696 of file solver_mva_runner.h.

References line::qn::check_binding_capacity(), mva_check_finite_capacity(), sn_is_bas_model(), and sn_is_mm1k_loss().

Referenced by mva_check_finite_capacity(), and solver_mva_run_analyzer().

◆ mva_closed_population_reason()

template<class T>
std::string line::mva::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.

ONE predicate with TWO callers. A rule kept in two places is how the report comes to offer a (solver, method) pair that the analyzer then refuses – or, worse, answers with a table of zeros. What the feature registry CAN name lives in qn::mva_feature_set instead; these are the rules it cannot: a product form, a class count and a server count have no registry name.

Each returns the refusal sentence, or an empty string when the method may run. The closed-population AMVA family: an open chain, or a network outside strict product form, has nothing for the recursion to work on.

Open chains are also expressed in the registry (mva_feature_set drops OpenClass for these), which is what keeps them off the report; they are repeated here because the analyzer must refuse by name with a sentence rather than fall through to solver_amvald and answer under a method nobody asked for. Strict product form has no registry name at all, so this is its only home.

Definition at line 145 of file mva_types.h.

References line::qn::NetworkStruct< T >::has_open_classes(), line::qn::NetworkStruct< T >::has_product_form_not_het_fcfs(), line::qn::mva_base_method(), mva_closed_population_reason(), and line::qn::mva_is_closed_population_method().

Referenced by list_valid_methods(), mva_closed_population_reason(), and solver_amva().

◆ mva_dispatch()

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.

init_sol is the warm start the outer solver carries across iterations; it reaches the AMVA paths only, as it does in the reference.

Definition at line 940 of file mva_dispatch.h.

References line::mva::CacheResult< T >::actualmethod, line::mva::DispatchResult< T >::actualmethod, line::mva::SjnAnalyzerResult< T >::actualmethod, amva_method_alias(), line::mva::DispatchResult< T >::cache, line::solvers::cache_metrics_of(), line::solvers::cache_metrics_of_matrix(), line::qn::NetworkStruct< T >::classes, line::mva::MvaCacheqnRetrievalSolution< T >::delayedprob, line::mva::MvaRetrievalCacheOutputs< T >::delayedprob, find_oi_stations(), line::qn::NetworkStruct< T >::has_fork(), line::mva::CacheResult< T >::hitprob, line::mva::MvaCacheqnCacheOutputs< T >::hitprob, line::mva::MvaCacheqnRetrievalSolution< T >::hitprob, line::mva::MvaRetrievalCacheOutputs< T >::hitprob, line::mva::CacheResult< T >::hitproblist, line::mva::MvaCacheqnRetrievalSolution< T >::hitproblist, line::mva::MvaRetrievalCacheOutputs< T >::hitproblist, line::mva::CacheResult< T >::itemprob, line::mva::MvaCacheqnCacheOutputs< T >::itemprob, line::mva::MvaRetrievalCacheOutputs< T >::itemprob, line::mva::MvaCacheqnRetrievalSolution< T >::latency, line::mva::MvaRetrievalCacheOutputs< T >::latency, line::mva::MvaOptions::method, line::mva::CacheResult< T >::missprob, line::mva::MvaCacheqnCacheOutputs< T >::missprob, line::mva::MvaCacheqnRetrievalSolution< T >::missprob, line::mva::MvaRetrievalCacheOutputs< T >::missprob, mva_dispatch(), nc_is_oi_model(), line::qn::NetworkStruct< T >::nclasses, line::qn::NetworkStruct< T >::nodeparam, line::mva::DispatchResult< T >::refreshed_struct, line::api::sn_has_bursty_arrival(), sn_has_sjn(), sn_is_mm1k_loss(), line::mva::CacheResult< T >::sol, line::mva::DispatchResult< T >::sol, line::mva::MvaCacheqnRetrievalSolution< T >::sol, line::mva::SjnAnalyzerResult< T >::sol, solver_mapqn(), solver_mva_analyzer(), solver_mva_cache_analyzer(), solver_mva_cacheqn_analyzer(), solver_mva_cacheqn_retrieval_analyzer(), solver_mva_dps_exact(), solver_mva_marie_analyzer(), solver_mva_oi_analyzer(), solver_mva_polling_analyzer(), solver_mva_qsys_analyzer(), solver_mva_qsys_prio_analyzer(), solver_mva_qsys_sizebased_analyzer(), solver_mva_retrieval_analyzer(), solver_mva_sjn_analyzer(), solver_mvac_analyzer(), solver_mvald_analyzer(), solver_qna(), solver_rqna(), solver_rqt(), line::qn::NetworkStruct< T >::stations, line::UnsupportedError::UnsupportedError(), line::mva::DispatchResult< T >::warning, and line::mva::SjnAnalyzerResult< T >::warning.

Referenced by mva_dispatch(), solver_mva_get_prob_norm_const_aggr(), and solver_mva_run_analyzer().

◆ mva_is_bas_model()

template<class T>
bool line::mva::mva_is_bas_model ( const qn::NetworkStruct< T > & L)

Port of isBasModel in solver_mva_analyzer.m: a closed single-CHAIN model with at least one blocking-after-service drop rule, which SQD handles and neither exact MVA nor AMVA does.

This is the DISPATCH test.

Definition at line 2372 of file solver_mva.h.

References line::lang::BAS, line::qn::NetworkStruct< T >::classes, line::qn::NetworkStruct< T >::droprule, mva_is_bas_model(), line::qn::NetworkStruct< T >::nchains, and line::qn::NetworkStruct< T >::nclosedjobs().

Referenced by mva_carries_interlock(), mva_is_bas_model(), and solver_mva_analyzer().

◆ mva_mapqn_reason()

◆ mva_mvac_reason()

template<class T>
std::string line::mva::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 centres of a product-form network, and it recurs on the queueing centres, so it needs at least one.

Neither the server count nor product form has a registry feature name; the scheduling restriction IS nameable and lives in qn::mva_feature_set.

Definition at line 245 of file mva_types.h.

References line::qn::NetworkStruct< T >::has_product_form(), line::qn::mva_base_method(), mva_mvac_reason(), line::qn::Station< T >::nservers, line::qn::Station< T >::sched, and line::qn::NetworkStruct< T >::stations.

Referenced by list_valid_methods(), mva_mvac_reason(), and solver_mvac_analyzer().

◆ mva_qna_scheduling_reason()

template<class T>
std::string line::mva::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, so a SIRO, LCFS, LCFS-PR, HOL or priority station used to leave its whole row of Q, U, R and T at zero and the table was returned as a solution.

The registry expresses this too (mva_feature_set drops the disciplines from QNA's envelope); this is the analyzer's half of it.

Definition at line 273 of file mva_types.h.

References mva_qna_scheduling_reason(), line::lang::sched_to_text(), and line::qn::NetworkStruct< T >::stations.

Referenced by mva_qna_scheduling_reason(), and solver_qna().

◆ mva_schmidt_ext_reason()

std::string line::mva::mva_schmidt_ext_reason ( const std::vector< double > & njobs,
const std::vector< bool > & fcfs,
const std::string & method )
inline

The extended Schmidt method needs a customer of every class to tag.

Schmidt's EXTENSION over plain Schmidt is an alpha correction applied at an FCFS station, computed from the network with ONE class-r customer TAGGED, that is at population N - 1_r. A class holding no customer has none to tag: the sub-problem is formed at a negative population, whose state lattice prod(N+1) collapses to zero and the recursion indexes an empty array. Plain schmidt forms no such sub-problem, which is why the requirement is the -ext arm's alone.

THE TEST IS STATED AT THE FCFS STATION AND NOT AT A CLASS-DEPENDENT ONE, because the four kernels differ on when they form the correction: MATLAB, this port and native python form it only where the station's demands differ by class, the JAR forms it at every FCFS station. Stating the union is what keeps one rule safe for all four; the case it costs – an FCFS station whose demands are identical across classes, one of them empty – is one where the extension reduces to plain schmidt, which stays offered.

njobs and fcfs are the numbers the CALLER'S OWN arm passes: CHAIN-indexed here as in MATLAB, CLASS-indexed in the JAR and native python, whose arms aggregate no chains. That difference belongs to those arms, not to this rule.

Definition at line 219 of file mva_types.h.

References line::qn::mva_base_method(), and mva_schmidt_ext_reason().

Referenced by list_valid_methods(), mva_schmidt_ext_reason(), and solver_amva().

◆ mva_single_class_open_reason()

template<class T>
std::string line::mva::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 of the first two moments of a SINGLE stream, so a multiclass model has no counterpart in their equations.

No registry feature names a class count, so that half of the rule is structural.

A FORK-JOIN model is refused too. A Join is a synchronisation node, not a queue: it carries no service process, so the index-of-dispersion curve these analyzers read off every station does not exist for it, and neither has a synchronisation term to put in its place. That half IS nameable, so qn::mva_feature_set drops Fork/Join for these two as well and this is the analyzer's half of it.

Definition at line 178 of file mva_types.h.

References line::qn::mva_base_method(), mva_single_class_open_reason(), line::qn::NetworkStruct< T >::nclasses, line::qn::NetworkStruct< T >::nodes, and line::qn::NodeDef::nodetype.

Referenced by list_valid_methods(), mva_single_class_open_reason(), solver_rqna(), and solver_rqt().

◆ nc_is_oi_model()

template<class T>
bool line::mva::nc_is_oi_model ( const qn::NetworkStruct< T > & L)

Port of nc_is_oi_model: whether the model as a WHOLE is order-independent, which is a strictly stronger condition than having an OI station.

The whole network must be product-form for the CMVA to be exact, so every station has to be a delay, an OI station with an all-zero swap graph, a PS or LCFS-PR queue, or an FCFS / SIRO queue whose service rate does NOT depend on the class. A closed population is required as well: the recursion is over a finite lattice.

Definition at line 95 of file solver_mva_oi.h.

References line::qn::NetworkStruct< T >::classes, nc_is_oi_model(), line::qn::NetworkStruct< T >::nclasses, line::qn::NetworkStruct< T >::nstations, line::qn::NetworkStruct< T >::rates, line::qn::Station< T >::sched, line::qn::station_swap_graph_is_zero(), line::qn::NetworkStruct< T >::stations, and line::qn::Station< T >::svc_rate_fun.

Referenced by mva_dispatch(), and nc_is_oi_model().

◆ resolve_method()

template<class T>
std::string line::mva::resolve_method ( const qn::NetworkStruct< T > & L,
const std::string & method )

Port of SolverMVA.resolveMethod: the feature-driven default -> rqna upgrade for a bursty single-class open network.

The reference computes this ONLY to pick the method feature set (getMethodFeatureSet), never writing it back to options; mva_dispatch makes the same decision again on its own terminal branch. Without it the gate would read the base envelope, which declares neither MAP nor MMPP2, and would refuse the very models solver_rqna exists to solve.

Definition at line 338 of file solver_mva_runner.h.

References line::qn::NetworkStruct< T >::classes, line::api::PatienceHandles< T >::isExponential, line::qn::NetworkStruct< T >::nclasses, line::qn::NetworkStruct< T >::nstations, line::api::PatienceHandles< T >::present, resolve_method(), line::api::sn_has_bursty_arrival(), and line::api::sn_patience_handles().

Referenced by resolve_method(), and solver_mva_run_analyzer().

◆ sn_apply_join_respt()

template<class T>
void line::mva::sn_apply_join_respt ( const qn::NetworkStruct< T > & L,
const Matrix< T > & QN,
const Matrix< T > & AN,
Matrix< T > & RN )

Port of sn_get_arvr_from_tput: the arrival rate each station sees, from the throughputs and the class-expanded routing sn.rt.

A Source's row is left as the routing computes it and zeroed by the caller's mask, which is where getAvg does it.

A CACHE IS PROPAGATED FIRST, exactly as the reference propagates it in a loop of its own before the generic one. The hit/miss split rides in the effective routing as a SELF-LOOP at the cache node (set_route_effective(r, hitclass[r], ci, ci, hitprob)), so the accumulation below fills the cache's hit and miss rows from its own arrival row – but only if the cache is reached before whatever it feeds. In node order a Router usually precedes the Cache, and taking the nodes in that order left the Router at zero and, through it, every station downstream: on cache_replc_routing the two Delay stations reported ArvR 0 against the reference's 0.4 and 0.6, which then dropped both rows from the table as all-zero. A Join reports the PER-SIBLING waiting time, QLen over the SIBLING ARRIVAL RATE, and not QLen over its own firing rate.

The two differ by exactly the fork degree: a Join fires once per parent job while it takes in one sibling per branch, so Little's law applied with the firing rate answers a question about parents with a queue length measured in siblings. On the closed two-branch fork-join with N=2 that is 1.44444 where the settled JMT convention is 0.72222.

Called by every engine that folds sibling classes back (CTMC and SSA), after their own Q/T pass, so the override lands on the same table the caller reads. A model with no Join leaves the matrix untouched.

Definition at line 467 of file solver_mva_runner.h.

References line::Matrix< T >::cols(), line::qn::NetworkStruct< T >::nodes, line::Matrix< T >::rows(), and sn_apply_join_respt().

Referenced by line::tr::fj_foldback(), and sn_apply_join_respt().

◆ sn_deaggregate_chain_results()

template<class T>
ClassResults< T > line::mva::sn_deaggregate_chain_results ( const qn::NetworkStruct< T > & L,
const ChainDemands< T > & d,
const Matrix< T > & Qchain,
const Matrix< T > & Uchain,
const Matrix< T > & Rchain,
const Matrix< T > & Tchain,
const std::vector< T > & Xchain )

Port of sn_deaggregate_chain_results.

OPEN CHAINS. A closed class's share of its chain's throughput is its share of the visits at the reference station; an open class's is its share of the DEPARTURES, i.e. the chain's visit count at the Sink, because an open job completes by leaving rather than by returning. Only X and C are computed this way; Q, U, R and T follow the same path for both.

The Sink visits come from this layer's own nodevisits, normalised by the chain's reference NODE. MATLAB normalises the node-level visits by statefulToNode(refstat(...)), which feeds a STATION index to a STATEFUL -> node map and lands on an unrelated node, so its Sink visits carry an arbitrary scale factor (3 rather than 1 on the fork layer of lqn_workflows). The correct normalisation is used here. It reaches X and C only, which SolverLN does not read back, so no layered metric depends on the choice.

Definition at line 214 of file sn_chain.h.

References line::mva::ChainDemands< T >::alpha, line::mva::ClassResults< T >::C, line::qn::NetworkStruct< T >::classes, line::qn::NetworkStruct< T >::inchain, line::mva::ChainDemands< T >::Lchain, line::Matrix< T >::Matrix(), line::mva::ChainDemands< T >::Nchain, line::qn::NetworkStruct< T >::nchains, line::qn::NetworkStruct< T >::nclasses, line::qn::NetworkStruct< T >::nodevisits, line::qn::NetworkStruct< T >::nstations, line::mva::ClassResults< T >::Q, line::mva::ClassResults< T >::R, line::Matrix< T >::rows(), line::qn::NetworkStruct< T >::sinkNode, sn_deaggregate_chain_results(), line::mva::ChainDemands< T >::ST, line::qn::NetworkStruct< T >::stations, line::mva::ChainDemands< T >::STchain, line::mva::ClassResults< T >::Tp, line::mva::ClassResults< T >::U, line::UnsupportedError::UnsupportedError(), line::mva::ChainDemands< T >::Vchain, and line::mva::ClassResults< T >::X.

Referenced by sn_deaggregate_chain_results(), solver_amva(), solver_amvald(), line::ba::solver_ba_analyzer(), solver_mva(), solver_mva_marie_analyzer(), solver_mva_sjn_analyzer(), solver_mva_sum(), solver_mvac_analyzer(), solver_mvald(), line::nc::solver_nc(), line::nc::solver_nc_conv(), line::nc::solver_ncld(), line::qns::solver_qns_run_analyzer(), solver_sqd(), line::tr::transform_solve_chains(), and line::tr::transform_solve_lc().

◆ sn_get_arvr_from_tput()

◆ sn_get_demands_chain()

template<class T>
ChainDemands< T > line::mva::sn_get_demands_chain ( const qn::NetworkStruct< T > & L)

Port of sn_get_demands_chain.

Parameters
Lthe refreshed layer

Definition at line 63 of file sn_chain.h.

References line::mva::ChainDemands< T >::alpha, line::qn::NetworkStruct< T >::classes, line::qn::NetworkStruct< T >::disabled, line::qn::NetworkStruct< T >::inchain, line::mva::ChainDemands< T >::Lchain, line::Matrix< T >::Matrix(), line::mva::ChainDemands< T >::Nchain, line::qn::NetworkStruct< T >::nchains, line::qn::NetworkStruct< T >::nclasses, line::qn::NetworkStruct< T >::nstations, line::qn::NetworkStruct< T >::rates, line::qn::NetworkStruct< T >::refclass, line::mva::ChainDemands< T >::refstatchain, line::qn::NetworkStruct< T >::scv, line::mva::ChainDemands< T >::SCVchain, sn_get_demands_chain(), line::mva::ChainDemands< T >::ST, line::qn::NetworkStruct< T >::stateful_of_station(), line::mva::ChainDemands< T >::STchain, line::mva::ChainDemands< T >::Vchain, line::qn::NetworkStruct< T >::visits, and line::mva::GlobalConstants::Zero.

Referenced by line::mam::bgchain_states(), line::jmt::jmt_parse_jmva(), list_valid_methods(), line::nc::nc_closed_queueing_stations(), line::nc::nc_is_normal_usage(), line::api::sn_aggregate_chains(), sn_get_demands_chain(), line::ctmc::solver_ctmc_cftp(), line::solvers::solver_get_avg_chain(), line::solvers::solver_get_avg_node_chain(), line::mam::solver_mam_basic(), line::mam::solver_mam_bgchain(), solver_mva_analyzer(), solver_mva_marie_analyzer(), solver_mva_sjn_analyzer(), solver_mva_sum(), solver_mvac_analyzer(), solver_mvald(), solver_mvald_analyzer(), line::nc::solver_nc(), line::nc::solver_nc_busyp(), line::nc::solver_nc_conv(), line::nc::solver_nc_getprob_marg(), line::nc::solver_nc_joint(), line::nc::solver_nc_jointaggr(), line::nc::solver_nc_jointmarg(), line::nc::solver_nc_marg(), line::nc::solver_nc_margaggr(), line::nc::solver_ncld(), line::qns::solver_qns_run_analyzer(), line::tr::transform_solve_chains(), line::tr::transform_solve_lc(), and line::io::write_jmva().

◆ sn_get_product_form_chain_params()

template<class T>
PfChainParams< T > line::mva::sn_get_product_form_chain_params ( const qn::NetworkStruct< T > & L,
const ChainDemands< T > & d )

◆ sn_get_residt_from_respt()

◆ sn_has_sjn()

template<class T>
bool line::mva::sn_has_sjn ( const qn::NetworkStruct< T > & L)

True when the layer has an SJF station, the reference's any(sn.sched == SchedStrategy.SJF).

Definition at line 114 of file solver_mva_sjn.h.

References line::lang::SJF, sn_has_sjn(), and line::qn::NetworkStruct< T >::stations.

Referenced by list_valid_methods(), mva_dispatch(), and sn_has_sjn().

◆ sn_interlock_chain()

template<class T>
Matrix< T > line::mva::sn_interlock_chain ( const qn::NetworkStruct< T > & L,
const std::vector< std::vector< double > > & ILclass )

Aggregate a class-indexed interlock matrix to the chain basis the MVA analyzers work in.

IL[r][s] is the share of the class-s queue that a class-r arrival must not see, the interlocked flow of Franks (1999), Eq. (4.7). Two classes of the same chain belong to the same client, so the diagonal blocks carry no information and the chain diagonal stays zero: an arrival always sees its own chain in full. Returns an empty matrix when nothing is interlocked.

Definition at line 358 of file sn_chain.h.

References line::qn::NetworkStruct< T >::chains, line::InputError::InputError(), line::Matrix< T >::Matrix(), line::qn::NetworkStruct< T >::nchains, line::qn::NetworkStruct< T >::nclasses, and sn_interlock_chain().

Referenced by sn_interlock_chain(), solver_amva(), solver_amvald(), and solver_mva().

◆ sn_is_bas_model()

template<class T>
bool line::mva::sn_is_bas_model ( const qn::NetworkStruct< T > & L)

Port of matlab/src/api/sn/sn_is_bas_model.m: a closed single-CLASS model with a BAS drop rule.

This is the GATE test, and it is deliberately NARROWER than mva_is_bas_model above: the reference keeps two predicates because SQD's Smith decomposition models ONE circulating population, so a chain built from several classes is dispatched to SQD but is NOT exempted from the finite-capacity refusal. Collapsing the two would let a multiclass BAS model past the gate on the strength of a decomposition that does not represent it.

Definition at line 2392 of file solver_mva.h.

References line::lang::BAS, line::qn::NetworkStruct< T >::classes, line::qn::NetworkStruct< T >::droprule, line::qn::NetworkStruct< T >::nclasses, line::qn::NetworkStruct< T >::nclosedjobs(), and sn_is_bas_model().

Referenced by mva_check_finite_capacity(), and sn_is_bas_model().

◆ sn_is_mm1k_loss()

template<class T>
bool line::mva::sn_is_mm1k_loss ( const qn::NetworkStruct< T > & L)

Port of matlab/src/api/sn/sn_is_mm1k_loss.m: a single-class open Source-Queue-Sink system whose queue is a single-server exponential M/M/1/K with tail drop.

Both the MVA moment-based branch (qsys_mg1k_loss_mgs) and the NC probability-based one (qsys_mm1k_loss) gate their finite-capacity loss path on it, and it is the one shape whose finite buffer IS honoured here.

Definition at line 2410 of file solver_mva.h.

References line::qn::NetworkStruct< T >::cap, line::lang::DROP, line::qn::NetworkStruct< T >::droprule, line::qn::NetworkStruct< T >::nclasses, line::qn::NetworkStruct< T >::nclosedjobs(), line::qn::NetworkStruct< T >::nodes, line::qn::NodeDef::nodetype, line::qn::NetworkStruct< T >::scv, sn_is_mm1k_loss(), and line::qn::NetworkStruct< T >::stations.

Referenced by mva_check_finite_capacity(), mva_dispatch(), sn_is_mm1k_loss(), and solver_mva_qsys_analyzer().

◆ solver_amva()

template<class T>
MvaSolution< T > line::mva::solver_amva ( const qn::NetworkStruct< T > & L,
const ChainDemands< T > & d,
MvaOptions opt,
const Matrix< T > & init_sol,
bool & converged )

Definition at line 1418 of file solver_mva.h.

References line::pfqn::Ab, amva_method_alias(), line::pfqn::Basic, line::mva::ClassResults< T >::C, line::mva::MvaSolution< T >::C, line::Matrix< T >::cols(), line::mva::PfChainParams< T >::D, line::mva::PfChainParams< T >::delay_stations, line::pfqn::Egflin, line::pfqn::FCFS, line::pfqn::Gflin, line::qn::NetworkStruct< T >::has_class_switching(), line::qn::NetworkStruct< T >::has_homogeneous_scheduling(), line::qn::NetworkStruct< T >::has_multi_server(), line::qn::NetworkStruct< T >::has_open_classes(), line::qn::NetworkStruct< T >::has_product_form(), line::qn::NetworkStruct< T >::has_product_form_not_het_fcfs(), line::pfqn::Improved, line::pfqn::INF, line::mva::MvaSolution< T >::iter, line::pfqn::AmvaResult< T >::iterations, line::pfqn::kOpenClass, line::mva::PfChainParams< T >::lambda, line::pfqn::Lin, line::pfqn::Linearizer, line::Matrix< T >::Matrix(), line::mva::MvaSolution< T >::method, line::mva::MvaOptions::multiserver, mva_closed_population_reason(), mva_schmidt_ext_reason(), line::mva::ChainDemands< T >::Nchain, line::qn::NetworkStruct< T >::nchains, line::qn::NetworkStruct< T >::nstations, line::pfqn::pfqn_ab_amva(), line::pfqn::pfqn_aql(), line::pfqn::pfqn_bs(), line::pfqn::pfqn_chow(), line::pfqn::pfqn_clust(), line::pfqn::pfqn_conwayms(), line::pfqn::pfqn_dmlin(), line::pfqn::pfqn_lcp(), line::pfqn::pfqn_linearizermx(), line::pfqn::pfqn_pam(), line::pfqn::pfqn_qsa(), line::pfqn::pfqn_scat(), line::pfqn::pfqn_schmidt(), line::pfqn::pfqn_schmidt_ext(), line::pfqn::pfqn_sqni(), line::pfqn::pfqn_tay(), line::pfqn::PS, line::mva::ClassResults< T >::Q, line::mva::MvaSolution< T >::Q, line::pfqn::LinearizerResult< T >::Q, line::pfqn::SqniResult< T >::Q, line::pfqn::AbAmvaResult< T >::QN, line::pfqn::AmvaResult< T >::QN, line::pfqn::SchmidtExtResult< T >::QN, line::pfqn::SchmidtResult< T >::QN, line::mva::PfChainParams< T >::queue_stations, line::mva::ClassResults< T >::R, line::mva::MvaSolution< T >::R, line::Matrix< T >::rows(), line::mva::PfChainParams< T >::S, sn_deaggregate_chain_results(), sn_get_product_form_chain_params(), sn_interlock_chain(), solver_amva(), solver_amvald(), line::qn::NetworkStruct< T >::stations, line::pfqn::AbAmvaResult< T >::totiter, line::pfqn::LinearizerResult< T >::totiter, line::mva::ClassResults< T >::Tp, line::mva::MvaSolution< T >::Tp, line::pfqn::Two, line::mva::ClassResults< T >::U, line::mva::MvaSolution< T >::U, line::pfqn::LinearizerResult< T >::U, line::pfqn::SqniResult< T >::U, line::pfqn::AbAmvaResult< T >::UN, line::pfqn::AmvaResult< T >::UN, line::UnsupportedError::UnsupportedError(), line::mva::ChainDemands< T >::Vchain, line::mva::ClassResults< T >::X, line::mva::MvaSolution< T >::X, line::pfqn::LinearizerResult< T >::X, line::pfqn::SqniResult< T >::X, line::pfqn::AbAmvaResult< T >::XN, line::pfqn::AmvaResult< T >::XN, line::pfqn::SchmidtExtResult< T >::XN, line::pfqn::SchmidtResult< T >::XN, and line::mva::PfChainParams< T >::Z.

Referenced by solver_amva(), solver_mva_analyzer(), and solver_mvald_analyzer().

◆ solver_amvald()

template<class T>
MvaSolution< T > line::mva::solver_amvald ( const qn::NetworkStruct< T > & L,
const ChainDemands< T > & d,
const MvaOptions & opt,
const std::string & method,
bool & converged,
const Matrix< T > & init_sol = Matrix<T>() )

Port of solver_amvald.m together with solver_amvald_forward.m, restricted to the INF / PS / FCFS-family disciplines with no load or class dependence.

Definition at line 458 of file solver_mva.h.

References line::mva::ClassResults< T >::C, line::mva::MvaSolution< T >::C, line::qn::NetworkStruct< T >::classes, line::Matrix< T >::cols(), line::Matrix< T >::empty(), line::InputError::InputError(), line::mva::MvaSolution< T >::iter, line::util::LineConsole::iter(), line::util::LineConsole::loop(), line::Matrix< T >::Matrix(), line::mva::MvaSolution< T >::method, line::mva::ChainDemands< T >::Nchain, line::qn::NetworkStruct< T >::nchains, line::qn::NetworkStruct< T >::nclasses, line::qn::NetworkStruct< T >::nstations, line::num_pow_int(), line::ones(), line::util::LineConsole::owns_log(), line::pfqn::pfqn_cdfun(), line::pfqn::pfqn_jdfun(), line::pfqn::pfqn_lldfun(), line::mva::ClassResults< T >::Q, line::mva::MvaSolution< T >::Q, line::mva::ClassResults< T >::R, line::mva::MvaSolution< T >::R, line::qn::NetworkStruct< T >::rates, line::mva::ChainDemands< T >::refstatchain, line::Matrix< T >::rows(), line::lang::sched_to_text(), line::mva::ChainDemands< T >::SCVchain, sn_deaggregate_chain_results(), sn_interlock_chain(), solver_amvald(), line::qn::NetworkStruct< T >::stations, line::mva::ChainDemands< T >::STchain, line::mva::ClassResults< T >::Tp, line::mva::MvaSolution< T >::Tp, line::mva::ClassResults< T >::U, line::mva::MvaSolution< T >::U, line::UnsupportedError::UnsupportedError(), line::mva::ChainDemands< T >::Vchain, line::mva::ClassResults< T >::X, and line::mva::MvaSolution< T >::X.

Referenced by solver_amva(), and solver_amvald().

◆ solver_mapqn()

◆ solver_mva()

template<class T>
MvaSolution< T > line::mva::solver_mva ( const qn::NetworkStruct< T > & L,
const ChainDemands< T > & d,
const MvaOptions & opt )

Port of solver_mva.m, closed and mixed product-form networks.

Definition at line 153 of file solver_mva.h.

References line::mva::ClassResults< T >::C, line::mva::MvaSolution< T >::C, line::Matrix< T >::empty(), line::qn::NetworkStruct< T >::has_product_form(), line::mva::MvaSolution< T >::lG, line::pfqn::MvaResult< T >::lG, line::mva::MvaSolution< T >::method, line::mva::ChainDemands< T >::Nchain, line::qn::NetworkStruct< T >::nchains, line::qn::NetworkStruct< T >::nclasses, line::qn::NetworkStruct< T >::nof_stateful(), line::qn::NetworkStruct< T >::nstations, line::pfqn::OPEN_CLASS, line::pfqn::pfqn_mvams(), line::pfqn::pfqn_mvams_ilock(), line::mva::ClassResults< T >::Q, line::mva::MvaSolution< T >::Q, line::pfqn::MvaResult< T >::QN, line::mva::ClassResults< T >::R, line::mva::MvaSolution< T >::R, line::mva::ChainDemands< T >::refstatchain, line::qn::NetworkStruct< T >::rt, line::lang::sched_to_text(), sn_deaggregate_chain_results(), sn_interlock_chain(), solver_mva(), solver_mva_lcfsqn(), line::qn::NetworkStruct< T >::stateful_of_station(), line::qn::NetworkStruct< T >::stations, line::mva::ChainDemands< T >::STchain, line::mva::ClassResults< T >::Tp, line::mva::MvaSolution< T >::Tp, line::mva::ClassResults< T >::U, line::mva::MvaSolution< T >::U, line::UnsupportedError::UnsupportedError(), line::mva::ChainDemands< T >::Vchain, line::mva::ClassResults< T >::X, line::mva::MvaSolution< T >::X, and line::pfqn::MvaResult< T >::XN.

Referenced by solver_mva(), and solver_mva_analyzer().

◆ solver_mva_analyzer()

◆ solver_mva_cache_analyzer()

template<class T>
CacheResult< T > line::mva::solver_mva_cache_analyzer ( const qn::NetworkStruct< T > & L,
const MvaOptions & opt )

Port of solver_mva_cache_analyzer.m for a Source-Cache-Sink model.

Definition at line 84 of file solver_mva_cache.h.

References line::da::CacheParam< T >::accost, line::qn::CacheParam< T >::accost, line::mva::CacheResult< T >::actualmethod, line::mva::MvaSolution< T >::C, line::cache::cache_mva(), line::cache::cache_prob_fpi(), line::cache::cache_ttl_hlru(), line::cache::cache_ttl_lrua(), line::Matrix< T >::cols(), line::da::da_cache_isolate(), line::lang::FIFO, line::lang::GlobalConstants::FineTol, line::da::CacheIsolateResult< T >::gamma, line::qn::CacheParam< T >::hitclass, line::mva::CacheResult< T >::hitprob, line::mva::CacheResult< T >::hitproblist, line::lang::HLRU, line::InputError::InputError(), line::da::CacheParam< T >::itemcap, line::qn::CacheParam< T >::itemcap, line::mva::CacheResult< T >::itemprob, line::da::CacheIsolateResult< T >::lambda_cache, line::lang::LRU, line::Matrix< T >::Matrix(), line::qn::CacheParam< T >::missclass, line::mva::CacheResult< T >::missprob, line::qn::NetworkStruct< T >::nclasses, line::da::CacheParam< T >::nitems, line::qn::CacheParam< T >::nitems, line::qn::NetworkStruct< T >::nodeparam, line::qn::NetworkStruct< T >::nodes, line::qn::NetworkStruct< T >::nof_nodes(), line::qn::NetworkStruct< T >::nstations, line::num_abs(), line::cache::CacheMvaResult< T >::pij, line::da::CacheParam< T >::pread, line::qn::CacheParam< T >::pread, line::mva::MvaSolution< T >::Q, line::mva::MvaSolution< T >::R, line::qn::NetworkStruct< T >::rates, line::da::CacheIsolateResult< T >::Rcost, line::qn::CacheParam< T >::replacestrat, line::Matrix< T >::rows(), line::lang::RR, line::mva::CacheResult< T >::sol, solver_mva_cache_analyzer(), line::qn::NetworkStruct< T >::stations, line::mva::MvaSolution< T >::Tp, line::mva::MvaSolution< T >::U, line::UnsupportedError::UnsupportedError(), and line::mva::MvaSolution< T >::X.

Referenced by mva_dispatch(), and solver_mva_cache_analyzer().

◆ solver_mva_cacheqn_analyzer()

◆ solver_mva_cacheqn_retrieval_analyzer()

◆ solver_mva_dps_exact()

◆ solver_mva_get_prob_aggr()

◆ solver_mva_get_prob_marg()

template<class T>
MargResult< T > line::mva::solver_mva_get_prob_marg ( const qn::NetworkStruct< T > & L,
const AvgResult< T > & avg,
std::size_t ist,
std::size_t r,
const std::vector< long > & states,
const std::string & method = "default" )

Port of @@SolverMVA/getProbMarg.m: P(n jobs of class r at station i) for the states in states (or the reference's own default range when empty).

The three cases are the reference's, keyed on the CLASS being open or closed and, when open, on the station's discipline:

closed binomial(N_r, Q(i,r)/N_r) over n = 0..N_r; states selects from that vector and a state above N_r is an error open at INF Poisson with mean Q(i,r) open at a queue P(n) = (1-rho) rho_r^n / (1-rho+rho_r)^(n+1), the exact multiclass open product-form marginal open at EXT a Source has no queue-length distribution; P = 1 at n = 0

When states is empty the open cases pick their own range, as the reference does: mean + 5 sigma for the Poisson, and for the geometric the n at which the tail falls below 1e-10, capped at 1000.

Definition at line 116 of file solver_mva_prob.h.

References line::qn::NetworkStruct< T >::classes, line::lang::EXT, line::mva::GlobalConstants::FineTol, line::lang::INF, line::InputError::InputError(), line::mva::MargResult< T >::logP, line::qn::NetworkStruct< T >::nclasses, line::qn::NetworkStruct< T >::nstations, line::mva::MargResult< T >::P, line::mva::AvgResult< T >::QN, solver_mva_get_prob_marg(), line::qn::NetworkStruct< T >::stations, line::mva::AvgResult< T >::UN, and line::UnsupportedError::UnsupportedError().

Referenced by solver_mva_get_prob_marg().

◆ solver_mva_get_prob_norm_const_aggr()

template<class T>
T line::mva::solver_mva_get_prob_norm_const_aggr ( const qn::NetworkStruct< T > & L,
const MvaOptions & opt )

Port of @@SolverMVA/getProbNormConstAggr.m: log G.

The reference re-enters the analyzer with method='exact' rather than reusing whatever the last solve produced, because only the exact MVA recursion carries a normalizing constant; an AMVA result has no G to report. A cached value from a previous solve is returned unchanged, which is what self.result.Prob does.

Definition at line 260 of file solver_mva_prob.h.

References line::mva::MvaOptions::method, mva_dispatch(), line::mva::DispatchResult< T >::sol, and solver_mva_get_prob_norm_const_aggr().

Referenced by solver_mva_get_prob_norm_const_aggr().

◆ solver_mva_get_prob_sys_aggr()

template<class T>
AggrResult< T > line::mva::solver_mva_get_prob_sys_aggr ( const qn::NetworkStruct< T > & L,
const AvgResult< T > & avg,
const std::string & method = "default" )

Port of @@SolverMVA/getProbSysAggr.m: the joint probability of the model's whole state across all stations, a scalar in [0,1] with its log.

Closed classes take the multinomial-binomial normalization sum(factln(N)) - the per-station product; open classes take the same per-station BCMP form as getProbAggr.

Definition at line 349 of file solver_mva_prob.h.

References line::qn::NetworkStruct< T >::classes, line::api::OpenProbTerm< T >::feasible, line::api::OpenProbTerm< T >::logp, line::qn::NetworkStruct< T >::nclasses, line::qn::NetworkStruct< T >::nstations, line::mva::AvgResult< T >::QN, line::api::sn_open_prob_terms(), solver_mva_get_prob_sys_aggr(), line::mva::AvgResult< T >::UN, and line::UnsupportedError::UnsupportedError().

Referenced by solver_mva_get_prob_sys_aggr().

◆ solver_mva_lcfsqn()

template<class T>
MvaSolution< T > line::mva::solver_mva_lcfsqn ( const qn::NetworkStruct< T > & L,
std::size_t lcfs_ist,
std::size_t lcfspr_ist )

Port of solver_mva_lcfsqn.m: the closed two-station LCFS + LCFS-PR network.

pfqn_lcfsqn_mva returns the throughput, the queue lengths and the utilizations for the pair directly; everything else here is the mapping back onto the model's station indexing, with the response times from Little's law and the cycle time as their sum. lG is NaN: this recursion carries no normalizing constant, and the reference says so rather than reporting zero.

Definition at line 86 of file solver_mva.h.

References line::mva::MvaSolution< T >::C, line::qn::NetworkStruct< T >::classes, line::InputError::InputError(), line::mva::MvaSolution< T >::lG, line::Matrix< T >::Matrix(), line::mva::MvaSolution< T >::method, line::qn::NetworkStruct< T >::nclasses, line::qn::NetworkStruct< T >::nstations, line::pfqn::pfqn_lcfsqn_mva(), line::mva::MvaSolution< T >::Q, line::pfqn::LcfsMvaResult< T >::Q, line::mva::MvaSolution< T >::R, line::qn::NetworkStruct< T >::rates, solver_mva_lcfsqn(), line::pfqn::LcfsMvaResult< T >::T_, line::mva::MvaSolution< T >::Tp, line::mva::MvaSolution< T >::U, line::pfqn::LcfsMvaResult< T >::U, and line::mva::MvaSolution< T >::X.

Referenced by solver_mva(), and solver_mva_lcfsqn().

◆ solver_mva_marie_analyzer()

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.

Only FCFS is service-time sensitive; PS and LCFSPR are insensitive (product form) and are handed an SCV of one, which is what makes the decomposition exact for them. Delay stations fold into the per-chain think time rather than entering the isolation, and multiserver isolation is single-chain only – all three restrictions are the reference's, and each is refused by name rather than approximated.

Definition at line 816 of file mva_dispatch.h.

References line::mva::DispatchResult< T >::actualmethod, line::mva::ClassResults< T >::C, line::pfqn::MarieResult< T >::it, line::mva::ChainDemands< T >::Lchain, line::Matrix< T >::Matrix(), line::mva::ChainDemands< T >::Nchain, line::qn::NetworkStruct< T >::nchains, line::qn::NetworkStruct< T >::nodes, line::qn::NetworkStruct< T >::nstations, line::pfqn::pfqn_marie(), line::mva::ClassResults< T >::Q, line::pfqn::MarieResult< T >::Q, line::mva::ClassResults< T >::R, line::lang::sched_to_text(), line::mva::ChainDemands< T >::SCVchain, sn_deaggregate_chain_results(), sn_get_demands_chain(), line::mva::DispatchResult< T >::sol, solver_mva_marie_analyzer(), line::qn::NetworkStruct< T >::stations, line::mva::ChainDemands< T >::STchain, line::mva::ClassResults< T >::Tp, line::mva::ClassResults< T >::U, line::pfqn::MarieResult< T >::U, line::UnsupportedError::UnsupportedError(), line::mva::ChainDemands< T >::Vchain, line::mva::ClassResults< T >::X, and line::pfqn::MarieResult< T >::X.

Referenced by mva_dispatch(), and solver_mva_marie_analyzer().

◆ solver_mva_oi_analyzer()

◆ solver_mva_polling_analyzer()

template<class T>
MvaSolution< T > line::mva::solver_mva_polling_analyzer ( const qn::NetworkStruct< T > & L,
const MvaOptions & opt )

Port of solver_mva_polling_analyzer.m.

Definition at line 51 of file solver_mva_polling.h.

References line::polling::PollingMoments< T >::b, line::polling::PollingMoments< T >::b2, line::mva::MvaSolution< T >::C, line::lang::DECREMENTING, line::polling::PollingMoments< T >::delta2, line::lang::dist_to_map(), line::lang::EXHAUSTIVE, line::lang::GATED, line::mva::GlobalConstants::Immediate, line::InputError::InputError(), line::lang::KLIMITED, line::polling::PollingMoments< T >::lambda, line::mva::MvaSolution< T >::lG, line::mam::map_moment(), line::Matrix< T >::Matrix(), line::mva::MvaSolution< T >::method, line::qn::NetworkStruct< T >::nchains, line::qn::NetworkStruct< T >::nclasses, line::qn::Station< T >::nservers, line::qn::NetworkStruct< T >::nstations, line::qn::Station< T >::polling_par, line::polling::polling_qsys_1limited(), line::polling::polling_qsys_decrementing(), line::polling::polling_qsys_exhaustive(), line::polling::polling_qsys_gated(), line::qn::Station< T >::polling_type, line::mva::MvaSolution< T >::Q, line::mva::MvaSolution< T >::R, line::polling::PollingMoments< T >::r, line::qn::NetworkStruct< T >::rates, line::qn::NetworkStruct< T >::scv, line::qn::NetworkStruct< T >::service, solver_mva_polling_analyzer(), line::qn::NetworkStruct< T >::stateful_of_station(), line::qn::NetworkStruct< T >::stations, line::qn::Station< T >::switchover, line::mva::MvaSolution< T >::Tp, line::mva::MvaSolution< T >::U, line::UnsupportedError::UnsupportedError(), line::qn::NetworkStruct< T >::visits, and line::mva::MvaSolution< T >::X.

Referenced by mva_dispatch(), and solver_mva_polling_analyzer().

◆ solver_mva_qsys_analyzer()

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.

exact resolves to M/M/1, M/M/k, M/G/1 or G/M/1 and REFUSES anything else, since no closed form covers it; default additionally falls back to the G/G/k approximation and to the KLB G/G/1 approximation.

Definition at line 246 of file mva_dispatch.h.

References line::mva::DispatchResult< T >::actualmethod, amva_method_alias(), line::api::PatienceHandles< T >::as_patience(), line::mva::MvaSolution< T >::C, line::qn::NetworkStruct< T >::cap, line::RootResult< T >::converged, line::mam::Map< T >::D0, line::lang::dist_lst(), line::lang::dist_to_map(), line::lang::Distrib< T >::has_map(), line::InputError::InputError(), line::api::PatienceHandles< T >::isExponential, line::mva::MvaSolution< T >::iter, line::mam::map_count_idc(), line::mam::map_pie(), line::Matrix< T >::Matrix(), line::qsys::QsysAbandonResult< T >::meanNumber, line::qsys::QsysGgnmResult< T >::meanNumber, line::mva::MvaSolution< T >::method, line::qn::NetworkStruct< T >::nstations, line::api::PatienceHandles< T >::present, line::mva::MvaSolution< T >::Q, line::qsys::qsys_erlanga(), line::qsys::qsys_gg1(), line::qsys::qsys_ggnm_diffusion(), line::qsys::qsys_gig1_approx_allencunneen(), line::qsys::qsys_gig1_approx_gelenbe(), line::qsys::qsys_gig1_approx_heyman(), line::qsys::qsys_gig1_approx_kimura(), line::qsys::qsys_gig1_approx_klb(), line::qsys::qsys_gig1_approx_kobayashi(), line::qsys::qsys_gig1_approx_marchal(), line::qsys::qsys_gig1_bnds_extremal(), line::qsys::qsys_gig1_rq(), line::qsys::qsys_gig1_ubnd_kingman(), line::qsys::qsys_gigk_approx(), line::qsys::qsys_gigk_approx_kingman(), line::qsys::qsys_gigk_approx_whitt(), line::qsys::qsys_gigk_rqt(), line::qsys::qsys_gigk_rqt_gamma(), line::qsys::qsys_gm1(), line::qsys::qsys_mg1(), line::qsys::qsys_mg1k_loss_mgs(), line::qsys::qsys_mgisrgi_whitt(), line::qsys::qsys_mm1(), line::qsys::qsys_mmk(), line::qsys::qsys_mmk_qed(), line::qsys::qsys_phm1(), line::mva::MvaSolution< T >::R, line::api::PatienceHandles< T >::rate, line::qn::NetworkStruct< T >::rates, line::RootResult< T >::root, line::root_brent(), line::qn::NetworkStruct< T >::scv, line::qn::NetworkStruct< T >::service, sn_is_mm1k_loss(), line::api::sn_patience_handles(), line::mva::DispatchResult< T >::sol, solver_mva_qsys_analyzer(), line::qn::NetworkStruct< T >::stateful_of_station(), line::qn::NetworkStruct< T >::stations, line::qsys::QsysAbandonResult< T >::throughput, line::qsys::QsysGgnmResult< T >::throughput, line::mva::MvaSolution< T >::Tp, line::mva::MvaSolution< T >::U, line::UnsupportedError::UnsupportedError(), line::qsys::QsysAbandonResult< T >::utilization, line::qsys::QsysGgnmResult< T >::utilization, line::qn::NetworkStruct< T >::visits, and line::mva::MvaSolution< T >::X.

Referenced by mva_dispatch(), and solver_mva_qsys_analyzer().

◆ solver_mva_qsys_prio_analyzer()

template<class T>
DispatchResult< T > line::mva::solver_mva_qsys_prio_analyzer ( const qn::NetworkStruct< T > & L,
const MvaOptions & opt )

◆ solver_mva_qsys_sizebased_analyzer()

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).

The arrival rate of each class is the source rate times the queue's VISIT ratio, and the response time comes back per visit, so both are multiplied out the same way the reference does.

PER-VISIT VERSUS PER-JOB. W comes back per visit, so the response time is W * visits while the queue length stays lambda * W with lambda already carrying the visit ratio. That makes Q != T * R at the station whenever the visit ratio differs from one: the reference inflates R by the visits but not Q, so Little's law fails on a feedback routing. It is a defect of the reference, reproduced here rather than silently corrected – this branch is only ever dispatched on a plain Source-Queue-Sink, where the visit ratio is one and the discrepancy cannot arise.

Definition at line 713 of file mva_dispatch.h.

References line::mva::DispatchResult< T >::actualmethod, line::mva::MvaSolution< T >::C, line::qn::NetworkStruct< T >::inchain, line::InputError::InputError(), line::mva::MvaSolution< T >::iter, line::Matrix< T >::Matrix(), line::mva::MvaSolution< T >::method, line::qn::NetworkStruct< T >::nchains, line::qn::NetworkStruct< T >::nclasses, line::qn::NetworkStruct< T >::nstations, line::mva::MvaSolution< T >::Q, line::qsys::qsys_mg1_fb(), line::qsys::qsys_mg1_lrpt(), line::qsys::qsys_mg1_psjf(), line::qsys::qsys_mg1_setf(), line::qsys::qsys_mg1_srpt(), line::mva::MvaSolution< T >::R, line::qn::NetworkStruct< T >::rates, line::lang::sched_to_text(), line::qn::NetworkStruct< T >::scv, line::mva::DispatchResult< T >::sol, solver_mva_qsys_sizebased_analyzer(), line::qn::NetworkStruct< T >::stateful_of_station(), line::qn::NetworkStruct< T >::stations, line::mva::MvaSolution< T >::Tp, line::mva::MvaSolution< T >::U, line::UnsupportedError::UnsupportedError(), line::qn::NetworkStruct< T >::visits, and line::mva::MvaSolution< T >::X.

Referenced by mva_dispatch(), and solver_mva_qsys_sizebased_analyzer().

◆ solver_mva_retrieval_analyzer()

template<class T>
MvaSolution< T > line::mva::solver_mva_retrieval_analyzer ( const qn::NetworkStruct< T > & L,
const MvaOptions & opt,
MvaRetrievalCacheOutputs< T > * cache_out = nullptr )

Definition at line 52 of file solver_mva_retrieval.h.

References line::retrieval::cache_retrieval_inputs(), line::qn::NetworkStruct< T >::disabled, line::retrieval::RetrievalInputs< T >::eta, line::retrieval::RetrievalInputs< T >::gamma, line::qn::CacheParam< T >::hitclass, line::InputError::InputError(), line::inverse(), line::retrieval::IS, line::mva::MvaSolution< T >::iter, line::retrieval::RetrievalInputs< T >::lambda, line::retrieval::RetrievalInputs< T >::m, line::Matrix< T >::Matrix(), line::mva::MvaSolution< T >::method, line::qn::CacheParam< T >::missclass, line::qn::NetworkStruct< T >::nclasses, line::qn::NetworkStruct< T >::nodeparam, line::qn::NetworkStruct< T >::nodes, line::qn::NetworkStruct< T >::nstations, line::retrieval::RetrievalFpiResult< T >::pdh, line::retrieval::RetrievalFpiLatencyResult< T >::phi, line::retrieval::RetrievalFpiResult< T >::phit, line::retrieval::RetrievalFpiResult< T >::pmiss, line::mva::MvaSolution< T >::Q, line::retrieval::RetrievalInputs< T >::queue_nodes, line::mva::MvaSolution< T >::R, line::retrieval::RetrievalInputs< T >::R, line::qn::NetworkStruct< T >::rates, line::retrieval::RetrievalInputs< T >::read_class, line::retrieval::retrieval_fpi(), line::retrieval::retrieval_fpi_latency(), solver_mva_retrieval_analyzer(), line::qn::NetworkStruct< T >::sourceIdx, line::retrieval::RetrievalInputs< T >::station, line::mva::MvaSolution< T >::Tp, line::mva::MvaSolution< T >::U, line::UnsupportedError::UnsupportedError(), line::mva::MvaSolution< T >::X, and line::retrieval::RetrievalFpiLatencyResult< T >::Z.

Referenced by mva_dispatch(), and solver_mva_retrieval_analyzer().

◆ solver_mva_run_analyzer()

template<class T>
AvgResult< T > line::mva::solver_mva_run_analyzer ( const qn::NetworkStruct< T > & L,
const MvaOptions & opt_in,
const Matrix< T > & init_sol )

Port of @@SolverMVA/runAnalyzer.m for the lang='matlab' path: gate, solve, convert, filter.

A model with a Fork is solved through the shared fork-join fixed point (fj_driver.h), which drives mva_dispatch as its inner solve on the transformed (auxiliary-expanded) model; a model without one runs the dispatch exactly once. The filtering below is common to both paths.

Definition at line 712 of file solver_mva_runner.h.

References line::mva::AvgResult< T >::actualmethod, line::mva::DispatchResult< T >::actualmethod, line::mva::AvgResult< T >::AN, ArvR, line::mva::MvaOptions::base_has_fork, line::mva::MvaSolution< T >::C, line::mva::AvgResult< T >::cache, line::mva::DispatchResult< T >::cache, check_method(), line::qn::NetworkStruct< T >::classes, line::mva::AvgResult< T >::CN, line::mva::AvgResult< T >::converged, line::mva::MvaSolution< T >::converged, line::qn::feature_gate(), filter_metric(), line::mva::GlobalConstants::FineTol, fj_fixed_point(), fj_fork_join_transform(), line::qn::NetworkStruct< T >::has_fork(), line::qn::NetworkStruct< T >::has_immediate_feedback(), line::mva::AvgResult< T >::iter, line::mva::MvaSolution< T >::iter, line::mva::AvgResult< T >::method, line::mva::MvaOptions::method, mva_check_finite_capacity(), mva_dispatch(), line::qn::mva_feature_set(), line::qn::NetworkStruct< T >::nclasses, line::qn::NetworkStruct< T >::nstations, line::mva::MvaSolution< T >::Q, QLen, line::mva::AvgResult< T >::QN, line::mva::MvaSolution< T >::R, line::qn::NetworkStruct< T >::rates, line::mva::AvgResult< T >::refreshed_struct, line::mva::DispatchResult< T >::refreshed_struct, line::qn::NetworkStruct< T >::regions, ResidT, resolve_method(), RespT, line::mva::AvgResult< T >::RN, sn_get_arvr_from_tput(), sn_get_residt_from_respt(), line::mva::DispatchResult< T >::sol, solver_mva_run_analyzer(), line::qn::NetworkStruct< T >::stations, line::mva::AvgResult< T >::TN, line::mva::MvaSolution< T >::Tp, Tput, line::mva::MvaSolution< T >::U, line::mva::AvgResult< T >::UN, line::UnsupportedError::UnsupportedError(), Util, line::mva::AvgResult< T >::warning, line::mva::DispatchResult< T >::warning, line::mva::AvgResult< T >::WN, line::mva::MvaSolution< T >::X, and line::mva::AvgResult< T >::XN.

Referenced by line::NetworkSolver::avg_table(), solver_mva_run_analyzer(), and line::uq::uq_stage_solver().

◆ solver_mva_sjn_analyzer()

◆ solver_mva_sum()

template<class T>
MvaSolution< T > line::mva::solver_mva_sum ( const qn::NetworkStruct< T > & L,
const MvaOptions & opt )

Port of solver_mva_sum.m: the SUM / ESUM summation method (Bolch et al., Secs.

9.2, 10.1.4.4 and 10.1.5).

A closed model goes to sum_closed; an open or mixed one to sum_closing with the reference's Kclosed = 5000. The SCV each station is given is the ESUM discrimination: FCFS and SIRO are service-time sensitive and get the chain SCV, while PS, LCFSPR and the infinite servers are insensitive and are passed 1 – handing them their real SCV would apply a correction that the product form says does not exist.

Definition at line 2138 of file solver_mva.h.

References line::mva::ClassResults< T >::C, line::mva::MvaSolution< T >::C, line::sum::Servers::inf(), line::InputError::InputError(), line::sum::SumClosedResult< T >::it, line::sum::SumClosingResult< T >::it, line::mva::MvaSolution< T >::iter, line::sum::SumOptions::maxiter, line::mva::MvaSolution< T >::method, line::mva::ChainDemands< T >::Nchain, line::qn::NetworkStruct< T >::nchains, line::qn::NetworkStruct< T >::nstations, line::sum::Servers::of(), line::mva::ClassResults< T >::Q, line::mva::MvaSolution< T >::Q, line::sum::SumClosedResult< T >::QN, line::sum::SumClosingResult< T >::QN, line::mva::ClassResults< T >::R, line::mva::MvaSolution< T >::R, line::mva::ChainDemands< T >::refstatchain, line::lang::sched_to_text(), line::mva::ChainDemands< T >::SCVchain, sn_deaggregate_chain_results(), sn_get_demands_chain(), solver_mva_sum(), line::qn::NetworkStruct< T >::stations, line::mva::ChainDemands< T >::STchain, line::sum::ClosingOptions::sum, line::sum::sum_closed(), line::sum::sum_closing(), line::sum::SumOptions::tol, line::mva::ClassResults< T >::Tp, line::mva::MvaSolution< T >::Tp, line::mva::ClassResults< T >::U, line::mva::MvaSolution< T >::U, line::sum::SumClosedResult< T >::UN, line::sum::SumClosingResult< T >::UN, line::UnsupportedError::UnsupportedError(), line::mva::ChainDemands< T >::Vchain, line::mva::ClassResults< T >::X, line::mva::MvaSolution< T >::X, line::sum::SumClosedResult< T >::XN, and line::sum::SumClosingResult< T >::XN.

Referenced by solver_mva_analyzer(), and solver_mva_sum().

◆ solver_mvac_analyzer()

◆ solver_mvald()

template<class T>
MvaSolution< T > line::mva::solver_mvald ( const qn::NetworkStruct< T > & L,
const MvaOptions & opt )

Port of solver_mvald.m: exact MVA on a load-dependent model, through pfqn_mvaldmx.

The rate lattice mu is built per station: an infinite server gets the linear ramp 1, 2, ..., Nt (which is what makes it a delay in a load-dependent recursion), a station with lldscaling gets its lattice, and everything else gets ones.

THE UTILIZATION IS NOT the recursion's. Under load-dependent scaling the reference replaces it with the carried load over the EFFECTIVE capacity max(nservers, max(lldscaling)), the NC convention, rather than the P(busy)-style estimator pfqn_mvaldmx returns; the two disagree wherever the lattice exceeds the server count.

Definition at line 1955 of file solver_mva.h.

References line::mva::ClassResults< T >::C, line::mva::MvaSolution< T >::C, line::qn::NetworkStruct< T >::disabled, line::mva::MvaSolution< T >::iter, line::mva::ChainDemands< T >::Lchain, line::mva::MvaSolution< T >::method, line::mva::ChainDemands< T >::Nchain, line::qn::NetworkStruct< T >::nchains, line::qn::NetworkStruct< T >::nclasses, line::qn::NetworkStruct< T >::nstations, line::pfqn::OPEN_CLASS, line::pfqn::pfqn_mvaldmx(), line::mva::ClassResults< T >::Q, line::mva::MvaSolution< T >::Q, line::pfqn::MvaResult< T >::QN, line::mva::ClassResults< T >::R, line::mva::MvaSolution< T >::R, line::qn::NetworkStruct< T >::rates, line::mva::ChainDemands< T >::refstatchain, sn_deaggregate_chain_results(), sn_get_demands_chain(), solver_mvald(), line::qn::NetworkStruct< T >::stations, line::mva::ChainDemands< T >::STchain, line::mva::ClassResults< T >::Tp, line::mva::MvaSolution< T >::Tp, line::mva::ClassResults< T >::U, line::mva::MvaSolution< T >::U, line::pfqn::MvaResult< T >::UN, line::UnsupportedError::UnsupportedError(), line::mva::ChainDemands< T >::Vchain, line::mva::ClassResults< T >::X, line::mva::MvaSolution< T >::X, and line::pfqn::MvaResult< T >::XN.

Referenced by solver_mvald(), and solver_mvald_analyzer().

◆ solver_mvald_analyzer()

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.

exact and mva take the exact load-dependent recursion; default takes it too on a small closed product-form model, mirroring the default-to-exact upgrade the non-LD analyzer applies; everything else goes to the AMVA, whose lld and cd terms are now in place.

Definition at line 642 of file mva_dispatch.h.

References line::mva::DispatchResult< T >::actualmethod, amva_method_alias(), line::qn::NetworkStruct< T >::classes, line::qn::NetworkStruct< T >::has_product_form(), line::qn::NetworkStruct< T >::nchains, line::qn::JobClass::population, sn_get_demands_chain(), line::mva::DispatchResult< T >::sol, solver_amva(), solver_mvald(), solver_mvald_analyzer(), line::qn::NetworkStruct< T >::stations, and line::UnsupportedError::UnsupportedError().

Referenced by mva_dispatch(), solver_mva_cacheqn_analyzer(), solver_mva_cacheqn_retrieval_analyzer(), and solver_mvald_analyzer().

◆ solver_qna()

template<class T>
MvaSolution< T > line::mva::solver_qna ( const qn::NetworkStruct< T > & L,
const MvaOptions & opt )

◆ solver_rqna()

template<class T>
MvaSolution< T > line::mva::solver_rqna ( const qn::NetworkStruct< T > & L,
const MvaOptions & opt )
Parameters
Lthe single-class open network struct
optoptions (opt.tol is the feedback-elimination threshold). The reference's config knobs rqna_feedback_elim / rqna_alpha / rqna_beta are not exposed by MvaOptions, so this port runs their MATLAB defaults: feedback elimination ON, no IDC corrections.
Returns
the AvgResult-style MvaSolution

Definition at line 114 of file solver_rqna.h.

References line::mva::MvaSolution< T >::C, line::qn::NetworkStruct< T >::classes, line::lang::dist_to_map(), line::inverse(), line::mva::MvaSolution< T >::iter, line::npfqn::TrafficIdcContext< T >::lambda, line::mam::map_count_idc(), line::mam::map_idc(), line::mam::map_lambda(), line::matmul(), line::Matrix< T >::Matrix(), line::mva::MvaSolution< T >::method, mva_single_class_open_reason(), line::qn::NetworkStruct< T >::nclasses, line::qn::NetworkStruct< T >::nof_stateful(), line::npfqn::npfqn_traffic_idc(), line::npfqn::npfqn_traffic_idc_at(), line::qn::NetworkStruct< T >::nstations, line::mva::MvaSolution< T >::Q, line::qsys::qsys_gig1_rq(), line::mva::MvaSolution< T >::R, line::qn::NetworkStruct< T >::rates, line::npfqn::TrafficIdcContext< T >::rho, line::qn::NetworkStruct< T >::rt, line::qn::NetworkStruct< T >::scv, line::qn::NetworkStruct< T >::service, solver_rqna(), line::qn::NetworkStruct< T >::stations, line::mva::MvaSolution< T >::Tp, line::mva::MvaSolution< T >::U, line::UnsupportedError::UnsupportedError(), and line::mva::MvaSolution< T >::X.

Referenced by mva_dispatch(), and solver_rqna().

◆ solver_rqt()

◆ solver_sqd()

template<class T>
MvaSolution< T > line::mva::solver_sqd ( const qn::NetworkStruct< T > & L,
const ChainDemands< T > & d )

Port of solver_sqd.m: Smith queue decomposition for blocking-after-service.

npfqn_sqd is single-chain by construction – it solves ONE circulating population – so a multichain model is refused. The reference warns and returns a matrix of NaN there; refusing by name is the same information without a result that reads as solved.

The unpacking is the one npfqn_sqd.h documents: the chain-aggregated demand and visit columns, an infinite capacity at every delay, and sn.rt with its stateful indexing.

Definition at line 2290 of file solver_mva.h.

References line::mva::ClassResults< T >::C, line::mva::MvaSolution< T >::C, line::qn::NetworkStruct< T >::cap, line::qn::NetworkStruct< T >::has_open_classes(), line::mva::MvaSolution< T >::lG, line::mva::MvaSolution< T >::method, line::qn::NetworkStruct< T >::nchains, line::qn::NetworkStruct< T >::nclasses, line::qn::NetworkStruct< T >::nclosedjobs(), line::npfqn::npfqn_sqd(), line::qn::NetworkStruct< T >::nstations, line::mva::ClassResults< T >::Q, line::mva::MvaSolution< T >::Q, line::npfqn::SqdResult< T >::Q, line::mva::ClassResults< T >::R, line::mva::MvaSolution< T >::R, line::npfqn::SqdResult< T >::R, line::mva::ChainDemands< T >::refstatchain, line::qn::NetworkStruct< T >::rt, sn_deaggregate_chain_results(), solver_sqd(), line::qn::NetworkStruct< T >::stateful_of_station(), line::qn::NetworkStruct< T >::stations, line::mva::ChainDemands< T >::STchain, line::mva::ClassResults< T >::Tp, line::mva::MvaSolution< T >::Tp, line::mva::ClassResults< T >::U, line::mva::MvaSolution< T >::U, line::npfqn::SqdResult< T >::U, line::UnsupportedError::UnsupportedError(), line::mva::ChainDemands< T >::Vchain, line::mva::ClassResults< T >::X, line::mva::MvaSolution< T >::X, and line::npfqn::SqdResult< T >::X.

Referenced by solver_mva_analyzer(), and solver_sqd().

Variable Documentation

◆ kSjnLatticeMax

double line::mva::kSjnLatticeMax = 1e5
inlineconstexpr

Lattice size above which default prefers the fixed point.

The reference reads it, and the grid parameters ns / Lfactor / umax, from options.config.sjn_*. MvaOptions carries no config map, so the four sit at the reference's own defaults here; the method name still selects the route.

Definition at line 88 of file solver_mva_sjn.h.

Referenced by solver_mva_sjn_analyzer().