![]() |
LINE Solver (C++)
Templated C++ port of the LINE queueing solver
|
SolverCTMC: the average table plus the chain it was computed from. More...
#include <line/solvers/solver.h>
Public Member Functions | |
| SolverCTMC (Network &m, const SolverOptions &o=SolverOptions()) | |
| SolverCTMC (Network &m, const std::string &method) | |
| Matrix< double > | state_space () |
| getStateSpace(): the aggregate state space, one row per state. | |
| Matrix< double > | generator () |
| getGenerator(): the infinitesimal generator over that space. | |
| double | prob_aggr (std::size_t node, const std::vector< double > &state) |
| getProbAggr(node, state): the aggregate marginal of one state. | |
| std::vector< double > | marg_aggr (std::size_t node) |
| getProbStateAggr(node): the marginal over every state of one station. | |
| std::vector< std::vector< CdfCurve > > | cdf_respt () |
| getCdfRespT(): the response-time CDF per (station, class). | |
| Matrix< double > | state_space_aggr () |
| getStateSpaceAggr(): per-(station, class) job counts of every state, in (ist-1)*K + k column order, one row per state of generator(). | |
| FirstPassage | cdf_first_passt (const Matrix< double > &A, const Matrix< double > &B, const Matrix< double > &C=Matrix< double >(), const std::vector< double > &tset=std::vector< double >()) |
| getCdfFirstPassT(A, B, C, tset): the FIRST PASSAGE TIME from the state set A into the state set B. | |
| FirstPassage | cdf_first_passt (const StatePredicate &A, const StatePredicate &B, const StatePredicate &C=StatePredicate(), const std::vector< double > &tset=std::vector< double >()) |
| As above, with the sets named by predicates over the aggregate state. | |
| FirstPassageMoments | first_passt_moments (const Matrix< double > &A, const Matrix< double > &B, std::size_t nmax=3, const Matrix< double > &C=Matrix< double >()) |
| getFirstPassTMoments(A, B, nmax, C): moments of order 1..nmax of the same passage, exact by one linear solve per order. | |
| FirstPassageMoments | first_passt_moments (const StatePredicate &A, const StatePredicate &B, std::size_t nmax=3, const StatePredicate &C=StatePredicate()) |
| As above, with the sets named by predicates over the aggregate state. | |
| SymbolicSolution | symbolic_solution () |
| getSymbolicSolution(): the stationary law over the rate symbols x1..xE. | |
| Public Member Functions inherited from line::NetworkSolver | |
| virtual | ~NetworkSolver () |
| const std::string & | get_name () const |
| getName(): the solver's own name, e.g. | |
| const SolverOptions & | options () const |
| The options this solver was built with. | |
| Network & | model () const |
| The model this solver was built on. | |
| const AvgTable & | avg_table () |
| getAvgTable(): the average table, solving on first demand. | |
| AvgSysTable | avg_sys_table () |
| getAvgSysTable(): per-chain system response time and throughput of the same solve. | |
| AvgMetricTable | avg_qlen_table () |
| getAvgQLenTable(): avg_table()'s Station, JobClass and QLen columns. | |
| AvgMetricTable | avg_util_table () |
| getAvgUtilTable(): avg_table()'s Station, JobClass and Util columns. | |
| AvgMetricTable | avg_respt_table () |
| getAvgRespTTable(): avg_table()'s Station, JobClass and RespT columns. | |
| AvgMetricTable | avg_tput_table () |
| getAvgTputTable(): avg_table()'s Station, JobClass and Tput columns. | |
| std::vector< double > | avg_sys_respt () |
| getAvgSysRespT(): the per-chain system response time column of avg_sys_table. | |
| std::vector< double > | avg_sys_tput () |
| getAvgSysTput(): the per-chain system throughput column of avg_sys_table. | |
| AvgChain | avg_chain () |
| getAvgChain(): the station table of the same solve aggregated by chain, (nstations x nchains). | |
| Matrix< double > | avg_qlen_chain () |
| getAvgQLenChain() and its siblings: one matrix of avg_chain() each. | |
| Matrix< double > | avg_util_chain () |
| Matrix< double > | avg_respt_chain () |
| Matrix< double > | avg_residt_chain () |
| Matrix< double > | avg_arvr_chain () |
| Matrix< double > | avg_tput_chain () |
| AvgChainTable | avg_chain_table () |
| getAvgChainTable(): avg_chain() as a labelled table, one row per (station, chain). | |
| const AvgTable & | run_analyzer () |
| runAnalyzer(): force the solve, returning the table it produced. | |
| std::vector< std::string > | list_valid_methods () const |
| listValidMethods(): the methods this solver advertises on this model. | |
| bool | is_solved () const |
| isSolved() / hasResults(): whether a solve has been performed. | |
| void | reset () |
| reset(): discard the cached solve. | |
| std::string | method_used () |
| getMethodUsed(): the method the solve actually resolved to. | |
| const solvers::CacheMetrics< double > & | cache_metrics () |
| What the same solve observed at each Cache node, the data behind getAvgCacheTable() and getAvgItemTable(). | |
| std::vector< double > | hit_ratio (const std::string &cache) |
| cache.getHitRatio() after the solve: the per-class hit probability at the named Cache, NaN for a class that does not read it. | |
| std::vector< double > | hit_ratio (const Node &cache) |
| std::vector< double > | miss_ratio (const std::string &cache) |
| cache.getMissRatio() after the solve, with hit_ratio's conventions. | |
| std::vector< double > | miss_ratio (const Node &cache) |
| const solvers::FjMetrics< double > & | avg_fj () |
| getAvgFJ(): the fork-join section metrics of the same solve, one row per Fork/Join pair (fj_sorted_pairs), one column per class. | |
| AvgFJTable | avg_fj_table () |
| getAvgFJTable() (aliases getAvgFJT, fjAvgT, aFJT): the same metrics as a labelled table. | |
| AvgFJTable | avg_fjt () |
| AvgFJTable | fj_avg_t () |
Static Public Member Functions | |
| static void | print_inf_gen (const Matrix< double > &Q, const Matrix< double > &space) |
| CTMC.printInfGen(Q, SS): the generator beside the state it belongs to. | |
Additional Inherited Members | |
| Protected Member Functions inherited from line::NetworkSolver | |
| NetworkSolver (Network &m, const std::string &name, const SolverOptions &o) | |
| Protected Attributes inherited from line::NetworkSolver | |
| Network * | model_ |
| std::string | name_ |
| SolverOptions | opts_ |
| AvgTable | table_ |
| solvers::CacheMetrics< double > | cache_ |
| solvers::FjMetrics< double > | fj_ |
| bool | solved_ = false |
SolverCTMC: the average table plus the chain it was computed from.
|
inlineexplicit |
Definition at line 289 of file solver.h.
References line::NetworkSolver::NetworkSolver().
Referenced by line::SolverAUTO::cdf_respt(), line::SolverAUTO::ctmc_solver(), and line::SolverAUTO::prob_aggr().
|
inline |
Definition at line 291 of file solver.h.
References line::NetworkSolver::NetworkSolver().
| FirstPassage line::SolverCTMC::cdf_first_passt | ( | const Matrix< double > & | A, |
| const Matrix< double > & | B, | ||
| const Matrix< double > & | C = Matrix<double>(), | ||
| const std::vector< double > & | tset = std::vector<double>() ) |
getCdfFirstPassT(A, B, C, tset): the FIRST PASSAGE TIME from the state set A into the state set B.
A set is given as 1-based ROW INDICES into state_space() or as state rows of it; an empty A starts from the conditional stationary law on the complement of B.
C is an optional TABOO set: a passage that enters C before B is lost, so F becomes the DEFECTIVE law Pr{B entered by t, C not before}, tending to reachprob. tset replaces the default horizon grid; an infinite entry returns reachprob.
Definition at line 1358 of file solver_facade.cpp.
References line::ctmc::ctmc_cdf_firstpasst(), line::qn::Network< T >::get_struct(), line::NetworkSolver::model_, line::NetworkSolver::opts_, and line::ctmc::solver_ctmc_analyzer().
| FirstPassage line::SolverCTMC::cdf_first_passt | ( | const StatePredicate & | A, |
| const StatePredicate & | B, | ||
| const StatePredicate & | C = StatePredicate(), | ||
| const std::vector< double > & | tset = std::vector<double>() ) |
As above, with the sets named by predicates over the aggregate state.
Definition at line 1366 of file solver_facade.cpp.
References line::ctmc::CtmcSolution< T >::chain, line::ctmc::ctmc_cdf_firstpasst(), line::ctmc::ctmc_get_state_space_aggr(), line::qn::Network< T >::get_struct(), line::NetworkSolver::model_, line::NetworkSolver::opts_, line::ctmc::CtmcSolution< T >::solved_sn, and line::ctmc::solver_ctmc_analyzer().
| std::vector< std::vector< CdfCurve > > line::SolverCTMC::cdf_respt | ( | ) |
getCdfRespT(): the response-time CDF per (station, class).
Definition at line 1265 of file solver_facade.cpp.
References line::qn::Network< T >::get_struct(), line::NetworkSolver::model_, line::NetworkSolver::opts_, and line::ctmc::solver_ctmc_cdf_respt().
| FirstPassageMoments line::SolverCTMC::first_passt_moments | ( | const Matrix< double > & | A, |
| const Matrix< double > & | B, | ||
| std::size_t | nmax = 3, | ||
| const Matrix< double > & | C = Matrix<double>() ) |
getFirstPassTMoments(A, B, nmax, C): moments of order 1..nmax of the same passage, exact by one linear solve per order.
With a taboo set C they are CONDITIONAL on entering B before C, and mall is NaN where B cannot be entered first; p is the per-state probability of entering B before C.
Definition at line 1379 of file solver_facade.cpp.
References line::ctmc::ctmc_firstpasst_moments(), line::qn::Network< T >::get_struct(), line::NetworkSolver::model_, line::NetworkSolver::opts_, and line::ctmc::solver_ctmc_analyzer().
| FirstPassageMoments line::SolverCTMC::first_passt_moments | ( | const StatePredicate & | A, |
| const StatePredicate & | B, | ||
| std::size_t | nmax = 3, | ||
| const StatePredicate & | C = StatePredicate() ) |
As above, with the sets named by predicates over the aggregate state.
Definition at line 1387 of file solver_facade.cpp.
References line::ctmc::CtmcSolution< T >::chain, line::ctmc::ctmc_firstpasst_moments(), line::ctmc::ctmc_get_state_space_aggr(), line::qn::Network< T >::get_struct(), line::NetworkSolver::model_, line::NetworkSolver::opts_, line::ctmc::CtmcSolution< T >::solved_sn, and line::ctmc::solver_ctmc_analyzer().
| Matrix< double > line::SolverCTMC::generator | ( | ) |
getGenerator(): the infinitesimal generator over that space.
Definition at line 1218 of file solver_facade.cpp.
References line::ctmc::ctmc_get_infgen(), line::qn::Network< T >::get_struct(), line::NetworkSolver::model_, line::NetworkSolver::opts_, and line::ctmc::solver_ctmc_analyzer().
Referenced by line::SolverAUTO::generator().
| std::vector< double > line::SolverCTMC::marg_aggr | ( | std::size_t | node | ) |
getProbStateAggr(node): the marginal over every state of one station.
Definition at line 1243 of file solver_facade.cpp.
References line::ctmc::ctmc_get_state_space_aggr(), line::qn::Network< T >::get_struct(), line::InputError::InputError(), line::NetworkSolver::model_, line::NetworkSolver::opts_, line::ctmc::CtmcSolution< T >::pi, line::Matrix< T >::rows(), and line::ctmc::solver_ctmc_analyzer().
|
static |
CTMC.printInfGen(Q, SS): the generator beside the state it belongs to.
Definition at line 1414 of file solver_facade.cpp.
References line::Matrix< T >::cols(), and line::Matrix< T >::rows().
| double line::SolverCTMC::prob_aggr | ( | std::size_t | node, |
| const std::vector< double > & | state ) |
getProbAggr(node, state): the aggregate marginal of one state.
Definition at line 1226 of file solver_facade.cpp.
References line::ctmc::ctmc_get_state_space_aggr(), line::qn::Network< T >::get_struct(), line::InputError::InputError(), line::NetworkSolver::model_, line::NetworkSolver::opts_, line::ctmc::CtmcSolution< T >::pi, line::Matrix< T >::rows(), and line::ctmc::solver_ctmc_analyzer().
| Matrix< double > line::SolverCTMC::state_space | ( | ) |
getStateSpace(): the aggregate state space, one row per state.
Definition at line 1212 of file solver_facade.cpp.
References line::ctmc::ctmc_get_state_space(), line::qn::Network< T >::get_struct(), line::NetworkSolver::model_, line::NetworkSolver::opts_, and line::ctmc::solver_ctmc_analyzer().
Referenced by line::SolverAUTO::state_space().
| Matrix< double > line::SolverCTMC::state_space_aggr | ( | ) |
getStateSpaceAggr(): per-(station, class) job counts of every state, in (ist-1)*K + k column order, one row per state of generator().
Definition at line 1278 of file solver_facade.cpp.
References line::ctmc::ctmc_get_state_space_aggr(), line::qn::Network< T >::get_struct(), line::NetworkSolver::model_, line::NetworkSolver::opts_, and line::ctmc::solver_ctmc_analyzer().
| SymbolicSolution line::SolverCTMC::symbolic_solution | ( | ) |
getSymbolicSolution(): the stationary law over the rate symbols x1..xE.
The generator itself needs no computer algebra, being linear in the symbols, but solving pi Q = 0 over the field of rational functions does, and that is delegated to the backend options.symbolic names. Throws when no backend can be resolved rather than returning a numeric answer under a symbolic name.
Definition at line 1400 of file solver_facade.cpp.
References line::ctmc::ctmc_symbolic_solution(), line::ctmc::CtmcSymbolicSolution< T >::den, line::SymbolicSolution::den, line::ctmc::CtmcSymbolicSolution< T >::engine, line::SymbolicSolution::engine, line::qn::Network< T >::get_struct(), line::NetworkSolver::model_, line::ctmc::CtmcSymbolicSolution< T >::num, line::SymbolicSolution::num, line::NetworkSolver::opts_, line::ctmc::CtmcSymbolicSolution< T >::pi, line::SymbolicSolution::pi, line::ctmc::CtmcSymbolicSolution< T >::rate0, line::SymbolicSolution::rate0, line::ctmc::CtmcSymbolicSolution< T >::symbols, and line::SymbolicSolution::symbols.
Referenced by line::SolverAUTO::symbolic_solution().