![]() |
LINE Solver (C++)
Templated C++ port of the LINE queueing solver
|
SolverLDES: the discrete-event simulator, which also answers the empirical response-time law. More...
#include <line/solvers/solver.h>
Public Member Functions | |
| SolverLDES (Network &m, const SolverOptions &o=SolverOptions()) | |
| SolverLDES (Network &m, const std::string &method) | |
| SolverLDES (Network &m, NetworkSolver &aux, const SolverOptions &o=SolverOptions()) | |
| SolverLDES(model, initSolver): warm-started from aux's steady state, see init_from_solver. | |
| std::vector< std::vector< CdfCurve > > | cdf_respt () |
| getCdfRespT(): the EMPIRICAL response-time CDF per (station, class), from the per-job samples. | |
| SolverLDES & | init_from_solver (NetworkSolver &aux) |
| initFromSolver(initSolver): warm-start from an auxiliary solver's steady state. | |
| SolverLDES & | init_from_jobs (const Matrix< double > &jobs) |
| initFromJobs(jobs): start from a job-level initial state, one row per job [station, class, remaining, elapsed, qage, sage, order, id] with 0-based indexes. | |
| const Matrix< double > & | final_jobs () |
| getFinalJobs(): the jobs present at the end of the run, in the init_from_jobs layout. | |
| const Matrix< double > & | job_departures () |
| The [id, station, class, time] of every departure of a tagged job, from the same run. | |
| 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 () |
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 |
SolverLDES: the discrete-event simulator, which also answers the empirical response-time law.
|
inlineexplicit |
Definition at line 361 of file solver.h.
References line::NetworkSolver::NetworkSolver().
Referenced by line::SolverAUTO::cdf_respt(), init_from_jobs(), and init_from_solver().
|
inline |
Definition at line 363 of file solver.h.
References line::NetworkSolver::NetworkSolver().
|
inline |
SolverLDES(model, initSolver): warm-started from aux's steady state, see init_from_solver.
Definition at line 366 of file solver.h.
References init_from_solver(), and line::NetworkSolver::NetworkSolver().
| std::vector< std::vector< CdfCurve > > line::SolverLDES::cdf_respt | ( | ) |
getCdfRespT(): the EMPIRICAL response-time CDF per (station, class), from the per-job samples.
Definition at line 1471 of file solver_facade.cpp.
References line::ExternalError::ExternalError(), line::qn::Network< T >::get_struct(), line::ldes::ldes_cdf_respt(), line::NetworkSolver::model_, line::NetworkSolver::opts_, line::ldes::LdesResult::respTimeSamples, line::Matrix< T >::rows(), and line::ldes::solver_ldes().
| const Matrix< double > & line::SolverLDES::final_jobs | ( | ) |
getFinalJobs(): the jobs present at the end of the run, in the init_from_jobs layout.
A run made with track_jobs is reused; otherwise one is made with it. A transient run (timespan_end) is read at its horizon.
Definition at line 1557 of file solver_facade.cpp.
| SolverLDES & line::SolverLDES::init_from_jobs | ( | const Matrix< double > & | jobs | ) |
initFromJobs(jobs): start from a job-level initial state, one row per job [station, class, remaining, elapsed, qage, sage, order, id] with 0-based indexes.
remaining is the work still owed (-1 a fresh draw, -2 the residual given elapsed), qage and sage the time already spent at the station and in the system, order the rank at the station (the first ones take the servers), id an optional tag (-1 untagged). The layout is the one final_jobs returns, so s2.init_from_jobs(s1.final_jobs()) continues a run where it stopped, residual work included. Held by the solver rather than the model, since only LDES can honour it; takes precedence over the model state and init_sol, and enables track_jobs. Supported at FCFS queues, the PS family and Delays.
Definition at line 1535 of file solver_facade.cpp.
References line::Matrix< T >::cols(), line::SolverOptions::init_jobs, line::InputError::InputError(), line::NetworkSolver::opts_, line::NetworkSolver::reset(), line::Matrix< T >::rows(), SolverLDES(), and line::SolverOptions::track_jobs.
| SolverLDES & line::SolverLDES::init_from_solver | ( | NetworkSolver & | aux | ) |
initFromSolver(initSolver): warm-start from an auxiliary solver's steady state.
A SolverCTMC gives the mode of its exact aggregate stationary distribution, any other solver its mean queue lengths rounded to a placement conserving each closed population. The placement is declared as the MODEL initial state, one row per station under a prior of one, which LDES starts from as every state-driven solver does, so it changes the model shared with any other solver. The transient filter is then disabled (tranfilter=fixed, warmupfrac=0), since the run starts near steady state.
Definition at line 1491 of file solver_facade.cpp.
References line::NetworkSolver::avg_table(), line::qn::from_marginal(), line::NetworkSolver::get_name(), line::qn::Network< T >::get_struct(), line::InputError::InputError(), line::AvgTable::JobClass, line::NetworkSolver::model_, line::NetworkSolver::NetworkSolver(), line::NetworkSolver::options(), line::NetworkSolver::opts_, line::AvgTable::QLen, line::NetworkSolver::reset(), line::qn::Network< T >::set_state_prior(), SolverLDES(), line::lang::Source, line::AvgTable::Station, line::SolverOptions::tranfilter, line::ldes::warm_start_placement_from_ctmc(), line::ldes::warm_start_placement_from_qlen(), and line::SolverOptions::warmupfrac.
Referenced by SolverLDES().
| const Matrix< double > & line::SolverLDES::job_departures | ( | ) |
The [id, station, class, time] of every departure of a tagged job, from the same run.
Definition at line 1562 of file solver_facade.cpp.