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

The remaining @@SolverCTMC accessors: getGenerator / getInfGen, getStateSpace / getStateSpaceAggr and the getTranProb* family. More...

#include <cmath>
#include <cstddef>
#include <limits>
#include <set>
#include <string>
#include <vector>
#include "line/api/mc/ctmc_passage.h"
#include "line/lang/qn/network_struct.h"
#include "line/lang/qn/state.h"
#include "line/lang/qn/state_events.h"
#include "line/solvers/ctmc/solver_ctmc.h"
#include "line/solvers/ctmc/solver_ctmc_analyzer.h"
#include "line/solvers/ctmc/solver_ctmc_prob.h"
#include "line/solvers/ctmc/solver_ctmc_transient.h"
#include "line/util/error.h"
#include "line/util/matrix.h"
#include "line/api/sim/sim_runlength.h"
Include dependency graph for solver_ctmc_getters.h:

Go to the source code of this file.

Classes

struct  line::ctmc::CtmcGenerator< T >
 [infGen, eventFilt, ev] of @@SolverCTMC/getGenerator.m. More...
struct  line::ctmc::CtmcStateSpace< T >
 [stateSpace, localStateSpace] of @@SolverCTMC/getStateSpace.m. More...
struct  line::ctmc::CtmcTranProb< T >
 The time-dependent answer of one getTranProb* query. More...
struct  line::ctmc::CtmcFirstPassage
 The answer of @@SolverCTMC/getCdfFirstPassT.m: the [F(t), t] curve with its grid, density and resolved state sets. More...
struct  line::ctmc::CtmcFirstPassageMoments< T >
 The answer of @@SolverCTMC/getFirstPassTMoments.m. More...

Namespaces

namespace  line
namespace  line::ctmc

Functions

template<class T>
Matrix< T > line::ctmc::ctmc_get_start_rate (const NetworkStruct< T > &sn, const CtmcOptions &opt)
 SolverCTMC.getStartRate and getPreemptRate: the DERIVED rates the START/PREEMPT filtration reduces to.
template<class T>
Matrix< T > line::ctmc::ctmc_get_start_rate (const NetworkStruct< T > &, const CtmcSolution< T > &d)
 As above, for a caller whose solution already carries the filtration.
template<class T>
Matrix< T > line::ctmc::ctmc_get_preempt_rate (const NetworkStruct< T > &sn, const CtmcOptions &opt)
 SolverCTMC.getPreemptRate; see ctmc_get_start_rate.
template<class T>
Matrix< T > line::ctmc::ctmc_get_preempt_rate (const NetworkStruct< T > &, const CtmcSolution< T > &d)
 As above, for a caller whose solution already carries the filtration.
template<class T>
CtmcGenerator< T > line::ctmc::ctmc_get_generator (const NetworkStruct< T > &sn, const CtmcSolution< T > &d)
 Port of @@SolverCTMC/getGenerator.m: the generator, its event filtration and the synchronization list the filtration is indexed by.
template<class T>
CtmcGenerator< T > line::ctmc::ctmc_get_generator (const NetworkStruct< T > &sn, const CtmcOptions &opt)
 As above, solving the chain first.
template<class T>
CtmcGenerator< T > line::ctmc::ctmc_get_infgen (const NetworkStruct< T > &sn, const CtmcSolution< T > &d)
 @@SolverCTMC/getInfGen.m, a pure alias of getGenerator in the reference.
template<class T>
CtmcGenerator< T > line::ctmc::ctmc_get_infgen (const NetworkStruct< T > &sn, const CtmcOptions &opt)
 @@SolverCTMC/getInfGen.m, solving the chain first.
template<class T>
CtmcStateSpace< T > line::ctmc::ctmc_get_state_space (const NetworkStruct< T > &, const CtmcSolution< T > &d)
 Port of @@SolverCTMC/getStateSpace.m.
template<class T>
CtmcStateSpace< T > line::ctmc::ctmc_get_state_space (const NetworkStruct< T > &sn, const CtmcOptions &opt)
 As above, solving the chain first.
template<class T>
CtmcFirstPassage line::ctmc::ctmc_cdf_firstpasst (const NetworkStruct< T > &, const CtmcSolution< T > &d, const Matrix< double > &A, const Matrix< double > &B, const std::string &method="expm")
 Port of @@SolverCTMC/getCdfFirstPassT.m: the distribution of the FIRST PASSAGE TIME from state set A into state set B, on the CTMC underlying the model.
template<class T>
CtmcFirstPassage line::ctmc::ctmc_cdf_firstpasst (const NetworkStruct< T > &sn, const CtmcOptions &opt, const Matrix< double > &A, const Matrix< double > &B, const std::string &method="expm")
 As above, solving the chain first.
