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

The @SolverLN methods that solver_ln.h does not carry. More...

#include <algorithm>
#include <cmath>
#include <cstddef>
#include <limits>
#include <string>
#include <vector>
#include "line/lang/lqn/lqn_struct.h"
#include "line/num/number.h"
#include "line/solvers/ln/lqn_helpers.h"
#include "line/solvers/ln/solver_ln.h"
#include "line/util/error.h"
#include "line/util/matrix.h"
Include dependency graph for lqn_analyzers.h:

Go to the source code of this file.

Classes

struct  line::ln::OvertakeCtmcState< T >
 Stationary law of the three-state overtaking chain, in its own order. More...
class  line::ln::LnStochController< T >
 Convergence controller for an ensemble whose layers are solved by a NOISY method (simulation, or Monte Carlo normalizing constants). More...
struct  line::ln::Distrib< T >
struct  line::ln::GlobalConstants
 The MATLAB GlobalConstants, as reported by lineStart at its defaults. More...
struct  line::ln::LqnStruct< T >

Namespaces

namespace  line
namespace  line::ln

Enumerations

enum class  line::ln::CallType
 Call kinds, with the values of MATLAB CallType. More...

Functions

template<class T>
OvertakeCtmcState< T > line::ln::lqn_overtake_ctmc (const T &S1, const T &S2, const T &lambda)
 Stationary law of the reduced overtaking chain of overtake_prob.m.
template<class T>
line::ln::lqn_overtake_prob (const T &S1, const T &S2, const T &lambda, double mult)
 Probability that an arrival at an entry finds the server in phase 2.
template<class T>
line::ln::lqn_overtake_prob_markov (const LqnStruct< T > &lqn, const std::vector< T > &servt, const std::vector< T > &callresidt, const std::vector< T > &tput, std::size_t eidx, const T &xj)
 Overtaking probability at a server entry, through the LQNS phased-server chain rather than the reduced CTMC above.
template<class T>
LnSensTable< T > line::ln::lqn_sensitivity_table (SolverLN< T > &solver, const sens::SensOptions &opt)
 @SolverLN/getSensitivityTable.m: solve the ensemble, then concatenate each LAYER solver's own sensitivity table under a leading Layer column.
template<class T>
LnTranSolution line::ln::lqn_tran_avg (SolverLN< T > &solver)
 @SolverLN/getTranAvg.m: the block-diagonal aggregate transient over the LQN layers, in whichever coupling LnOptions::ln_transient names.
template<class T>
std::vector< LnCdfline::ln::lqn_cdf_respt (SolverLN< T > &solver)
 @SolverLN/getCdfRespT.m: the per-entry response-time distribution, which only the moment3 method produces.

Detailed Description

The @SolverLN methods that solver_ln.h does not carry.

solver_ln.h ports the fixed point itself (construct, buildLayers, buildLayersRecursive, init, initInterlock, converged, analyze, post, updateMetricsDefault, updatePopulations, updateThinkTimes, updateLayers, updateRoutingProbabilities, getEntryServiceMatrix, getEnsembleAvg), and lqn_helpers.h carries lqn_fwd_rendezvous and the lqn_overtake_markov chain. What is here is the remainder of matlab/src/solvers/LN/@SolverLN:

overtake_prob - the reduced three-state CTMC overtake_prob_markov - the input mapping onto the LQNS overtaking chain convergedStoch - the Robbins-Monro / Polyak-Ruppert controller

plus thin wrappers, below, naming the three @SolverLN entry points whose work lives on the solver itself: getSensitivityTable, getTranAvg and getCdfRespT. updateMetricsMomentBased (the moment3 method) is likewise a member of SolverLN, because it replaces updateMetricsDefault inside the iteration and writes the same state.

WHAT SolverLN CALLS AND WHAT IT DOES NOT. lqn_overtake_prob_markov IS wired in: solver_ln.h computes the servt_ph1 / servt_ph2 split and calls it from update_metrics, where updateMetricsDefault.m:313-351 calls overtake_prob_markov. It is still written as a free function over quantities the caller supplies, and the tested phase residence xj is still a PARAMETER rather than something derived here, because the split belongs to the solver's iterate and inventing it from a phase-1 model would be a guess dressed as a result. overtake_prob, the reduced three-state CTMC, is the alternative the reference keeps beside it and no path selects.

LnStochController IS wired in, since layer_solver = 'ssa' gave the port a stochastic layer engine: SolverLN::iterate builds one whenever that engine is selected, drives relax_omega from it and reports the Polyak-Ruppert average as the final iterate. It is NOT used for any deterministic engine – the two convergence tests both rewrite results, so only one may be in force.

INCLUDE ORDER. This header needs LayerResult and SolverLN complete, so it is parsed after solver_ln.h, which includes it at its foot; the declaration solver_ln.h needs stands near the top of that file. Do not turn the include below into a forward declaration – LnStochController copies LayerResults.

Definition in file lqn_analyzers.h.