![]() |
LINE Solver (C++)
Templated C++ port of the LINE queueing solver
|
Classes | |
| struct | CacheIsolateResult |
| Return value of da_cache_isolate, mirroring [gamma,lambda_cache,Rcost]. More... | |
| struct | CacheParam |
| The fields of sn.nodeparam{cache} that da_cache_isolate reads. More... | |
| struct | CacheqnInfo |
| The converged isolated-cache inputs, kept for per-item occupancy reporting. More... | |
| struct | CacheqnResult |
| struct | CacheqnRetrievalResult |
| What the delayed-hit decomposition returns. More... | |
| struct | FpiOptions |
| Options mirroring the fields MATLAB reads off the options struct. More... | |
| struct | FpiResult |
Functions | |
| template<class T> | |
| CacheIsolateResult< T > | da_cache_isolate (const CacheParam< T > &ch, const std::vector< T > &lambda) |
| Isolated-cache input construction for the decomposition methods. | |
| template<class T> | |
| std::vector< Matrix< T > > | da_cacheqn_itemprob (const CacheqnInfo< T > &info) |
| Per-item occupancy of every cache from the CONVERGED access factors. | |
| template<class T> | |
| CacheqnResult< T > | da_cacheqn (qn::NetworkStruct< T > sn, bool exact, const mva::MvaOptions &opt, const std::function< mva::MvaSolution< T >(const qn::NetworkStruct< T > &)> &netfun, const std::function< std::vector< T >(const Matrix< T > &, const std::vector< int > &, const std::vector< Matrix< T > > &, const qn::CacheParam< T > &)> &missfun=nullptr) |
| Decomposition-aggregation driver for integrated cache-queueing models, a port of matlab/src/api/da/da_cacheqn.m. | |
| template<class T> | |
| CacheqnRetrievalResult< T > | da_cacheqn_retrieval (qn::NetworkStruct< T > sn, const std::function< mva::MvaSolution< T >(const qn::NetworkStruct< T > &)> &netfun, const mva::MvaOptions &opt) |
| Port of da_cacheqn_retrieval. | |
| template<class T> | |
| FpiResult< T > | da_fpi (const std::function< std::pair< std::vector< T >, std::vector< T > >(const std::vector< T > &, std::size_t)> &iterfun, const std::vector< T > &x0, const FpiOptions &options=FpiOptions()) |
| Damped fixed-point iteration, the shared driver of the decomposition algorithms. | |
| template<class T> | |
| T | da_traffic_superpos (const std::vector< T > &lambda, const std::vector< T > &a2) |
| Superposition of independent renewal flows (Whitt's QNA stationary-interval method). | |
| CacheIsolateResult< T > line::da::da_cache_isolate | ( | const CacheParam< T > & | ch, |
| const std::vector< T > & | lambda ) |
Isolated-cache input construction for the decomposition methods.
| ch | cache node parameters |
| lambda | (u) per-class arrival rates at the cache |
Definition at line 82 of file da_cache_isolate.h.
References line::da::CacheParam< T >::accost, line::cache::cache_gamma_lp(), da_cache_isolate(), line::da::CacheIsolateResult< T >::gamma, line::InputError::InputError(), line::da::CacheParam< T >::itemcap, line::da::CacheIsolateResult< T >::lambda_cache, line::da::CacheParam< T >::nitems, line::da::CacheParam< T >::pread, and line::da::CacheIsolateResult< T >::Rcost.
Referenced by da_cache_isolate(), da_cacheqn(), da_cacheqn_retrieval(), and line::mva::solver_mva_cache_analyzer().
| CacheqnResult< T > line::da::da_cacheqn | ( | qn::NetworkStruct< T > | sn, |
| bool | exact, | ||
| const mva::MvaOptions & | opt, | ||
| const std::function< mva::MvaSolution< T >(const qn::NetworkStruct< T > &)> & | netfun, | ||
| const std::function< std::vector< T >(const Matrix< T > &, const std::vector< int > &, const std::vector< Matrix< T > > &, const qn::CacheParam< T > &)> & | missfun = nullptr ) |
Decomposition-aggregation driver for integrated cache-queueing models, a port of matlab/src/api/da/da_cacheqn.m.
| sn | the model struct, taken by value and mutated (caches relabelled) |
| exact | true selects the exact isolated-cache miss, false the approximation; consulted only when missfun is empty |
| opt | iteration controls (iter_max, tol) |
| netfun | solves the surrounding queueing network on the mutated struct; its MvaSolution.X is read as the per-class system throughput |
| missfun | THE ISOLATED-CACHE MISS ALGORITHM, as the reference's missfun handle. Empty selects the MVA pair (cache_mva / cache_miss_fpi), which is what SolverMVA passes; SolverNC supplies cache_prob_erec / cache_miss_spm instead. The reference has always taken a handle here – an earlier version of this port collapsed it to exact, which hardcoded one solver's pair into a driver both solvers share. |
THE FOURTH ARGUMENT IS THE CACHE ITSELF, as the reference's missfun(gamma, m, lambda_cache, ch) passes it. Without it a handle cannot see the replacement strategy or the access graph of the cache it is being asked about, so a model with two caches under different policies would be solved by whichever one the handle was written for. SolverFLD reads exactly those two fields; SolverMVA and SolverNC ignore the argument.
Definition at line 133 of file da_cacheqn.h.
References line::da::CacheParam< T >::accost, line::qn::CacheParam< T >::accost, line::cache::cache_miss_fpi(), line::cache::cache_mva(), da_cache_isolate(), da_cacheqn(), da_fpi(), line::da::CacheIsolateResult< T >::gamma, line::qn::CacheParam< T >::hitclass, line::da::CacheqnResult< T >::hitprob, line::da::CacheqnResult< T >::info, line::da::CacheParam< T >::itemcap, line::qn::CacheParam< T >::itemcap, line::da::CacheqnResult< T >::iter, line::da::FpiOptions::iter_max, line::da::FpiOptions::iter_tol, line::da::FpiResult< T >::iterations, line::da::CacheIsolateResult< T >::lambda_cache, line::Matrix< T >::Matrix(), line::qn::CacheParam< T >::missclass, line::da::CacheqnResult< T >::missprob, line::cache::CacheMissResult< T >::MU, line::da::CacheParam< T >::nitems, line::qn::CacheParam< T >::nitems, line::cache::CacheMvaResult< T >::pij, line::da::CacheParam< T >::pread, line::qn::CacheParam< T >::pread, line::da::CacheIsolateResult< T >::Rcost, line::qn::CacheParam< T >::replacestrat, line::da::CacheqnResult< T >::res, and line::mva::MvaSolution< T >::X.
Referenced by da_cacheqn(), line::fluid::solver_fld_cacheqn_analyzer(), line::fluid::solver_fld_cacheqn_tran(), line::mva::solver_mva_cacheqn_analyzer(), and line::nc::solver_nc_cacheqn_analyzer().
| std::vector< Matrix< T > > line::da::da_cacheqn_itemprob | ( | const CacheqnInfo< T > & | info | ) |
Per-item occupancy of every cache from the CONVERGED access factors.
This is the EMBEDDED (per-request) law: the stationary law of the cache-content chain seen at request instants, which coincides with the time-stationary one only under PASTA. SolverCTMC reports the time-weighted counterpart instead.
RR/FIFO past 10 items is NaN, not the fixed point's marginals: the exact recursion is what makes these a distribution, and an approximation of it is not one. SolverMVA and SolverNC read the same law off their own fixed points, so it is derived here rather than in either analyzer.
Definition at line 82 of file da_cacheqn.h.
References line::cache::cache_prob_erec(), line::cache::cache_ttl_lrua(), da_cacheqn_itemprob(), line::lang::GlobalConstants::FineTol, line::da::CacheqnInfo< T >::gamma, line::da::CacheqnInfo< T >::itemcap, line::da::CacheqnInfo< T >::lambda_cache, line::lang::LRU, line::Matrix< T >::Matrix(), line::da::CacheqnInfo< T >::Rcost, and line::da::CacheqnInfo< T >::strat.
Referenced by da_cacheqn_itemprob(), line::mva::solver_mva_cacheqn_analyzer(), and line::nc::solver_nc_cacheqn_analyzer().
| CacheqnRetrievalResult< T > line::da::da_cacheqn_retrieval | ( | qn::NetworkStruct< T > | sn, |
| const std::function< mva::MvaSolution< T >(const qn::NetworkStruct< T > &)> & | netfun, | ||
| const mva::MvaOptions & | opt ) |
Port of da_cacheqn_retrieval.
| sn | the model struct, taken by value and MUTATED (the cache becomes a ClassSwitch and the fetch station gains lldscaling) |
| netfun | solves the surrounding queueing network on the mutated struct |
| opt | iteration controls |
Definition at line 91 of file da_cacheqn_retrieval.h.
References line::da::CacheParam< T >::accost, line::qn::CacheParam< T >::accost, line::cache::cache_miss_fpi(), da_cache_isolate(), da_cacheqn_retrieval(), da_fpi(), line::da::CacheqnRetrievalResult< T >::delayedprob, line::da::CacheIsolateResult< T >::gamma, line::qn::CacheParam< T >::hitclass, line::da::CacheqnRetrievalResult< T >::hitprob, line::da::CacheParam< T >::itemcap, line::qn::CacheParam< T >::itemcap, line::da::CacheqnRetrievalResult< T >::iter, line::da::FpiOptions::iter_max, line::da::FpiOptions::iter_tol, line::da::FpiResult< T >::iterations, line::da::CacheIsolateResult< T >::lambda_cache, line::qn::CacheParam< T >::missclass, line::da::CacheqnRetrievalResult< T >::missprob, line::da::CacheParam< T >::nitems, line::qn::CacheParam< T >::nitems, line::cache::CacheMissResult< T >::pi0, line::da::CacheParam< T >::pread, line::qn::CacheParam< T >::pread, line::da::CacheqnRetrievalResult< T >::res, line::qn::CacheParam< T >::retrieval_classes, line::qn::CacheParam< T >::retrieval_queues, line::da::CacheqnRetrievalResult< T >::sn, and line::UnsupportedError::UnsupportedError().
Referenced by da_cacheqn_retrieval(), line::mva::solver_mva_cacheqn_retrieval_analyzer(), and line::nc::solver_nc_cacheqn_retrieval_analyzer().
| FpiResult< T > line::da::da_fpi | ( | const std::function< std::pair< std::vector< T >, std::vector< T > >(const std::vector< T > &, std::size_t)> & | iterfun, |
| const std::vector< T > & | x0, | ||
| const FpiOptions & | options = FpiOptions() ) |
Damped fixed-point iteration, the shared driver of the decomposition algorithms.
| iterfun | (x, iteration) -> (xnew, xref); xref is the point the damping and the increment norm are taken against |
| x0 | initial iterate |
| options | fixed-point options (tolerance, iteration cap, damping) |
Definition at line 92 of file da_fpi.h.
References line::da::FpiResult< T >::converged, da_fpi(), line::InputError::InputError(), line::da::FpiResult< T >::iterations, and line::da::FpiResult< T >::x.
Referenced by da_cacheqn(), da_cacheqn_retrieval(), da_fpi(), line::lossn::lossn_erlangfp(), line::mam::solver_mam_basic_mmap_inner(), line::mam::solver_mam_decmmap(), line::mam::solver_mna_closed(), line::mam::solver_mna_open(), and line::mva::solver_qna().
| T line::da::da_traffic_superpos | ( | const std::vector< T > & | lambda, |
| const std::vector< T > & | a2 ) |
Superposition of independent renewal flows (Whitt's QNA stationary-interval method).
| lambda | (m) flow rates; entries that are not finite are ignored |
| a2 | (m) squared coefficients of variation of the same flows |
Definition at line 64 of file da_traffic_superpos.h.
References da_traffic_superpos(), line::InputError::InputError(), and line::NumericError::NumericError().
Referenced by da_traffic_superpos(), line::mam::solver_mna_open(), and line::mva::solver_qna().