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

Classes

struct  CdfRespTResult
 The response-time distributions, station by class. More...
struct  DtModel
 Classification of a model against the discrete-time product form. More...
struct  GlobalConstants
 The MATLAB GlobalConstants, as reported by lineStart at its defaults. More...
struct  MemSupport
 The verdict of solver_nc_mem_supports. More...
struct  NcCacheqnRetrievalSolution
 What the closed delayed-hit analyzer returns. More...
struct  NcCacheqnSolution
 What the integrated analyzer returns: the metrics plus the converged split. More...
struct  NcCacheSolution
 What the cache analyzer returns beyond the usual metric table. More...
struct  NcLossnSolution
 What the loss-network analyzer returns beyond the usual metric table. More...
struct  NcMargResult
 What the marginal analyzers return: one probability per station. More...
struct  NcQueueLengthDist
 The marginal queue-length distribution and its logarithm. More...
struct  NcRetrievalSolution
 What the delayed-hit analyzer returns beyond the metric table. More...
struct  NcSolution
 The [Q,U,R,T,C,X,lG] of the reference, plus the algorithm that ran. More...
struct  NcSolverOptions
 Controls, defaulting to SolverOptions('NC') in the reference. More...
struct  NcSpnSolution
 The product-form solve, with the certificate that produced it. More...
struct  PfParams
 The [lambda,D,N,Z,mu,S,V] of the reference. More...

Typedefs

using MarginalState = std::vector<std::vector<int>>
 A state, as this port expresses it: nir[i][r] jobs of class r at station i.

Enumerations

enum class  SchedStrategy
 Scheduling disciplines, with the values of MATLAB SchedStrategy. More...

Functions

template<class T>
NcSolution< T > solver_ncld_analyzer (const qn::NetworkStruct< T > &sn, const NcSolverOptions &opt)
 Port of solver_ncld_analyzer.m: the load-dependent analyzer, which is solver_ncld plus the same fractional-population interpolation the load-independent one applies.
template<class T>
NcSolution< T > solver_nc_analyzer (const qn::NetworkStruct< T > &sn, const NcSolverOptions &opt)
 Port of solver_nc_analyzer.m.
template<class T>
NcSolution< T > nc_dispatch (const qn::NetworkStruct< T > &sn, const NcSolverOptions &opt)
 Port of @@SolverNC/ncDispatch.m: the inner solve of the fork-join fixed point, which is the load-dependence test and nothing else.
template<class T>
PfParams< T > sn_get_product_form_params (const qn::NetworkStruct< T > &sn)
 Port of sn_get_product_form_params.
template<class T>
NcSolution< T > solver_nc (const qn::NetworkStruct< T > &sn, const NcSolverOptions &opt)
 Port of solver_nc.m.
template<class T>
std::vector< double > solver_nc_busyp (const qn::NetworkStruct< T > &sn, const std::vector< std::size_t > &subnet, const std::vector< std::size_t > &orders)
 Mean busy period of order n for a set of stations.
template<class T>
NcCacheSolution< T > solver_nc_cache_analyzer (const qn::NetworkStruct< T > &sn, const NcSolverOptions &opt)
 Port of solver_nc_cache_analyzer.m.
template<class T>
bool nc_is_noreentrant_cache (const qn::NetworkStruct< T > &sn)
 True when the model is exactly a Source, a Cache and a Sink.
template<class T>
NcCacheqnSolution< T > solver_nc_cacheqn_analyzer (const qn::NetworkStruct< T > &sn, const NcSolverOptions &opt)
 Port of solver_nc_cacheqn_analyzer.m.
template<class T>
bool nc_is_cacheqn (const qn::NetworkStruct< T > &sn)
 True when the model has a Cache node and is not the Source-Cache-Sink shape.
template<class T>
NcCacheqnRetrievalSolution< T > solver_nc_cacheqn_retrieval_analyzer (const qn::NetworkStruct< T > &sn, const NcSolverOptions &opt)
 Port of solver_nc_cacheqn_retrieval_analyzer.m.
template<class T>
CdfRespTResult< T > solver_nc_cdf_respt (const qn::NetworkStruct< T > &sn, const NcSolverOptions &opt)
 Port of @@SolverNC/getCdfRespT.m.
template<class T>
CdfRespTResult< T > solver_nc_sjrnt (const qn::NetworkStruct< T > &sn, const NcSolverOptions &opt)
 Port of @@SolverNC/getSjrnT.m: an alias of getCdfRespT.
template<class T>
NcSolution< T > solver_nc_conv (const qn::NetworkStruct< T > &sn, const NcSolverOptions &opt)
 Port of solver_nc_conv.m.
template<class T>
bool sn_has_dps (const qn::NetworkStruct< T > &sn)
 True when any station of the network is scheduled DPS.
template<class T>
bool nc_is_dps_model (const qn::NetworkStruct< T > &sn)
 True when the model is the closed two-station network Morrison's expansion is derived for: one infinite-server (think) station and one single-server DPS station, exponential service, every class alternating between the two.
template<class T>
NcSolution< T > solver_nc_dps_analyzer (const qn::NetworkStruct< T > &sn, const NcSolverOptions &opt)
 Analyzes the closed think+DPS network.
template<class T>
DtModel< T > nc_is_dt_model (const qn::NetworkStruct< T > &sn)
 Classify sn against the two discrete-time product-form families.
template<class T>
NcSolution< T > solver_nc_dt (const qn::NetworkStruct< T > &sn, const NcSolverOptions &opt)
 Exact discrete-time analysis of sn.
template<class T>
NcSolution< T > solver_nc_lcfsqn (const qn::NetworkStruct< T > &sn, const NcSolverOptions &opt, std::size_t lcfsStat, std::size_t lcfsprStat)
 Port of solver_nc_lcfsqn.m.
template<class T>
bool nc_has_lossn_shape (const qn::NetworkStruct< T > &sn)
 True when the model has the SHAPE of a loss network – open, one region, one member station, that station an infinite server – whatever admission rule the region applies.
template<class T>
bool nc_is_lossn_model (const qn::NetworkStruct< T > &sn)
 True when the model is a loss network: the shape above, with EVERY class dropped at the region.
template<class T>
NcLossnSolution< T > solver_nc_lossn_analyzer (const qn::NetworkStruct< T > &sn, const NcSolverOptions &opt)
 Port of solver_nc_lossn_analyzer.m.
template<class T>
MemSupport solver_nc_mem_supports (const qn::NetworkStruct< T > &sn)
 Port of solver_nc_mem_supports.m.
template<class T>
NcSolution< T > solver_nc_mem (const qn::NetworkStruct< T > &sn, const NcSolverOptions &opt)
 Port of solver_nc_mem.m.
template<class T>
bool nc_is_oi_model (const qn::NetworkStruct< T > &sn)
 Port of nc_is_oi_model.m: a closed network with at least one OI station and nothing but BCMP product-form stations besides.
template<class T>
bool nc_is_pas_model (const qn::NetworkStruct< T > &sn)
 Port of nc_is_pas_model.m: a closed two-station OI / P&S tandem.
template<class T>
NcSolution< T > solver_nc_oi_analyzer (const qn::NetworkStruct< T > &sn, const NcSolverOptions &opt)
 Port of solver_nc_oi_analyzer.m.
template<class T>
NcSolution< T > solver_nc_pas_is_analyzer (const qn::NetworkStruct< T > &sn, const NcSolverOptions &opt)
 Port of solver_nc_pas_is_analyzer.m.
template<class T>
NcMargResult< T > solver_nc_margaggr (const qn::NetworkStruct< T > &sn, const NcSolverOptions &opt, const MarginalState &nir, double lG)
 Port of solver_nc_margaggr.m.
template<class T>
NcMargResult< T > solver_nc_marg (const qn::NetworkStruct< T > &sn, const NcSolverOptions &opt, const MarginalState &nir, double lG)
 Port of solver_nc_marg.m: the DETAILED marginal, which weighs the station's internal arrangement and therefore depends on its discipline.
template<class T>
solver_nc_joint (const qn::NetworkStruct< T > &sn, const NcSolverOptions &opt, const MarginalState &nir, double *lG_out)
 Port of solver_nc_joint.m: the probability of the WHOLE system state.
