![]() |
LINE Solver (C++)
Templated C++ port of the LINE queueing solver
|
Exact finite CTMC enumeration or MDD aggregation of a composition. More...
#include <line/lang/lal/solvers.h>
Public Member Functions | |
| SolverCTMC (const Composition &model, CTMCOptions options=CTMCOptions()) | |
| The solver REFERENCES model, as Python's re-reads self.model on every query: a later edit (an added agent or sync, hide, setReward) changes the signature and the next query re-solves. | |
| SolverCTMC (const Composition &&, CTMCOptions=CTMCOptions())=delete | |
| std::pair< bool, std::optional< std::string > > | supportsModelMethod (const std::string &method) const |
| SolverCTMC & | runAnalyzer () |
| void | reset () |
| StateTable | getAvgTable () |
| ActionTable | getActTable () |
| ActionTable | getActT () |
| ActionTable | getActionTable () |
| double | getAvgAct (const ActionSpec &action) |
| Throughput of one LAL action (getAvgAct): named by label, by agent.action("x"), by composition.action(...) or by ActionSpec::key(node, EventType[, class]); an open class or a trailing [*] sums the family. | |
| double | getAvgAct (const std::string &node, lang::EventType event, const std::optional< std::string > &jobclass=std::nullopt, const std::optional< std::string > &mode=std::nullopt) |
| double | getAvgAct (std::size_t node, lang::EventType event, std::size_t jobclass=0) |
| std::vector< double > | getActAvg (const std::vector< ActionSpec > &actions) |
| Throughputs of several actions, each named as in getAvgAct. | |
| double | get_avg_act (const ActionSpec &action) |
| std::vector< double > | get_act_avg (const std::vector< ActionSpec > &actions) |
| std::pair< std::vector< double >, std::vector< std::string > > | getAvgReward () |
| The rewards declared with Composition::setReward, on the stationary law: (R, names). | |
| std::vector< double > | getProbSys () |
| Joint stationary distribution in getStateSpace order (MATLAB getProbSys). | |
| Matrix< double > | getInfGen () |
| std::pair< Matrix< double >, std::vector< Matrix< double > > > | getGenerator () |
| The generator and the event filters, in getEventLabels order. | |
| std::vector< std::string > | getEventLabels () |
| std::pair< std::vector< std::vector< std::string > >, std::vector< std::vector< std::string > > > | getStateSpace () |
| Joint state names, one row per state and one column per agent, plus the per-agent columns (Python returns the object array and its column slices). | |
| std::vector< double > | getTranProbSys (double t) |
| Transient joint distribution pi0 exp(Q t). | |
| const mdd::MddMcdResult< double > & | getMDDResult () |
| MDD aggregation details (Python's _result.mdd); throws unless the method run was mdd. | |
| std::string | getResultMethod () |
| void | getAvg () const |
| void | getAvgQLen () const |
Static Public Member Functions | |
| static bool | supports (const Composition &) |
Public Attributes | |
| CTMCOptions | options |
| std::function< Result(const Model &, std::size_t)> | ctmc_backend |
| Test seam: replaces the explicit CTMC call (Python tests monkeypatch it). | |
Exact finite CTMC enumeration or MDD aggregation of a composition.
Methods: default/exact (explicit CTMC; default falls back to mdd on a state-space limit when MDD supports the model) and mdd.
|
inlineexplicit |
The solver REFERENCES model, as Python's re-reads self.model on every query: a later edit (an added agent or sync, hide, setReward) changes the signature and the next query re-solves.
model must outlive the solver, so a temporary is refused at compile time.
Definition at line 97 of file solvers.h.
References options.
Referenced by runAnalyzer().
|
delete |
|
inline |
Definition at line 222 of file solvers.h.
References getActAvg().
|
inline |
Definition at line 221 of file solvers.h.
References getAvgAct().
|
inline |
Throughputs of several actions, each named as in getAvgAct.
Definition at line 216 of file solvers.h.
References getAvgAct().
Referenced by get_act_avg().
|
inline |
Definition at line 198 of file solvers.h.
References getActTable().
|
inline |
Definition at line 197 of file solvers.h.
References getActTable().
|
inline |
Definition at line 191 of file solvers.h.
References line::ErrorKind::ErrorKind(), and line::UnsupportedError::UnsupportedError().
Referenced by getActionTable(), getActT(), and getAvgAct().
|
inline |
Definition at line 325 of file solvers.h.
References line::ErrorKind::ErrorKind(), and line::UnsupportedError::UnsupportedError().
|
inline |
Throughput of one LAL action (getAvgAct): named by label, by agent.action("x"), by composition.action(...) or by ActionSpec::key(node, EventType[, class]); an open class or a trailing [*] sums the family.
Definition at line 206 of file solvers.h.
References getActTable().
Referenced by get_avg_act(), getActAvg(), getAvgAct(), and getAvgAct().
|
inline |
Definition at line 207 of file solvers.h.
References getAvgAct().
|
inline |
Definition at line 212 of file solvers.h.
References getAvgAct().
|
inline |
Definition at line 326 of file solvers.h.
References line::ErrorKind::ErrorKind(), and line::UnsupportedError::UnsupportedError().
|
inline |
The rewards declared with Composition::setReward, on the stationary law: (R, names).
Definition at line 225 of file solvers.h.
References line::ErrorKind::ErrorKind(), and line::UnsupportedError::UnsupportedError().
|
inline |
|
inline |
Definition at line 258 of file solvers.h.
References line::ErrorKind::ErrorKind(), and line::UnsupportedError::UnsupportedError().
|
inline |
The generator and the event filters, in getEventLabels order.
Definition at line 253 of file solvers.h.
References getInfGen().
|
inline |
Definition at line 245 of file solvers.h.
References line::ErrorKind::ErrorKind(), and line::UnsupportedError::UnsupportedError().
Referenced by getGenerator().
|
inline |
MDD aggregation details (Python's _result.mdd); throws unless the method run was mdd.
Definition at line 317 of file solvers.h.
References line::ErrorKind::ErrorKind(), and line::UnsupportedError::UnsupportedError().
|
inline |
Joint stationary distribution in getStateSpace order (MATLAB getProbSys).
Definition at line 237 of file solvers.h.
References line::ErrorKind::ErrorKind(), and line::UnsupportedError::UnsupportedError().
|
inline |
|
inline |
Joint state names, one row per state and one column per agent, plus the per-agent columns (Python returns the object array and its column slices).
Definition at line 268 of file solvers.h.
References line::ErrorKind::ErrorKind(), and line::UnsupportedError::UnsupportedError().
|
inline |
Transient joint distribution pi0 exp(Q t).
Definition at line 281 of file solvers.h.
References line::ErrorKind::ErrorKind(), line::expm(), line::InputError::InputError(), line::Matrix< T >::size(), and line::UnsupportedError::UnsupportedError().
|
inline |
Definition at line 128 of file solvers.h.
References line::lal::Result::action_table, line::lal::ActionTable::attrs, line::lal::StateTable::attrs, line::lal::Result::compiled, line::lal::CTMCOptions::config, line::lal::CTMCOptions::ctmc_max_states, line::ErrorKind::ErrorKind(), line::lal::has_discrete(), line::Error::id(), line::lal::CTMCOptions::init_sol, line::lal::CTMCOptions::method, options, line::lal::Result::probabilities, line::lal::Result::rewards, line::lal::solve_mdd(), SolverCTMC(), line::lal::Result::state_table, line::lal::Result::states, supportsModelMethod(), line::lal::CTMCOptions::timespan, and line::UnsupportedError::UnsupportedError().
|
inlinestatic |
|
inline |
Definition at line 105 of file solvers.h.
References line::lal::Model::agents, line::lal::AgentRecord::initial_distribution, line::lal::Model::min_syncs, and line::lal::model_features().
Referenced by runAnalyzer().
| CTMCOptions line::lal::SolverCTMC::options |
Definition at line 101 of file solvers.h.
Referenced by runAnalyzer(), and SolverCTMC().