template<class T>
CtmcFirstPassageMoments< T > line::ctmc::ctmc_firstpasst_moments (const NetworkStruct< T > &, const CtmcSolution< T > &d, const Matrix< double > &A, const Matrix< double > &B, std::size_t nmax=3)
 Port of @@SolverCTMC/getFirstPassTMoments.m: moments of order 1..nmax of the first passage time from state set A into state set B.
template<class T>
CtmcFirstPassageMoments< T > line::ctmc::ctmc_firstpasst_moments (const NetworkStruct< T > &sn, const CtmcOptions &opt, const Matrix< double > &A, const Matrix< double > &B, std::size_t nmax=3)
 As above, solving the chain first.
template<class T>
Matrix< T > line::ctmc::ctmc_get_state_space_aggr (const NetworkStruct< T > &sn, const CtmcOptions &opt)
 Port of @@SolverCTMC/getStateSpaceAggr.m: the per-(station, class) job counts of every state, in column block order (ist-1)*K + k.
template<class T>
Matrix< T > line::ctmc::ctmc_get_state_space_aggr (const NetworkStruct< T > &sn, const CtmcSolution< T > &d)
 As above, for a caller who has already solved the chain.
template<class T>
CtmcTranProb< T > line::ctmc::ctmc_get_tran_prob (const NetworkStruct< T > &sn, const CtmcTransient< T > &tr, std::size_t ind)
 Port of @@SolverCTMC/getTranProb.m: pi(t) over the whole chain, labelled by one node's local state.
template<class T>
CtmcTranProb< T > line::ctmc::ctmc_get_tran_prob (const NetworkStruct< T > &sn, const CtmcOptions &opt, std::size_t ind, const T &t0, const T &t1)
 As above, integrating the forward equation first.
template<class T>
CtmcTranProb< T > line::ctmc::ctmc_get_tran_prob_aggr (const NetworkStruct< T > &sn, const CtmcTransient< T > &tr, std::size_t ind)
 Port of @@SolverCTMC/getTranProbAggr.m: pi(t), labelled by one node's per-class job counts.
template<class T>
CtmcTranProb< T > line::ctmc::ctmc_get_tran_prob_aggr (const NetworkStruct< T > &sn, const CtmcOptions &opt, std::size_t ind, const T &t0, const T &t1)
 As above, integrating the forward equation first.
template<class T>
CtmcTranProb< T > line::ctmc::ctmc_get_tran_prob_sys (const NetworkStruct< T > &sn, const CtmcTransient< T > &tr)
 Port of @@SolverCTMC/getTranProbSys.m: pi(t), labelled by the whole network state with its phases.
template<class T>
CtmcTranProb< T > line::ctmc::ctmc_get_tran_prob_sys (const NetworkStruct< T > &sn, const CtmcOptions &opt, const T &t0, const T &t1)
 As above, integrating the forward equation first.
template<class T>
CtmcTranProb< T > line::ctmc::ctmc_get_tran_prob_sys_aggr (const NetworkStruct< T > &sn, const CtmcTransient< T > &tr)
 Port of @@SolverCTMC/getTranProbSysAggr.m: pi(t), labelled by the network's per-(station, class) job counts.
template<class T>
CtmcTranProb< T > line::ctmc::ctmc_get_tran_prob_sys_aggr (const NetworkStruct< T > &sn, const CtmcOptions &opt, const T &t0, const T &t1)
 As above, integrating the forward equation first.
template<class T>
sim::AsymVarResult< T > line::ctmc::ctmc_get_asymptotic_variance (const NetworkStruct< T > &sn, const CtmcOptions &opt, const std::function< T(const NetState< T > &)> &reward)
 Port of @@SolverCTMC/getAsymptoticVariance.m: the asymptotic variance of the time-average of a reward along a sample path of this model's CTMC.

Detailed Description

The remaining @@SolverCTMC accessors: getGenerator / getInfGen, getStateSpace / getStateSpaceAggr and the getTranProb* family.

The symbolic getters live in solver_ctmc_symbolic.h.

WHAT AN ACCESSOR HERE IS INDEXED BY. Every quantity below is read off the chain solver_ctmc_analyzer SOLVED, which is the enumerated space after the DROP regions have censored it and, on a reducible encoding, restricted to one weakly connected component. The reference's getGenerator and getStateSpace instead call solver_ctmc and State.spaceGenerator directly and so report the pre-restriction space, which on such a model has more rows than its own pi vector does. The states that differ carry zero stationary mass and no other accessor in this port can index them, so they are dropped here rather than handed back as rows nothing else accepts.

WHY THE FILTRATION IS AN OUTPUT AND NOT A DERIVATION. eventFilt is not recoverable from Q: assembling the generator adds every synchronization's contribution into one entry, and no inspection of the sum says which event put what there. It has to be recorded while Q is built, which is what CtmcOptions::keep_filtration turns on, so the accessors that return it force that flag on rather than reporting an empty filtration.

Definition in file solver_ctmc_getters.h.