template<class T>
solver_nc_jointaggr (const qn::NetworkStruct< T > &sn, const NcSolverOptions &opt, const MarginalState &nir, double *lG_out)
 Port of solver_nc_jointaggr.m: the aggregate joint.
template<class T>
solver_nc_jointaggr_ld (const qn::NetworkStruct< T > &sn, const NcSolverOptions &opt, const MarginalState &nir, double *lG_out)
 Port of solver_nc_jointaggr_ld.m: the load-dependent joint.
template<class T>
solver_nc_getprob (const qn::NetworkStruct< T > &sn, const NcSolverOptions &opt, std::size_t ist, const std::vector< int > &nir)
 Port of @@SolverNC/getProb.m: the DETAILED state probability at one station.
template<class T>
solver_nc_getprob_aggr (const qn::NetworkStruct< T > &sn, const NcSolverOptions &opt, std::size_t ist, const std::vector< int > &nir, double lG)
 Port of @@SolverNC/getProbAggr.m: the AGGREGATE probability at one station.
template<class T>
NcQueueLengthDist< T > solver_nc_getprob_marg (const qn::NetworkStruct< T > &sn, const NcSolverOptions &opt, std::size_t ist)
 Port of @@SolverNC/getProbMarg.m: the TOTAL queue-length distribution.
template<class T>
solver_nc_getprob_sys (const qn::NetworkStruct< T > &sn, const NcSolverOptions &opt, const MarginalState &nir)
 Port of @@SolverNC/getProbSys.m.
template<class T>
solver_nc_getprob_sys_aggr (const qn::NetworkStruct< T > &sn, const NcSolverOptions &opt, const MarginalState &nir)
 Port of @@SolverNC/getProbSysAggr.m.
template<class T>
solver_nc_jointmarg (const qn::NetworkStruct< T > &sn, const NcSolverOptions &opt, const std::vector< int > &nvec, const std::string &engine="exact", double *lG_out=nullptr)
 Joint probability that station i holds nvec[i] jobs IN TOTAL, all classes summed out.
template<class T>
solver_nc_getprob_sys_marg (const qn::NetworkStruct< T > &sn, const NcSolverOptions &opt, const std::vector< int > &nvec, const std::string &engine="exact")
 Port of @@SolverNC/getProbSysMarg.m.
template<class T>
NcRetrievalSolution< T > solver_nc_retrieval_analyzer (const qn::NetworkStruct< T > &sn, const NcSolverOptions &opt)
 Port of solver_nc_retrieval_analyzer.m.
template<class T>
bool nc_has_retrieval (const qn::NetworkStruct< T > &sn)
 True when the model's Cache carries a delayed-hit retrieval system.
std::vector< std::string > list_valid_methods ()
 Port of SolverNC.listValidMethods.
bool is_stochastic_method (const std::string &method)
 Port of SolverNC.isStochasticMethod.
template<class T>
std::string resolve_method (const qn::NetworkStruct< T > &L, const std::string &method)
 Port of SolverNC.resolveMethod: the feature-driven resolution of method='default'.
void check_method (const std::string &method)
 Port of runAnalyzerChecks' method gate: an unlisted method is refused.
template<class T>
bool nc_is_normal_usage (const qn::NetworkStruct< T > &sn)
 Is the closed model in NORMAL USAGE, the domain of the Mitra-McKenna PANACEA asymptotic expansion (J.
template<class T>
std::size_t nc_closed_queueing_stations (const qn::NetworkStruct< T > &sn)
 How many queueing (non-infinite-server) stations carry demand from a CLOSED chain?
template<class T>
std::string nc_method_refusal (const qn::NetworkStruct< T > &sn, const std::string &method, bool slotted=false, bool for_report=true)
 May method run on this model?
template<class T>
NcSolution< T > solver_nc_solve (const qn::NetworkStruct< T > &L_in, const NcSolverOptions &opt_in)
 The gates, the multiserver conversion and the dispatch of @@SolverNC/runAnalyzer.m, without the metric filter.
template<class T>
mva::AvgResult< T > solver_nc_run_analyzer (const qn::NetworkStruct< T > &L_in, const NcSolverOptions &opt_in)
 Port of @@SolverNC/runAnalyzer.m for the lang='matlab' path: solve, then apply the metric filter @@NetworkSolver/getAvg puts between the analyzer and the caller.
template<class T>
double solver_nc_lognormconst (const qn::NetworkStruct< T > &L, const NcSolverOptions &opt)
 Port of @@SolverNC/getProbNormConstAggr.m: the log normalizing constant.
template<class T>
NcSolution< T > solver_nc_sdr (const qn::NetworkStruct< T > &sn, const NcSolverOptions &opt)
 Solves a network whose entry centre routes by state-dependent routing.
template<class T>
NcSpnSolution< T > solver_nc_spn_analyzer (const qn::NetworkStruct< T > &sn, const NcSolverOptions &opt)
 Analyse a product-form stochastic Petri net.
template<class T>
NcSolution< T > solver_ncld (const qn::NetworkStruct< T > &sn_in, const NcSolverOptions &opt)
 Port of solver_ncld.m.

Typedef Documentation

◆ MarginalState

using line::nc::MarginalState = std::vector<std::vector<int>>

A state, as this port expresses it: nir[i][r] jobs of class r at station i.

This is State.toMarginal's second output and State.fromMarginal's input, i.e. the only part of the reference's state encoding these analyzers use. A NEGATIVE entry is the reference's "ignore this station" flag and is honoured.

Definition at line 77 of file solver_nc_prob.h.

Enumeration Type Documentation

◆ SchedStrategy

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

◆ check_method()

void line::nc::check_method ( const std::string & method)
inline

Port of runAnalyzerChecks' method gate: an unlisted method is refused.

Definition at line 184 of file solver_nc_runner.h.

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

Referenced by check_method(), and solver_nc_solve().

◆ is_stochastic_method()

bool line::nc::is_stochastic_method ( const std::string & method)
inline

Port of SolverNC.isStochasticMethod.

NC is deterministic except for the Monte Carlo integrators, the logistic sampler, the importance-sampling estimators and the Chen-O'Cinneide Markov chain Monte Carlo method, whose answer depends on the seed. The name is TOKENIZED on . and / so that a runtime-resolved name such as default/imci and a prefixed one such as nc.ls classify alike.

Definition at line 136 of file solver_nc_runner.h.

References is_stochastic_method().

Referenced by line::autosolver::auto_is_stochastic_method(), and is_stochastic_method().

◆ list_valid_methods()

std::vector< std::string > line::nc::list_valid_methods ( )
inline

Port of SolverNC.listValidMethods.

A LISTED NAME MUST ACTUALLY RUN, or be refused with a message that names the missing analyzer. erlangfp and mci (the loss-network Erlang fixed point and its Monte Carlo counterpart) DO run: a Finite Capacity Region is now representable – sn.regions and Network::add_region – and solver_nc_lossn_analyzer claims the model above the product-form and multiserver gates. A model that is not a loss network still reaches the refusal further down, which is the honest outcome and different from silently solving a model with its region ignored. comomld is not in the reference's list; it is accepted because the reference selects it internally from 'default'. ms names the same lossn_manjunath transform as exact on a loss network (solver_nc_lossn.h's own method name alias) and was missing here, which blocked it before it ever reached the analyzer that already accepts it.

Definition at line 84 of file solver_nc_runner.h.

References list_valid_methods().

Referenced by line::autosolver::auto_family_methods(), check_method(), list_valid_methods(), and line::NetworkSolver::list_valid_methods().

◆ nc_closed_queueing_stations()

template<class T>
std::size_t line::nc::nc_closed_queueing_stations ( const qn::NetworkStruct< T > & sn)

How many queueing (non-infinite-server) stations carry demand from a CLOSED chain?

That is the row count L reaches pfqn_nc and pfqn_comomrm_ld with, once the delay rows have been folded into Z and the zero-demand rows dropped. Zero when the model has no closed population at all.

Definition at line 362 of file solver_nc_runner.h.

