![]() |
LINE Solver (C++)
Templated C++ port of the LINE queueing solver
|
SolverJMT: the Java Modelling Tools client, which also answers a transient, a response-time law, a state probability and a trajectory. More...
#include <line/solvers/solver.h>
Public Member Functions | |
| SolverJMT (Network &m, const SolverOptions &o=SolverOptions()) | |
| SolverJMT (Network &m, const std::string &method) | |
| std::vector< std::vector< CdfCurve > > | cdf_respt () |
| getCdfRespT(): the EMPIRICAL response-time CDF per (station, class). | |
| TranAvg | tran_avg () |
| getTranAvg(): E[N](t), averaged over options.config.replications (SolverOptions::replications, default 10) independent replications under method default; an explicit jsim is one run. | |
| double | prob_aggr (std::size_t node, const std::vector< double > &state) |
| getProbAggr(node, state): the time the declared state is held for. | |
| SamplePath | sample (std::size_t events=0, std::size_t node=0) |
| sampleSysAggr(events), or sampleAggr(node, events) when node is given: one logged trajectory. | |
| 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. | |
| const AvgTable & | avg_sys_table () |
| getAvgSysTable(): the per-class system columns of the same solve. | |
| 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. | |
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_ |
| bool | solved_ = false |
SolverJMT: the Java Modelling Tools client, which also answers a transient, a response-time law, a state probability and a trajectory.
IT IS NOT A BARE LINE_DECLARE_SOLVER, and the difference is the point: the macro exposes averages alone, so a program holding a SolverJMT could reach getAvgTable and nothing else while jmt_logs.h implemented all four of these and line-cli -s jmt reached none of them either.
EVERY ONE OF THEM IS READ OFF A LOGGED RUN, so each is a jsim answer whatever --method asked for: JMVA computes means from a product form and logs no trajectory at all.
|
inlineexplicit |
Definition at line 137 of file solver.h.
References line::NetworkSolver::NetworkSolver().
|
inline |
Definition at line 139 of file solver.h.
References line::NetworkSolver::NetworkSolver().
| std::vector< std::vector< CdfCurve > > line::SolverJMT::cdf_respt | ( | ) |
getCdfRespT(): the EMPIRICAL response-time CDF per (station, class).
Definition at line 692 of file solver_facade.cpp.
References line::qn::Network< T >::get_struct(), line::jmt::jmt_get_cdf_resp_t(), line::NetworkSolver::model_, and line::NetworkSolver::opts_.
| double line::SolverJMT::prob_aggr | ( | std::size_t | node, |
| const std::vector< double > & | state ) |
getProbAggr(node, state): the time the declared state is held for.
Definition at line 737 of file solver_facade.cpp.
References line::qn::Network< T >::get_struct(), line::InputError::InputError(), line::jmt::jmt_prob_aggr(), line::NetworkSolver::model_, line::NetworkSolver::opts_, and line::jmt::JmtProbAggr::station.
| SamplePath line::SolverJMT::sample | ( | std::size_t | events = 0, |
| std::size_t | node = 0 ) |
sampleSysAggr(events), or sampleAggr(node, events) when node is given: one logged trajectory.
events TRUNCATES, it does not stop the run: JMT's maxEvents is global and cannot be asked for a count at one node, so what comes back is a prefix of the run the engine produced. Zero returns all of it.
Definition at line 746 of file solver_facade.cpp.
References line::qn::Network< T >::get_struct(), line::InputError::InputError(), line::jmt::jmt_sample_aggr(), line::jmt::jmt_sample_sys_aggr(), line::SamplePath::label, line::NetworkSolver::model_, line::NetworkSolver::opts_, line::SamplePath::state, and line::SamplePath::t.
| TranAvg line::SolverJMT::tran_avg | ( | ) |
getTranAvg(): E[N](t), averaged over options.config.replications (SolverOptions::replications, default 10) independent replications under method default; an explicit jsim is one run.
A FINITE HORIZON IS REQUIRED (options.timespan): a transient mean over an unstated horizon is not a quantity, and it is also what makes the replications' event grids commensurable.
Definition at line 717 of file solver_facade.cpp.
References line::qn::Network< T >::get_struct(), line::jmt::jmt_transient_replications(), line::TranAvg::label, line::NetworkSolver::model_, line::NetworkSolver::opts_, line::jmt::JmtReplication< T >::QNt, line::TranAvg::QNt, line::jmt::JmtReplication< T >::t, and line::TranAvg::t.