![]() |
LINE Solver (C++)
Templated C++ port of the LINE queueing solver
|
SolverMAM on a LAL composition. More...
#include <line/lang/lal/solver_mam.h>
Public Types | |
| typedef std::pair< bool, std::string > | Support |
| typedef std::function< MamResult(const Composition &, double, double, const std::optional< std::string > &)> | FiniteQBDBackend |
| The Cartesian finite-QBD backend (Python's module-level lal_qbd.solve_composition); replaceable so a test can intercept it. | |
Public Member Functions | |
| SolverMAM (const Composition &model, MAMOptions options=MAMOptions()) | |
| SolverMAM (const Composition &model, const std::string &method, const nlohmann::json &kwargs=nlohmann::json::object()) | |
| SolverMAM(model, method, **kwargs) with keyword arguments as a json object. | |
| SolverMAM (const Composition &&, MAMOptions=MAMOptions())=delete | |
| SolverMAM (const Composition &&, const std::string &, const nlohmann::json &=nlohmann::json::object())=delete | |
| std::string | getName () const |
| void | reset () |
| Clear the stored result (reset). | |
| bool | hasResult () const |
| Whether a result is stored (Python solver.result is not None). | |
| Support | supportsModelMethod (const std::string &method) const |
| Method-aware structural gate (supportsModelMethod); the reason is empty when supported. | |
| SolverMAM & | runAnalyzer () |
| Run the selected lowering and store the result (runAnalyzer). | |
| StateTable | getAvgTable () |
| Agent-state probabilities (getAvgTable). | |
| ActionTable | getActTable () |
| Labelled event throughputs (getActTable and its aliases). | |
| ActionTable | get_act_table () |
| ActionTable | act_table () |
| ActionTable | GetActTable () |
| ActionTable | getActT () |
| std::vector< Matrix< double > > | getAvgTard () |
| getAvgTard(), inherited by the reference from NetworkSolver: mean class tardiness against the JobClass deadlines, as {Tard, SysTard}. | |
| std::vector< Matrix< double > > | get_avg_tard () |
| ActionTable | actT () |
| ActionTable | getActionTable () |
| double | getAvgAct (const ActionSpec &action) |
| Throughput of one LAL action (named as in SolverCTMC::getAvgAct, against the original composition). | |
| 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. | |
| const Composition & | model () const |
| The composition the solver analyzes: the lowered one when an embedded network was lowered. | |
| QueueTable | getQueueTable () |
| Queue measures of unchanged structured queue declarations (getQueueTable). | |
| QueueTable | get_queue_table () |
| nlohmann::json | getCompositionCapabilities () const |
| The binding described before solving, with runtime conditions (getCompositionCapabilities). | |
| nlohmann::json | get_composition_capabilities () const |
| nlohmann::json | getMAMDiagnostics (bool compare_ctmc=false, std::size_t max_states=1000) |
| Diagnostics, optionally compared with the finite CTMC (getMAMDiagnostics). | |
| nlohmann::json | get_mam_diagnostics (bool compare_ctmc=false, std::size_t max_states=1000) |
| void | getAvg () const |
| Queueing-network averages are refused on a composition (getAvg). | |
| const MamResult & | getMAMResult () |
| The result container, solving first if needed (getMAMResult). | |
| void | setFiniteQBDBackend (FiniteQBDBackend backend) |
| Replace the Cartesian finite-QBD backend (Python tests monkeypatch it). | |
| void | setNativeDecSourceBackend (NativeDecSourceBackend backend) |
| Replace the native dec.source solve behind the MAP-network and marked-thinning decompositions (Python tests monkeypatch SolverMAM.getAvgTable); an empty function restores the native solver. | |
Static Public Member Functions | |
| static MAMOptions | defaultOptions () |
| static std::vector< std::string > | listLALMethods () |
| Methods available for a LAL Composition (MATLAB SolverMAM.listLALMethods). | |
Public Attributes | |
| MAMOptions | options |
SolverMAM on a LAL composition.
Definition at line 231 of file solver_mam.h.
| typedef std::function<MamResult(const Composition&, double, double, const std::optional<std::string>&)> line::lal::SolverMAM::FiniteQBDBackend |
The Cartesian finite-QBD backend (Python's module-level lal_qbd.solve_composition); replaceable so a test can intercept it.
Definition at line 237 of file solver_mam.h.
| typedef std::pair<bool, std::string> line::lal::SolverMAM::Support |
Definition at line 233 of file solver_mam.h.
|
inlineexplicit |
Definition at line 239 of file solver_mam.h.
References model(), and options.
Referenced by runAnalyzer().
|
inline |
SolverMAM(model, method, **kwargs) with keyword arguments as a json object.
Definition at line 244 of file solver_mam.h.
|
delete |
|
delete |
|
inline |
Definition at line 474 of file solver_mam.h.
References getActTable().
|
inline |
Definition at line 490 of file solver_mam.h.
References getActTable().
|
inlinestatic |
Definition at line 253 of file solver_mam.h.
|
inline |
Definition at line 473 of file solver_mam.h.
References getActTable().
|
inline |
Definition at line 489 of file solver_mam.h.
References getAvgTard().
|
inline |
Definition at line 676 of file solver_mam.h.
References getCompositionCapabilities().
|
inline |
Definition at line 751 of file solver_mam.h.
References getMAMDiagnostics().
|
inline |
Definition at line 584 of file solver_mam.h.
References getQueueTable().
|
inline |
Throughputs of several actions, each named as in getAvgAct.
Definition at line 504 of file solver_mam.h.
References getAvgAct().
|
inline |
Definition at line 491 of file solver_mam.h.
References getActTable().
|
inline |
Definition at line 476 of file solver_mam.h.
References getActTable().
|
inline |
Definition at line 475 of file solver_mam.h.
References getActTable().
|
inline |
Labelled event throughputs (getActTable and its aliases).
Definition at line 472 of file solver_mam.h.
Referenced by act_table(), actT(), get_act_table(), getActionTable(), getActT(), GetActTable(), and getAvgAct().
|
inline |
Queueing-network averages are refused on a composition (getAvg).
Definition at line 756 of file solver_mam.h.
References line::ErrorKind::ErrorKind(), and line::UnsupportedError::UnsupportedError().
|
inline |
Throughput of one LAL action (named as in SolverCTMC::getAvgAct, against the original composition).
Definition at line 494 of file solver_mam.h.
References getActTable().
Referenced by getActAvg(), getAvgAct(), and getAvgAct().
|
inline |
Definition at line 495 of file solver_mam.h.
References getAvgAct().
|
inline |
Definition at line 500 of file solver_mam.h.
References getAvgAct().
|
inline |
Agent-state probabilities (getAvgTable).
Definition at line 469 of file solver_mam.h.
|
inline |
getAvgTard(), inherited by the reference from NetworkSolver: mean class tardiness against the JobClass deadlines, as {Tard, SysTard}.
It solves first when no result is held (getAvgTard.m calls getAvg) and returns what the result carries. A composition declares no JobClass and no deadline, so no LAL result carries a tardiness and both matrices are empty, as the reference returns [] for them.
Definition at line 485 of file solver_mam.h.
Referenced by get_avg_tard().
|
inline |
The binding described before solving, with runtime conditions (getCompositionCapabilities).
Definition at line 587 of file solver_mam.h.
References line::lal::Model::agents, line::lal::MamResult::correlated_service_reset, line::lal::Result::exact, line::lal::Result::fallback_reason, line::lal::MAMOptions::lal_max_phases, line::lal::MAMOptions::lal_max_states, line::lal::MAMOptions::lal_traffic_method, line::lal::MAMOptions::method, line::lal::Result::method, options, line::lal::MamResult::phase_dependent_routing, line::lal::recognize_jackson(), line::lal::recognize_map(), line::lal::recognize_parallel(), supportsModelMethod(), line::lal::MamResult::traffic, line::lal::MamResult::unavailable_busy_probabilities, line::lal::MamResult::unavailable_clock_phases, and line::lal::AgentRecord::unbounded_queue.
Referenced by get_composition_capabilities().
|
inline |
Diagnostics, optionally compared with the finite CTMC (getMAMDiagnostics).
The comparison rows are json objects with the columns of Python's merged frames (Agent, State, Probability_mam, Probability_ctmc, AbsoluteError and Action, Throughput_mam, Throughput_ctmc, AbsoluteError); a NaN error is an unavailable MAM value.
Definition at line 685 of file solver_mam.h.
References line::lal::Result::action_table, line::lal::StateRow::agent, line::lal::Model::agents, line::lal::MamResult::approximation, line::lal::MamResult::correlated_service_reset, line::ErrorKind::ErrorKind(), line::lal::Result::exact, line::lal::Result::fallback_reason, line::lal::Result::method, line::lal::MamResult::native_internal_fitting, line::lal::MamResult::native_time_scale, line::lal::MamResult::native_time_scales, line::lal::MamResult::phase_dependent_routing, line::lal::MamResult::poissonised_visit_excess, line::lal::StateRow::probability, line::lal::MamResult::residual, line::lal::MamResult::residual_kind, line::lal::ActionTable::rows, line::lal::StateTable::rows, line::lal::solve_composition(), line::lal::StateRow::state, line::lal::Result::state_table, line::lal::Result::states, line::lal::MamResult::traffic, line::lal::Result::truncated, line::lal::MamResult::unavailable_busy_probabilities, line::lal::MamResult::unavailable_clock_phases, line::lal::AgentRecord::unbounded_queue, and line::UnsupportedError::UnsupportedError().
Referenced by get_mam_diagnostics().
|
inline |
The result container, solving first if needed (getMAMResult).
Definition at line 761 of file solver_mam.h.
Referenced by line::lal::parallel_qbd().
|
inline |
Definition at line 254 of file solver_mam.h.
|
inline |
Queue measures of unchanged structured queue declarations (getQueueTable).
Definition at line 514 of file solver_mam.h.
References line::lal::Result::action_table, line::lal::Sync::active, line::lal::QueueRow::agent, line::lal::Model::agents, line::lal::QueueInfo::arrivals, line::lal::QueueRow::arvr, line::lal::QueueRow::busy, line::lal::QueueInfo::departures, line::lal::endpoint_label(), line::lal::Result::exact, line::lal::MamResult::mean_level, line::lal::Result::method, line::lal::Model::min_syncs, line::lal::AgentRecord::name, line::lal::Sync::passive, line::lal::QueueRow::qlen, line::lal::AgentRecord::queue_info, line::lal::MamResult::queue_means, line::lal::MamResult::queue_measures, line::lal::MamResult::raw_action_table, line::lal::QueueRow::respt, line::lal::StateTable::rows, line::lal::QueueInfo::servers, line::lal::QueueInfo::service_inputs, line::lal::Result::state_table, line::lal::Model::syncs, line::lal::ActionTable::throughput(), line::lal::QueueRow::tput, line::lal::Result::truncated, line::lal::AgentRecord::unbounded_queue, and line::lal::QueueRow::util.
Referenced by get_queue_table(), and line::lal::parallel_qbd().
|
inline |
Whether a result is stored (Python solver.result is not None).
Definition at line 268 of file solver_mam.h.
|
inlinestatic |
Methods available for a LAL Composition (MATLAB SolverMAM.listLALMethods).
Definition at line 257 of file solver_mam.h.
|
inline |
The composition the solver analyzes: the lowered one when an embedded network was lowered.
Definition at line 511 of file solver_mam.h.
Referenced by SolverMAM(), and SolverMAM().
|
inline |
Clear the stored result (reset).
Definition at line 262 of file solver_mam.h.
Referenced by setFiniteQBDBackend(), and setNativeDecSourceBackend().
|
inline |
Run the selected lowering and store the result (runAnalyzer).
Definition at line 342 of file solver_mam.h.
References line::lal::Result::action_table, line::lal::Model::agent(), line::lal::Model::agents, line::lal::MAMOptions::arith, line::lal::ActionTable::attrs, line::lal::StateTable::attrs, line::lal::MAMOptions::config, line::lal::MAMOptions::cutoff, line::ErrorKind::ErrorKind(), line::lal::Result::fallback_reason, line::lal::TableAttrs::fallback_reason, line::Error::id(), line::lal::infinite_qbd(), line::InputError::InputError(), line::lal::jackson(), line::lal::MAMOptions::lal_compress_method, line::lal::MAMOptions::lal_fit_time, line::lal::MAMOptions::lal_fit_tolerance, line::lal::MAMOptions::lal_level_agent, line::lal::MAMOptions::lal_max_phases, line::lal::MAMOptions::lal_max_states, line::lal::MAMOptions::lal_traffic_method, line::lal::MAMOptions::lang, line::lal::map_network(), line::lal::marked_thinning(), line::lal::MAMOptions::max_iter, line::lal::MAMOptions::method, line::lal::AgentRecord::name, options, line::lal::parallel_qbd(), line::lal::qbd_structure(), line::lal::MamResult::queue_measures, line::lal::MamResult::raw_action_table, line::lal::reachable_qbd(), line::lal::recognize_jackson(), line::lal::recognize_map(), line::lal::recognize_parallel(), line::lal::relabel_action_table(), line::lal::signature(), line::lal::solve_reduced(), SolverMAM(), line::lal::Result::state_table, line::lal::AgentRecord::states, supportsModelMethod(), line::lal::MAMOptions::timeout, line::lal::MAMOptions::timespan, line::lal::MAMOptions::tol, line::lal::MamResult::traffic, and line::UnsupportedError::UnsupportedError().
|
inline |
Replace the Cartesian finite-QBD backend (Python tests monkeypatch it).
Definition at line 764 of file solver_mam.h.
References reset().
|
inline |
Replace the native dec.source solve behind the MAP-network and marked-thinning decompositions (Python tests monkeypatch SolverMAM.getAvgTable); an empty function restores the native solver.
Definition at line 774 of file solver_mam.h.
References reset().
|
inline |
Method-aware structural gate (supportsModelMethod); the reason is empty when supported.
Definition at line 271 of file solver_mam.h.
References line::lal::Model::agents, line::lal::has_discrete(), line::lal::MAMOptions::lal_level_agent, line::lal::MAMOptions::lal_max_phases, line::lal::MAMOptions::lal_max_states, line::lal::MAMOptions::lal_traffic_method, line::lal::model_features(), options, line::lal::qbd_structure(), line::lal::recognize_jackson(), line::lal::recognize_map(), and line::lal::recognize_parallel().
Referenced by getCompositionCapabilities(), and runAnalyzer().
| MAMOptions line::lal::SolverMAM::options |
Definition at line 251 of file solver_mam.h.
Referenced by getCompositionCapabilities(), runAnalyzer(), SolverMAM(), SolverMAM(), and supportsModelMethod().