References line::nc::GlobalConstants::FineTol, line::mva::ChainDemands< T >::Lchain, nc_closed_queueing_stations(), and line::mva::sn_get_demands_chain().

Referenced by nc_closed_queueing_stations(), and nc_method_refusal().

◆ nc_dispatch()

template<class T>
NcSolution< T > line::nc::nc_dispatch ( const qn::NetworkStruct< T > & sn,
const NcSolverOptions & opt )

Port of @@SolverNC/ncDispatch.m: the inner solve of the fork-join fixed point, which is the load-dependence test and nothing else.

Definition at line 220 of file nc_dispatch.h.

References nc_dispatch(), line::nc::NcSolution< T >::sol, solver_nc_analyzer(), solver_nc_dt(), solver_ncld_analyzer(), and line::util::LineConsole::step().

Referenced by nc_dispatch(), solver_nc_cacheqn_analyzer(), solver_nc_cacheqn_retrieval_analyzer(), and solver_nc_solve().

◆ nc_has_lossn_shape()

template<class T>
bool line::nc::nc_has_lossn_shape ( const qn::NetworkStruct< T > & sn)

True when the model has the SHAPE of a loss network – open, one region, one member station, that station an infinite server – whatever admission rule the region applies.

SEPARATE FROM THE RULE TEST ON PURPOSE. A shape test that also demanded DROP would make a WAITQ region on this very shape indistinguishable, to the caller, from a model with no region at all, and the runner would then answer it as an unconstrained network. The reference splits the two questions the same way: runAnalyzer.m:307-327 first recognises the shape, and only then branches on the rule, raising on WAITQ rather than falling through.

The member test is isinf(nservers), not nodetype == Delay, to match the reference. An infinite-server Queue has the shape and must reach the analyzer so its by-name refusal fires; excluding it here would silently hide it.

Definition at line 257 of file solver_nc_lossn.h.

References nc_has_lossn_shape(), and line::qn::JobClass::population.

Referenced by nc_has_lossn_shape(), nc_is_lossn_model(), and nc_method_refusal().

◆ nc_has_retrieval()

template<class T>
bool line::nc::nc_has_retrieval ( const qn::NetworkStruct< T > & sn)

True when the model's Cache carries a delayed-hit retrieval system.

Definition at line 305 of file solver_nc_retrieval.h.

References nc_has_retrieval().

Referenced by nc_has_retrieval(), and solver_nc_solve().

◆ nc_is_cacheqn()

template<class T>
bool line::nc::nc_is_cacheqn ( const qn::NetworkStruct< T > & sn)

True when the model has a Cache node and is not the Source-Cache-Sink shape.

Definition at line 187 of file solver_nc_cacheqn.h.

References nc_is_cacheqn(), and line::qn::NodeDef::nodetype.

Referenced by nc_is_cacheqn(), and solver_nc_solve().

◆ nc_is_dps_model()

template<class T>
bool line::nc::nc_is_dps_model ( const qn::NetworkStruct< T > & sn)

True when the model is the closed two-station network Morrison's expansion is derived for: one infinite-server (think) station and one single-server DPS station, exponential service, every class alternating between the two.

The shape is checked exactly, not approximately: outside it the expansion has no derivation behind it.

Definition at line 63 of file solver_nc_dps.h.

References nc_is_dps_model(), and line::qn::JobClass::population.

Referenced by nc_is_dps_model(), nc_method_refusal(), solver_nc_analyzer(), solver_nc_dps_analyzer(), and solver_nc_solve().

◆ nc_is_dt_model()

◆ nc_is_lossn_model()

template<class T>
bool line::nc::nc_is_lossn_model ( const qn::NetworkStruct< T > & sn)

True when the model is a loss network: the shape above, with EVERY class dropped at the region.

The DROP rule is what makes it a LOSS network rather than a blocking one. A WAITQ region holds the arrival back instead of discarding it, which is a queueing phenomenon the Erlang model has no state for, so it must not be routed here.

ALL classes, not merely one: the reference tests all(regionrule(1,:) == DROP). A region that discards one class and holds another back is a mixed system whose blocked class occupies the region while it waits, so the per-class loss probabilities the Erlang fixed point returns would not be the ones the model implies.

Definition at line 286 of file solver_nc_lossn.h.

References line::lang::DROP, nc_has_lossn_shape(), and nc_is_lossn_model().

Referenced by nc_is_lossn_model(), nc_method_refusal(), and solver_nc_solve().

◆ nc_is_noreentrant_cache()

template<class T>
bool line::nc::nc_is_noreentrant_cache ( const qn::NetworkStruct< T > & sn)

True when the model is exactly a Source, a Cache and a Sink.

Definition at line 389 of file solver_nc_cache.h.

References nc_is_noreentrant_cache(), line::qn::NodeDef::nodetype, and line::qn::JobClass::population.

Referenced by nc_is_noreentrant_cache(), nc_method_refusal(), and solver_nc_solve().

◆ nc_is_normal_usage()

template<class T>
bool line::nc::nc_is_normal_usage ( const qn::NetworkStruct< T > & sn)

Is the closed model in NORMAL USAGE, the domain of the Mitra-McKenna PANACEA asymptotic expansion (J.

ACM 33(3), 1986)?

Normal usage asks that every queueing centre absorb the load the think stations offer it: with rho_j0 = Ztot(j) the aggregate think demand of chain j, r_ij = L_ij / rho_j0 and mu_i(Ntot) the saturation rate,

alpha_i = 1 - (sum_j N_j r_ij) / mu_i(Ntot) > 0     at every centre i.

Outside it the {phi(n)} series DIVERGES, which is why pfqn_panaceald returns NaN there and pfqn_ncld turns that NaN into a refusal rather than a warning. It is a property of the DEMANDS and not of a declared construct, so it has no feature-registry name and cannot live in nc_feature_set.

The rates are the ones solver_ncld would build: one for an ordinary single server, min(n, c) for a finite multiserver (the conversion the runner performs on the 'panald' arm), and the declared lldscaling row when the model sets one. An infinite server is a think station and feeds Ztot.

Definition at line 309 of file solver_nc_runner.h.

References line::mva::ChainDemands< T >::Lchain, nc_is_normal_usage(), and line::mva::sn_get_demands_chain().

Referenced by nc_is_normal_usage(), and nc_method_refusal().

◆ nc_is_oi_model()

template<class T>
bool line::nc::nc_is_oi_model ( const qn::NetworkStruct< T > & sn)

Port of nc_is_oi_model.m: a closed network with at least one OI station and nothing but BCMP product-form stations besides.

The OI requirement is what keeps a pure-BCMP network on the ordinary (faster) normalizing-constant path rather than the lattice one.

Definition at line 297 of file solver_nc_oi.h.

References nc_is_oi_model(), line::qn::JobClass::population, and line::qn::station_swap_graph_is_zero().

Referenced by nc_is_oi_model(), nc_method_refusal(), solver_nc_analyzer(), and solver_nc_solve().

◆ nc_is_pas_model()

template<class T>
bool line::nc::nc_is_pas_model ( const qn::NetworkStruct< T > & sn)

Port of nc_is_pas_model.m: a closed two-station OI / P&S tandem.

The swap graph may be empty, since an OI queue is exactly the P&S specialization with a zero graph and pfqn_pas_is reduces to pfqn_oi_is there; the exact analyzer is what keeps a pure-OI tandem off this path on 'default' and 'exact'.

Definition at line 329 of file solver_nc_oi.h.

References nc_is_pas_model(), and line::qn::JobClass::population.

Referenced by nc_is_pas_model(), solver_nc_analyzer(), and solver_nc_solve().

◆ nc_method_refusal()

template<class T>
std::string line::nc::nc_method_refusal ( const qn::NetworkStruct< T > & sn,
const std::string & method,
bool slotted = false,
bool for_report = true )

May method run on this model?

"" when it may, otherwise the reason it may not, in the words the runner refuses with.

ONE PREDICATE, TWO CALLERS. solver_nc_solve asks it once, ahead of the dispatch, and throws on a non-empty answer; auto_family_refusal asks it so that auto_find_solver never offers a (family, method) pair that would throw, and so that the ranking never delegates to one. Two copies of these rules is precisely how the report and the run drift apart, which is the failure this function exists to prevent, so a new rule goes here and not at a call site.

ONLY WHAT THE FEATURE REGISTRY CANNOT NAME LIVES HERE. A feature set declares what the method ACCEPTS, so it can refuse a model for HAVING a construct and never for lacking one: "closed population only" and "no think time" are said in qn::nc_feature_set by dropping OpenClass and SchedStrategy_INF, while "requires a cache", "requires state-dependent routing", "requires a loss network", "requires exactly two stations" and "requires normal usage" have no such form and are decided here.

for_report says WHICH QUESTION IS BEING ASKED, and for two method names the two questions have different answers:

true – "should `auto_find_solver` offer this pair?" A pair that comes back as a table of zeros must not be offered, so the answer is no. false – "what does the reference DO when asked for it by name?" For 'mmint2' and 'gleint' outside their shape the reference deliberately WARNS AND RETURNS A ZERO TABLE (pfqn_nc.m, case {'mmint2','gleint'}: lG = [] and return, unconditionally), and a caller who names the method keeps that answer – which is what test_nc.cpp pins.

THE ASYMMETRY IS A RULING, NOT AN OVERSIGHT (2026-07-25, reaffirmed when this gate was added): the report answers "should this be offered" and the run answers "what does the reference do". 'comomld' is NOT in that bucket – pfqn_comomrm_ld refuses "The solver accepts at most a single queueing station." natively – so it is refused on both paths.

Parameters
snthe refreshed struct
methodthe concrete method name
slottedtrue on the discrete-time route, which answers for itself
for_reporttrue when the caller is the report, false when it is the run

Definition at line 429 of file solver_nc_runner.h.

References line::lang::FIFO, nc_closed_queueing_stations(), nc_has_lossn_shape(), nc_is_dps_model(), nc_is_lossn_model(), nc_is_noreentrant_cache(), nc_is_normal_usage(), nc_is_oi_model(), nc_method_refusal(), line::lang::Place, line::lang::RR, and sn_has_dps().

Referenced by line::autosolver::auto_family_refusal(), nc_method_refusal(), and solver_nc_solve().

◆ resolve_method()

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

Port of SolverNC.resolveMethod: the feature-driven resolution of method='default'.

An open network with any non-unit SCV that MEM can carry resolves to mem, because the normalizing-constant path would silently exponentialize it.

IT IS INERT WITH RESPECT TO THE ANALYZER, and deliberately so: MATLAB's @@SolverNC/runAnalyzer.m never consults resolveMethod, it reads options.method directly. Measured on an M/E2/1 (Source Exp(0.5), FCFS Erlang mean 0.5 scv 0.5), resolveMethod returns mem while SolverNC(model).getAvg reports default/exact. The function feeds the feature gate and the AUTO dispatch only, and this port matches that: nothing here calls it on the solve path. See register row N5.

Definition at line 171 of file solver_nc_runner.h.

References line::qn::NetworkStruct< T >::disabled, line::nc::GlobalConstants::FineTol, line::qn::NetworkStruct< T >::nclasses, line::qn::NetworkStruct< T >::nstations, resolve_method(), line::qn::NetworkStruct< T >::scv, and solver_nc_mem_supports().

Referenced by resolve_method().

◆ sn_get_product_form_params()

◆ sn_has_dps()

template<class T>
bool line::nc::sn_has_dps ( const qn::NetworkStruct< T > & sn)

True when any station of the network is scheduled DPS.

Definition at line 50 of file solver_nc_dps.h.

References sn_has_dps().

Referenced by nc_method_refusal(), and sn_has_dps().

◆ solver_nc()

template<class T>
NcSolution< T > line::nc::solver_nc ( const qn::NetworkStruct< T > & sn,
const NcSolverOptions & opt )

Port of solver_nc.m.

Parameters
snthe refreshed struct
optsolver controls
Returns
the class-level measures, the log normalizing constant and the concrete algorithm the constants were computed with

Definition at line 142 of file solver_nc.h.

References line::nc::NcSolution< T >::actualmethod, line::pfqn::NcOptions::aghq_nodes, line::mva::ChainDemands< T >::alpha, line::mva::ClassResults< T >::C, line::Matrix< T >::cols(), line::npfqn::NonexpApproxResult< T >::eta, line::nc::GlobalConstants::FineTol, line::npfqn::NonexpApproxResult< T >::gamma, line::mva::ChainDemands< T >::Lchain, line::pfqn::NcDispatchResult< T >::lG, line::Matrix< T >::Matrix(), line::pfqn::Mcmc, line::pfqn::NcOptions::mcmc_batches, line::pfqn::NcOptions::mcmc_burnin, line::pfqn::NcDispatchResult< T >::method, line::npfqn::npfqn_nonexp_approx(), line::pfqn::pfqn_nc(), line::mva::ClassResults< T >::Q, line::pfqn::NcDispatchResult< T >::Q, line::mva::ClassResults< T >::R, line::Matrix< T >::rows(), line::pfqn::NcOptions::samples, line::pfqn::NcOptions::seed, line::mva::sn_deaggregate_chain_results(), line::mva::sn_get_demands_chain(), line::nc::NcSolution< T >::sol, solver_nc(), solver_nc_lcfsqn(), solver_nc_sdr(), line::mva::ChainDemands< T >::ST, line::npfqn::NonexpApproxResult< T >::ST, line::mva::ChainDemands< T >::STchain, line::nc::NcSolution< T >::STeff, line::pfqn::NcOptions::tol, line::mva::ClassResults< T >::Tp, line::mva::ClassResults< T >::U, line::UnsupportedError::UnsupportedError(), line::pfqn::NcDispatchResult< T >::valid, line::mva::ChainDemands< T >::Vchain, line::mva::ClassResults< T >::X, and line::pfqn::NcDispatchResult< T >::X.

Referenced by solver_nc(), solver_nc_analyzer(), and solver_nc_jointaggr().

◆ solver_nc_analyzer()

◆ solver_nc_busyp()

template<class T>
std::vector< double > line::nc::solver_nc_busyp ( const qn::NetworkStruct< T > & sn,
const std::vector< std::size_t > & subnet,
const std::vector< std::size_t > & orders )

Mean busy period of order n for a set of stations.

Parameters
snthe network structure, single-chain
subnetzero-based STATION indexes forming the subnetwork
ordersbusy period orders, 1 for the ordinary busy period
Returns
one duration per requested order

Definition at line 65 of file solver_nc_busyp.h.

References line::pfqn::BusyPeriodResult::b, line::InputError::InputError(), line::mva::ChainDemands< T >::Nchain, line::pfqn::pfqn_busyp(), line::api::SnRtStations< T >::rtst, line::mva::sn_get_demands_chain(), line::api::sn_rt_stations(), solver_nc_busyp(), line::lang::Source, line::mva::ChainDemands< T >::STchain, line::UnsupportedError::UnsupportedError(), line::mva::ChainDemands< T >::Vchain, and line::api::SnRtStations< T >::Vst.

Referenced by solver_nc_busyp().

◆ solver_nc_cache_analyzer()

template<class T>
NcCacheSolution< T > line::nc::solver_nc_cache_analyzer ( const qn::NetworkStruct< T > & sn,
const NcSolverOptions & opt )

Port of solver_nc_cache_analyzer.m.

Parameters
snthe refreshed struct; must be a Source-Cache-Sink model
optsolver controls; method selects exact / sampling / spm

Definition at line 111 of file solver_nc_cache.h.

References line::qn::CacheParam< T >::accost, line::cache::cache_cost(), line::cache::cache_cost_pathcheck(), line::cache::cache_gamma_lp(), line::cache::cache_miss_is(), line::cache::cache_miss_spm(), line::cache::cache_prob_erec(), line::cache::cache_prob_is(), line::cache::cache_prob_spm(), line::cache::cache_spm_size(), line::qn::CacheParam< T >::costcap, line::nc::NcCacheSolution< T >::costcap_blocked, line::nc::NcCacheSolution< T >::costcap_method_switched, line::lang::FIFO, line::cache::CacheGammaResult< T >::gamma, line::qn::CacheParam< T >::hitclass, line::nc::NcCacheSolution< T >::hitprob, line::nc::NcCacheSolution< T >::hitproblist, line::InputError::InputError(), line::qn::CacheParam< T >::itemcap, line::nc::NcCacheSolution< T >::itemprob, line::qn::CacheParam< T >::itemsize, line::nc::NcCacheSolution< T >::listcost, line::Matrix< T >::Matrix(), line::qn::CacheParam< T >::missclass, line::nc::NcCacheSolution< T >::missprob, line::nc::NcCacheSolution< T >::missrate, line::cache::CacheMissIsResult< T >::MU, line::cache::CacheMissSpmResult< T >::MU, line::qn::CacheParam< T >::nitems, line::cache::CacheGammaResult< T >::parent, line::cache::CacheSpmSizeResult< T >::pij, line::nc::NcCacheSolution< T >::pij, line::qn::CacheParam< T >::pread, line::qn::CacheParam< T >::replacestrat, line::lang::RR, line::nc::NcCacheSolution< T >::sol, solver_nc_cache_analyzer(), and line::UnsupportedError::UnsupportedError().

Referenced by solver_nc_cache_analyzer(), and solver_nc_solve().

◆ solver_nc_cacheqn_analyzer()

◆ solver_nc_cacheqn_retrieval_analyzer()

◆ solver_nc_cdf_respt()

◆ solver_nc_conv()

◆ solver_nc_dps_analyzer()

template<class T>
NcSolution< T > line::nc::solver_nc_dps_analyzer ( const qn::NetworkStruct< T > & sn,
const NcSolverOptions & opt )

Analyzes the closed think+DPS network.

Parameters
snthe network structure, of the shape nc_is_dps_model accepts
optsolver options
Returns
the mean performance measures, with lG = NaN

Definition at line 124 of file solver_nc_dps.h.

References line::nc::NcSolution< T >::actualmethod, line::InputError::InputError(), nc_is_dps_model(), line::npfqn::npfqn_dps_morrison(), line::npfqn::DpsMorrisonResult< T >::Q, line::nc::NcSolution< T >::sol, solver_nc_dps_analyzer(), and line::UnsupportedError::UnsupportedError().

Referenced by solver_nc_analyzer(), solver_nc_dps_analyzer(), and solver_nc_solve().

◆ solver_nc_dt()

template<class T>
NcSolution< T > line::nc::solver_nc_dt ( const qn::NetworkStruct< T > & sn,
const NcSolverOptions & opt )

Exact discrete-time analysis of sn.

On the cycle route the per-class split is proportional to the per-class population. Service in the cycle is type independent and FCFS forbids overtaking, so the cyclic order of the jobs is frozen; the marginal law of the queue lengths carries no class information, and the long-run share of station j held by chain g is its population share N_g/N. That is the sense in which section 3.2 of the reference calls the multichain case a direct adaptation of the unichain one.

Definition at line 364 of file solver_nc_dt.h.

References line::nc::NcSolution< T >::actualmethod, line::nc::DtModel< T >::arrival_prob, line::nc::DtModel< T >::capacity, line::dpfqn::dpfqn_nc(), line::dpfqn::dpfqn_ncld(), line::dqsys::dqsys_bernoulli1(), line::InputError::InputError(), line::nc::DtModel< T >::kind, line::Matrix< T >::Matrix(), line::dqsys::Bernoulli1Result< T >::meanQueueLength, line::dqsys::Bernoulli1Result< T >::meanSojournTime, nc_is_dt_model(), line::dqsys::Bernoulli1Result< T >::normConst, line::nc::DtModel< T >::order, line::nc::DtModel< T >::population, line::nc::DtModel< T >::reason, line::nc::DtModel< T >::service, line::nc::DtModel< T >::service_single, line::nc::NcSolution< T >::sol, solver_nc_dt(), line::nc::DtModel< T >::source, line::nc::DtModel< T >::station, line::dqsys::Bernoulli1Result< T >::throughput, and line::dqsys::Bernoulli1Result< T >::utilization.

Referenced by nc_dispatch(), solver_nc_analyzer(), solver_nc_dt(), and solver_nc_solve().

◆ solver_nc_getprob()

template<class T>
T line::nc::solver_nc_getprob ( const qn::NetworkStruct< T > & sn,
const NcSolverOptions & opt,
std::size_t ist,
const std::vector< int > & nir )

Port of @@SolverNC/getProb.m: the DETAILED state probability at one station.

RETURNS THE LOG PROBABILITY, NOT THE PROBABILITY, DESPITE THE NAME. The value is therefore NEGATIVE and is not in [0,1]; exp() recovers the probability. On Delay(1)+PS(2) at N=3 with two jobs at the queue this returns -1.15267950993839, and the probability is exp of it, 0.31578947368.

This is a DELIBERATE reproduction of the reference, not an oversight. solver_nc_marg.m returns lPr as its first output and @@SolverNC/getProb.m passes it through under the name Pnir without exponentiating. The port originally returned the probability and exposed the log separately; the user ruled for strict bug-for-bug parity with MATLAB over the safer API, and this is that decision. See register row N8, which records the argument on both sides.

getProbAggr is unaffected and DOES return a probability, so the two accessors disagree in kind – another reason the reference behaviour is surprising rather than merely unusual. Use solver_nc_marg directly for a result carrying both P and logP.

Parameters
ist1-based station index
nirthe per-class occupancy at that station; other stations are left at the reference's "ignore" flag, since the detailed marginal is reported per station and only this one is asked for
snthe refreshed network struct
optSolverNC's options
Returns
the LOG of the probability

Definition at line 610 of file solver_nc_prob.h.

References line::InputError::InputError(), solver_nc_getprob(), and solver_nc_marg().

Referenced by solver_nc_getprob().

◆ solver_nc_getprob_aggr()

template<class T>
T line::nc::solver_nc_getprob_aggr ( const qn::NetworkStruct< T > & sn,
const NcSolverOptions & opt,
std::size_t ist,
const std::vector< int > & nir,
double lG )

Port of @@SolverNC/getProbAggr.m: the AGGREGATE probability at one station.

Definition at line 623 of file solver_nc_prob.h.

References line::InputError::InputError(), solver_nc_getprob_aggr(), and solver_nc_margaggr().

Referenced by solver_nc_getprob_aggr(), and solver_nc_getprob_marg().

◆ solver_nc_getprob_marg()

template<class T>
NcQueueLengthDist< T > line::nc::solver_nc_getprob_marg ( const qn::NetworkStruct< T > & sn,
const NcSolverOptions & opt,
std::size_t ist )

Port of @@SolverNC/getProbMarg.m: the TOTAL queue-length distribution.

Two routes, as in the reference. Under method='comom' the whole vector comes from one pfqn_procomom solve; otherwise every total n is written as a sum over the per-class partitions of n and each partition goes through the aggregate marginal. The normalizing constant is computed ONCE and reused across the partitions, which is the reference's caching and matters here: the enumeration is otherwise quadratic in constants.

Definition at line 650 of file solver_nc_prob.h.

References line::Matrix< T >::cols(), line::InputError::InputError(), line::mva::ChainDemands< T >::Lchain, line::nc::NcQueueLengthDist< T >::logP, line::nc::NcSolverOptions::method, line::mva::ChainDemands< T >::Nchain, line::nc::NcQueueLengthDist< T >::P, line::pfqn::pfqn_ncld(), line::pfqn::pfqn_procomom(), line::mva::sn_get_demands_chain(), solver_nc_getprob_aggr(), solver_nc_getprob_marg(), and line::UnsupportedError::UnsupportedError().

Referenced by solver_nc_getprob_marg().

◆ solver_nc_getprob_sys()

template<class T>
T line::nc::solver_nc_getprob_sys ( const qn::NetworkStruct< T > & sn,
const NcSolverOptions & opt,
const MarginalState & nir )

Port of @@SolverNC/getProbSys.m.

Definition at line 793 of file solver_nc_prob.h.

References solver_nc_getprob_sys(), and solver_nc_joint().

Referenced by solver_nc_getprob_sys().

◆ solver_nc_getprob_sys_aggr()

template<class T>
T line::nc::solver_nc_getprob_sys_aggr ( const qn::NetworkStruct< T > & sn,
const NcSolverOptions & opt,
const MarginalState & nir )

Port of @@SolverNC/getProbSysAggr.m.

Definition at line 800 of file solver_nc_prob.h.

References solver_nc_getprob_sys_aggr(), and solver_nc_jointaggr().

Referenced by solver_nc_getprob_sys_aggr().

◆ solver_nc_getprob_sys_marg()

template<class T>
T line::nc::solver_nc_getprob_sys_marg ( const qn::NetworkStruct< T > & sn,
const NcSolverOptions & opt,
const std::vector< int > & nvec,
const std::string & engine = "exact" )

Port of @@SolverNC/getProbSysMarg.m.

Compare with solver_nc_getprob_sys_aggr, which fixes the PER-CLASS population of every station and is a product form; each value returned here is the sum of that one over every per-class table with these row sums.

Definition at line 913 of file solver_nc_prob.h.

References solver_nc_getprob_sys_marg(), and solver_nc_jointmarg().

Referenced by solver_nc_getprob_sys_marg().

◆ solver_nc_joint()

template<class T>
T line::nc::solver_nc_joint ( const qn::NetworkStruct< T > & sn,
const NcSolverOptions & opt,
const MarginalState & nir,
double * lG_out )

Port of solver_nc_joint.m: the probability of the WHOLE system state.

The per-station factor is the chain-level balance function corrected by the class-within-chain split lg0_i - lG0_i, which is what turns a chain-level constant into a class-level one.

Definition at line 441 of file solver_nc_prob.h.

References line::mva::ChainDemands< T >::alpha, line::mva::ChainDemands< T >::Lchain, line::mva::ChainDemands< T >::Nchain, line::pfqn::pfqn_ncld(), line::pfqn::NcOptions::samples, line::pfqn::NcOptions::seed, line::mva::sn_get_demands_chain(), solver_nc_joint(), line::mva::ChainDemands< T >::STchain, line::pfqn::NcOptions::tol, and line::UnsupportedError::UnsupportedError().

Referenced by solver_nc_getprob_sys(), solver_nc_joint(), and solver_nc_jointaggr_ld().

◆ solver_nc_jointaggr()

template<class T>
T line::nc::solver_nc_jointaggr ( const qn::NetworkStruct< T > & sn,
const NcSolverOptions & opt,
const MarginalState & nir,
double * lG_out )

Port of solver_nc_jointaggr.m: the aggregate joint.

The reference takes its constant from pfqn_ncld under method='exact' and from solver_nc otherwise, noting in a comment that the second is "unclear ... as it doesn't consider the transformation to ld model". Both paths are reproduced, because the choice changes the answer and the caller's method is what selects it.

Definition at line 499 of file solver_nc_prob.h.

References line::mva::ChainDemands< T >::Lchain, line::mva::ChainDemands< T >::Nchain, line::pfqn::pfqn_ncld(), line::pfqn::NcOptions::samples, line::pfqn::NcOptions::seed, line::mva::sn_get_demands_chain(), line::nc::NcSolution< T >::sol, solver_nc(), solver_nc_jointaggr(), line::nc::NcSolution< T >::STeff, line::pfqn::NcOptions::tol, and line::UnsupportedError::UnsupportedError().

Referenced by solver_nc_getprob_sys_aggr(), and solver_nc_jointaggr().

◆ solver_nc_jointaggr_ld()

template<class T>
T line::nc::solver_nc_jointaggr_ld ( const qn::NetworkStruct< T > & sn,
const NcSolverOptions & opt,
const MarginalState & nir,
double * lG_out )

Port of solver_nc_jointaggr_ld.m: the load-dependent joint.

Identical to solver_nc_joint except that the chain demand comes straight from sn_get_demands_chain rather than being rebuilt, which is what makes it the load-dependent variant in the reference.

Definition at line 571 of file solver_nc_prob.h.

References solver_nc_joint(), and solver_nc_jointaggr_ld().

Referenced by solver_nc_jointaggr_ld().

◆ solver_nc_jointmarg()

template<class T>
T line::nc::solver_nc_jointmarg ( const qn::NetworkStruct< T > & sn,
const NcSolverOptions & opt,
const std::vector< int > & nvec,
const std::string & engine = "exact",
double * lG_out = nullptr )

Joint probability that station i holds nvec[i] jobs IN TOTAL, all classes summed out.

This is NOT solver_nc_jointaggr, which fixes the per-class population of every station: each state here is the SUM of jointaggr over the whole fibre of per-class tables with these row sums, and that fibre grows combinatorially. pfqn_jointmarg evaluates the sum in closed form as a permanent of the demand matrix replicated once per job.

Parameters
nvec(M) per-station total job counts
engine"exact" (default), "spm", "bethe", "heur", "huberlaw" or "adapart"; see pfqn_jointmarg for what each guarantees
lG_outreceives the log normalizing constant when not null

Definition at line 853 of file solver_nc_prob.h.

References line::Matrix< T >::cols(), line::pfqn::NcResult< T >::G, line::InputError::InputError(), line::mva::ChainDemands< T >::Lchain, line::pfqn::NcResult< T >::lG, line::Matrix< T >::Matrix(), line::mva::ChainDemands< T >::Nchain, line::pfqn::pfqn_ca(), line::pfqn::pfqn_jointmarg(), line::Matrix< T >::rows(), line::mva::sn_get_demands_chain(), and solver_nc_jointmarg().

Referenced by solver_nc_getprob_sys_marg(), and solver_nc_jointmarg().

◆ solver_nc_lcfsqn()

template<class T>
NcSolution< T > line::nc::solver_nc_lcfsqn ( const qn::NetworkStruct< T > & sn,
const NcSolverOptions & opt,
std::size_t lcfsStat,
std::size_t lcfsprStat )

Port of solver_nc_lcfsqn.m.

Parameters
snthe refreshed struct
optsolver controls; unused, the closed form has no tuning
lcfsStat1-based index of the LCFS station
lcfsprStat1-based index of the LCFS-PR station

Definition at line 95 of file solver_nc_lcfsqn.h.

References line::nc::NcSolution< T >::actualmethod, line::num_factorial(), line::num_pow_int(), line::ones(), line::pfqn::pfqn_lcfsqn_ca(), line::pfqn::pfqn_perm(), line::nc::NcSolution< T >::sol, solver_nc_lcfsqn(), and line::UnsupportedError::UnsupportedError().

Referenced by solver_nc(), and solver_nc_lcfsqn().

◆ solver_nc_lognormconst()

template<class T>
double line::nc::solver_nc_lognormconst ( const qn::NetworkStruct< T > & L,
const NcSolverOptions & opt )

Port of @@SolverNC/getProbNormConstAggr.m: the log normalizing constant.

Definition at line 1008 of file solver_nc_runner.h.

References solver_nc_lognormconst(), and solver_nc_solve().

Referenced by solver_nc_lognormconst().

◆ solver_nc_lossn_analyzer()

template<class T>
NcLossnSolution< T > line::nc::solver_nc_lossn_analyzer ( const qn::NetworkStruct< T > & sn,
const NcSolverOptions & opt )

◆ solver_nc_marg()

template<class T>
NcMargResult< T > line::nc::solver_nc_marg ( const qn::NetworkStruct< T > & sn,
const NcSolverOptions & opt,
const MarginalState & nir,
double lG )

Port of solver_nc_marg.m: the DETAILED marginal, which weighs the station's internal arrangement and therefore depends on its discipline.

TWO BRANCHES ARE REFUSED BY NAME because a per-class marginal cannot carry what they read, and answering them from the default arrangement would be a fabricated number:

SIRO wants the CLASS OF THE JOB IN SERVICE (sivec), whose term is log(n_ci / sum n). A marginal says how many jobs of each class are present, not which one holds the server. PS and INF want the PHASE-LEVEL occupancy (kirvec) when service is not exponential. Under exponential service kirvec IS the marginal, and that case is computed exactly.

FCFS additionally carries the reference's own preconditions – exponential service, and identical mean service time across the classes – without which the station is not product-form and the reference errors out.

Definition at line 293 of file solver_nc_prob.h.

References line::Matrix< T >::cols(), line::nc::GlobalConstants::FineTol, line::mva::ChainDemands< T >::Lchain, line::nc::NcMargResult< T >::lG, line::nc::NcMargResult< T >::logP, line::mva::ChainDemands< T >::Nchain, line::NumericError::NumericError(), line::nc::NcMargResult< T >::P, line::pfqn::pfqn_ncld(), line::pfqn::NcOptions::samples, line::pfqn::NcOptions::seed, line::mva::sn_get_demands_chain(), solver_nc_marg(), line::pfqn::NcOptions::tol, and line::UnsupportedError::UnsupportedError().

Referenced by solver_nc_getprob(), and solver_nc_marg().

◆ solver_nc_margaggr()

template<class T>
NcMargResult< T > line::nc::solver_nc_margaggr ( const qn::NetworkStruct< T > & sn,
const NcSolverOptions & opt,
const MarginalState & nir,
double lG )

Port of solver_nc_margaggr.m.

The purely AGGREGATE marginal: the station's balance function evaluated at the per-class vector, times the constant of the network without it. It reads nothing but the marginal, so it carries no discipline restriction at all – which is why getProbAggr, getProbMarg and getProbSysAggr are unrestricted while getProb is not.

Parameters
snthe refreshed struct
optsolver controls
nirthe state; a station whose row has a NEGATIVE entry is skipped and reported as probability zero, which is the reference's flag
lGa precomputed log normalizing constant; NaN to compute one

Definition at line 212 of file solver_nc_prob.h.

References line::mva::ChainDemands< T >::Lchain, line::nc::NcMargResult< T >::lG, line::nc::NcMargResult< T >::logP, line::mva::ChainDemands< T >::Nchain, line::nc::NcMargResult< T >::P, line::pfqn::pfqn_ncld(), line::pfqn::NcOptions::samples, line::pfqn::NcOptions::seed, line::mva::sn_get_demands_chain(), solver_nc_margaggr(), line::pfqn::NcOptions::tol, and line::UnsupportedError::UnsupportedError().

Referenced by solver_nc_getprob_aggr(), and solver_nc_margaggr().

◆ solver_nc_mem()

◆ solver_nc_mem_supports()

template<class T>
MemSupport line::nc::solver_nc_mem_supports ( const qn::NetworkStruct< T > & sn)

Port of solver_nc_mem_supports.m.

Parameters
snthe refreshed struct
Returns
whether MEM applies, the first violated rule if not, and whether the model needs the finite-buffer (blocking) algorithm

Definition at line 111 of file solver_nc_mem.h.

References line::lang::BAS, line::nc::MemSupport::blocking, line::lang::DROP, line::qn::NodeDef::nodetype, line::qn::JobClass::population, line::nc::MemSupport::reason, solver_nc_mem_supports(), and line::nc::MemSupport::supported.

Referenced by resolve_method(), solver_nc_mem(), solver_nc_mem_supports(), and solver_nc_solve().

◆ solver_nc_oi_analyzer()

template<class T>
NcSolution< T > line::nc::solver_nc_oi_analyzer ( const qn::NetworkStruct< T > & sn,
const NcSolverOptions & opt )

◆ solver_nc_pas_is_analyzer()

template<class T>
NcSolution< T > line::nc::solver_nc_pas_is_analyzer ( const qn::NetworkStruct< T > & sn,
const NcSolverOptions & opt )

◆ solver_nc_retrieval_analyzer()

template<class T>
NcRetrievalSolution< T > line::nc::solver_nc_retrieval_analyzer ( const qn::NetworkStruct< T > & sn,
const NcSolverOptions & opt )

Port of solver_nc_retrieval_analyzer.m.

Parameters
snthe refreshed struct; the Cache must carry a retrieval system
optsolver controls

Definition at line 80 of file solver_nc_retrieval.h.

References line::retrieval::cache_retrieval_inputs(), line::nc::NcRetrievalSolution< T >::delayedprob, line::retrieval::RetrievalInputs< T >::eta, line::retrieval::RetrievalInputs< T >::gamma, line::qn::CacheParam< T >::hitclass, line::nc::NcRetrievalSolution< T >::hitprob, line::nc::NcRetrievalSolution< T >::hitproblist, line::retrieval::IS, line::nc::NcRetrievalSolution< T >::itemprob, line::retrieval::RetrievalInputs< T >::lambda, line::nc::NcRetrievalSolution< T >::latency, line::retrieval::RetrievalRayintResult< T >::log_e, line::retrieval::RetrievalInputs< T >::m, line::Matrix< T >::Matrix(), line::qn::CacheParam< T >::missclass, line::nc::NcRetrievalSolution< T >::missprob, line::qn::NodeDef::nodetype, line::retrieval::RetrievalMetricsResult< T >::pdh, line::retrieval::RetrievalMetricsResult< T >::phit, line::retrieval::RetrievalMetricsResult< T >::pmiss, line::retrieval::RetrievalInputs< T >::queue_nodes, line::retrieval::RetrievalInputs< T >::R, line::retrieval::RetrievalInputs< T >::read_class, line::retrieval::retrieval_metrics(), line::retrieval::retrieval_nc(), line::retrieval::retrieval_rayint(), line::nc::NcRetrievalSolution< T >::sol, line::solve(), solver_nc_retrieval_analyzer(), line::qn::NodeDef::station, line::retrieval::RetrievalInputs< T >::station, line::retrieval::RetrievalStationPH< T >::type, line::UnsupportedError::UnsupportedError(), and line::retrieval::RetrievalRayintResult< T >::xi.

Referenced by solver_nc_retrieval_analyzer(), and solver_nc_solve().

◆ solver_nc_run_analyzer()

template<class T>
mva::AvgResult< T > line::nc::solver_nc_run_analyzer ( const qn::NetworkStruct< T > & L_in,
const NcSolverOptions & opt_in )

Port of @@SolverNC/runAnalyzer.m for the lang='matlab' path: solve, then apply the metric filter @@NetworkSolver/getAvg puts between the analyzer and the caller.

Definition at line 935 of file solver_nc_runner.h.

References line::mva::AvgResult< T >::actualmethod, line::nc::NcSolution< T >::actualmethod, line::mva::AvgResult< T >::AN, line::mva::ArvR, line::mva::MvaSolution< T >::C, line::mva::AvgResult< T >::cache, line::nc::NcSolution< T >::cache, line::mva::AvgResult< T >::CN, line::mva::filter_metric(), line::nc::GlobalConstants::FineTol, line::qn::NetworkStruct< T >::has_immediate_feedback(), line::mva::AvgResult< T >::iter, line::mva::MvaSolution< T >::iter, line::mva::MvaSolution< T >::lG, line::mva::AvgResult< T >::listcost, line::nc::NcSolution< T >::listcost, line::mva::AvgResult< T >::lognormconst, line::mva::AvgResult< T >::method, line::nc::NcSolverOptions::method, line::qn::NetworkStruct< T >::nclasses, line::qn::NetworkStruct< T >::nstations, line::mva::MvaSolution< T >::Q, line::mva::QLen, line::mva::AvgResult< T >::QN, line::mva::MvaSolution< T >::R, line::nc::NcSolution< T >::refreshed_struct, line::mva::ResidT, line::mva::RespT, line::mva::AvgResult< T >::RN, line::mva::sn_get_arvr_from_tput(), line::mva::sn_get_residt_from_respt(), line::nc::NcSolution< T >::sol, solver_nc_run_analyzer(), solver_nc_solve(), line::qn::NetworkStruct< T >::stations, line::util::LineConsole::step(), line::mva::AvgResult< T >::TN, line::mva::MvaSolution< T >::Tp, line::mva::Tput, line::mva::MvaSolution< T >::U, line::mva::AvgResult< T >::UN, line::mva::Util, line::mva::AvgResult< T >::warning, line::nc::NcSolution< 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_nc_run_analyzer(), and line::uq::uq_stage_solver().

◆ solver_nc_sdr()

template<class T>
NcSolution< T > line::nc::solver_nc_sdr ( const qn::NetworkStruct< T > & sn,
const NcSolverOptions & opt )

◆ solver_nc_sjrnt()

template<class T>
CdfRespTResult< T > line::nc::solver_nc_sjrnt ( const qn::NetworkStruct< T > & sn,
const NcSolverOptions & opt )

Port of @@SolverNC/getSjrnT.m: an alias of getCdfRespT.

Definition at line 284 of file solver_nc_cdf.h.

References solver_nc_cdf_respt(), and solver_nc_sjrnt().

Referenced by solver_nc_sjrnt().

◆ solver_nc_solve()

template<class T>
NcSolution< T > line::nc::solver_nc_solve ( const qn::NetworkStruct< T > & L_in,
const NcSolverOptions & opt_in )

The gates, the multiserver conversion and the dispatch of @@SolverNC/runAnalyzer.m, without the metric filter.

Kept separate so that the reported log normalizing constant comes from the SAME model the metrics do: reaching the dispatch without the conversion above would evaluate the constant of the Seidmann-approximated network while the table reported the load-dependent one.

A model with a Fork is solved through the shared fork-join fixed point (fj_driver.h), which drives nc_dispatch as its inner solve on the transformed model; a model without one runs the dispatch exactly once.

Definition at line 641 of file solver_nc_runner.h.

References line::nc::NcSolution< T >::actualmethod, line::mva::MvaOptions::base_has_fork, line::nc::NcSolverOptions::base_has_fork, line::nc::MemSupport::blocking, line::nc::NcSolution< T >::cache, line::qn::check_binding_capacity(), check_method(), line::nc::NcCacheqnRetrievalSolution< T >::delayedprob, line::nc::NcRetrievalSolution< T >::delayedprob, line::qn::feature_gate(), line::nc::GlobalConstants::FineTol, line::mva::fj_fixed_point(), line::mva::fj_fork_join_transform(), line::mva::MvaOptions::fork_join, line::qn::NetworkStruct< T >::has_fork(), line::qn::NetworkStruct< T >::has_product_form(), line::nc::NcCacheqnRetrievalSolution< T >::hitprob, line::nc::NcCacheqnSolution< T >::hitprob, line::nc::NcCacheSolution< T >::hitprob, line::nc::NcRetrievalSolution< T >::hitprob, line::nc::NcCacheqnRetrievalSolution< T >::hitproblist, line::nc::NcCacheSolution< T >::hitproblist, line::nc::NcRetrievalSolution< T >::hitproblist, line::nc::NcCacheqnSolution< T >::itemprob, line::nc::NcCacheSolution< T >::itemprob, line::nc::NcRetrievalSolution< T >::itemprob, line::mva::MvaOptions::iter_max, line::mva::MvaOptions::iter_tol, line::nc::NcCacheqnRetrievalSolution< T >::latency, line::nc::NcRetrievalSolution< T >::latency, line::nc::NcCacheSolution< T >::listcost, line::qn::Station< T >::lldscaling, line::mva::MvaOptions::method, line::nc::NcSolverOptions::method, line::nc::NcCacheqnRetrievalSolution< T >::missprob, line::nc::NcCacheqnSolution< T >::missprob, line::nc::NcCacheSolution< T >::missprob, line::nc::NcRetrievalSolution< T >::missprob, nc_dispatch(), line::qn::nc_feature_set(), nc_has_retrieval(), nc_is_cacheqn(), nc_is_dps_model(), nc_is_lossn_model(), nc_is_noreentrant_cache(), nc_is_oi_model(), nc_is_pas_model(), nc_method_refusal(), line::qn::NetworkStruct< T >::nodes, line::qn::Station< T >::nservers, line::qn::NetworkStruct< T >::nstations, line::lang::Place, line::nc::NcCacheqnSolution< T >::refreshed, line::nc::NcSolution< T >::refreshed_struct, line::nc::NcSolverOptions::slotted, line::nc::NcCacheqnRetrievalSolution< T >::sol, line::nc::NcCacheqnSolution< T >::sol, line::nc::NcCacheSolution< T >::sol, line::nc::NcRetrievalSolution< T >::sol, line::nc::NcSolution< T >::sol, solver_nc_analyzer(), solver_nc_cache_analyzer(), solver_nc_cacheqn_analyzer(), solver_nc_cacheqn_retrieval_analyzer(), solver_nc_dps_analyzer(), solver_nc_dt(), solver_nc_lossn_analyzer(), solver_nc_mem_supports(), solver_nc_oi_analyzer(), solver_nc_retrieval_analyzer(), solver_nc_solve(), solver_nc_spn_analyzer(), solver_ncld_analyzer(), line::qn::NetworkStruct< T >::stations, line::nc::MemSupport::supported, line::mva::MvaOptions::tol, line::UnsupportedError::UnsupportedError(), and line::nc::NcSolution< T >::warning.

Referenced by solver_nc_lognormconst(), solver_nc_run_analyzer(), and solver_nc_solve().

◆ solver_nc_spn_analyzer()

template<class T>
NcSpnSolution< T > line::nc::solver_nc_spn_analyzer ( const qn::NetworkStruct< T > & sn,
const NcSolverOptions & opt )

◆ solver_ncld()

template<class T>
NcSolution< T > line::nc::solver_ncld ( const qn::NetworkStruct< T > & sn_in,
const NcSolverOptions & opt )

Port of solver_ncld.m.

Parameters
sn_inthe refreshed struct; its lldscaling is completed in place on a two-station multiserver model, exactly as the reference does
optsolver controls

Definition at line 133 of file solver_ncld.h.

References line::nc::NcSolution< T >::actualmethod, line::mva::ChainDemands< T >::alpha, line::mva::ClassResults< T >::C, line::pfqn::FncResult< T >::c, line::Matrix< T >::cols(), line::npfqn::NonexpApproxResult< T >::eta, line::npfqn::NonexpApproxResult< T >::gamma, line::mva::ChainDemands< T >::Lchain, line::pfqn::NcldmxResult< T >::lG, line::pfqn::NcldResult< T >::lG, line::pfqn::NcldResult< T >::method, line::pfqn::FncResult< T >::mu, line::npfqn::npfqn_nonexp_approx(), line::pfqn::OPEN_CLASS, line::pfqn::pfqn_fnc(), line::pfqn::pfqn_mushift(), line::pfqn::pfqn_ncld(), line::pfqn::pfqn_ncldmx(), line::qn::JobClass::population, line::mva::ClassResults< T >::Q, line::pfqn::NcldmxResult< T >::QN, line::mva::ClassResults< T >::R, line::pfqn::NcOptions::samples, line::pfqn::NcOptions::seed, line::mva::sn_deaggregate_chain_results(), line::mva::sn_get_demands_chain(), line::nc::NcSolution< T >::sol, solver_nc_conv(), solver_ncld(), line::mva::ChainDemands< T >::ST, line::npfqn::NonexpApproxResult< T >::ST, line::mva::ChainDemands< T >::STchain, line::nc::NcSolution< T >::STeff, line::pfqn::NcOptions::tol, line::mva::ClassResults< T >::Tp, line::mva::ClassResults< T >::U, line::UnsupportedError::UnsupportedError(), line::mva::ChainDemands< T >::Vchain, line::mva::ClassResults< T >::X, and line::pfqn::NcldmxResult< T >::XN.

Referenced by solver_ncld(), and solver_ncld_analyzer().

◆ solver_ncld_analyzer()

template<class T>
NcSolution< T > line::nc::solver_ncld_analyzer ( const qn::NetworkStruct< T > & sn,
const NcSolverOptions & opt )

Port of solver_ncld_analyzer.m: the load-dependent analyzer, which is solver_ncld plus the same fractional-population interpolation the load-independent one applies.

Definition at line 96 of file nc_dispatch.h.

References solver_ncld(), and solver_ncld_analyzer().

Referenced by nc_dispatch(), solver_nc_solve(), and solver_ncld_analyzer().