![]() |
LINE Solver (C++)
Templated C++ port of the LINE queueing solver
|
Classes | |
| struct | QnsOptions |
| SolverQNS.defaultOptions plus the two knobs the JMVA document carries. More... | |
Functions | |
| std::vector< std::string > | list_valid_methods () |
| Port of SolverQNS.listValidMethods. | |
| bool | is_qnsolver_multiserver (const std::string &m) |
| The approximations qnsolver -m accepts; the rest reach it only via LQNS. | |
| template<class T> | |
| std::string | method_refusal (const qn::NetworkStruct< T > &L, const std::string &method) |
| SolverQNS.supportsModelMethod's structural rules, as the REASON they refuse, empty when the pair is served. | |
| bool | is_available () |
| Port of SolverQNS.isAvailable: a native qnsolver binary on the PATH. | |
| void | check_method (const std::string &method) |
| Port of runAnalyzer's method gate. | |
| std::string | resolve_multiserver (const QnsOptions &opt) |
| Port of the method -> options.config.multiserver map of runAnalyzer.m. | |
| template<class T> | |
| void | check_supported (const qn::NetworkStruct< T > &L) |
| The gate runAnalyzer.m reaches through runAnalyzerChecks, narrowed to what the JMVA document can actually carry. | |
| template<class T> | |
| mva::AvgResult< T > | solver_qns_run_analyzer (const qn::NetworkStruct< T > &L, const QnsOptions &opt) |
| Port of @@SolverQNS/runAnalyzer.m and solver_qns.m. | |
|
inline |
Port of runAnalyzer's method gate.
Definition at line 162 of file solver_qns.h.
References check_method(), line::InputError::InputError(), and list_valid_methods().
Referenced by check_method(), and solver_qns_run_analyzer().
| void line::qns::check_supported | ( | const qn::NetworkStruct< T > & | L | ) |
The gate runAnalyzer.m reaches through runAnalyzerChecks, narrowed to what the JMVA document can actually carry.
The reference's feature set admits nodes – a Cache, a Place, a Transition – that writeJMVA then drops on the floor, and the tool answers a SMALLER model than the caller handed it with no indication that it did. A station the document cannot express is refused by name here instead.
Definition at line 267 of file solver_qns.h.
References check_supported(), line::qn::NetworkStruct< T >::has_priorities(), line::qn::NetworkStruct< T >::nodes, line::qn::NetworkStruct< T >::nstations, line::qn::NetworkStruct< T >::station_to_node, line::qn::NetworkStruct< T >::stations, and line::UnsupportedError::UnsupportedError().
Referenced by check_supported(), and solver_qns_run_analyzer().
|
inline |
Port of SolverQNS.isAvailable: a native qnsolver binary on the PATH.
There is no container fallback, here as in the other three codebases: qnsolver ships with LQNS, whose licence forbids providing the software to another party, so no LINE code path resolves or runs an image carrying it.
Definition at line 154 of file solver_qns.h.
References line::util::capture(), line::util::ProcResult::exitCode, and is_available().
Referenced by is_available(), and solver_qns_run_analyzer().
|
inline |
The approximations qnsolver -m accepts; the rest reach it only via LQNS.
Definition at line 86 of file solver_qns.h.
References is_qnsolver_multiserver().
Referenced by is_qnsolver_multiserver(), method_refusal(), and solver_qns_run_analyzer().
|
inline |
Port of SolverQNS.listValidMethods.
Definition at line 81 of file solver_qns.h.
References list_valid_methods().
Referenced by line::autosolver::auto_family_methods(), check_method(), and list_valid_methods().
| std::string line::qns::method_refusal | ( | const qn::NetworkStruct< T > & | L, |
| const std::string & | method ) |
SolverQNS.supportsModelMethod's structural rules, as the REASON they refuse, empty when the pair is served.
A STRING RATHER THAN A THROW, the shape ba::method_refusal and ag::runner_detail::method_refusal already carry: the AUTO report has to ASK the question without raising, so that a pair it offers is a pair the run accepts. solver_qns_run keeps the throws, which are the same two rules stated where the run reaches them.
Mirrors matlab/src/solvers/wrappers/QNS/qns_immfeed_refusal.m and qns_multiserver_refusal.m, and the JAR's qnsImmfeedRefusal / qnsMultiserverRefusal.
Definition at line 105 of file solver_qns.h.
References line::qn::NetworkStruct< T >::has_immediate_feedback(), is_qnsolver_multiserver(), method_refusal(), line::qn::NetworkStruct< T >::nstations, and line::qn::NetworkStruct< T >::stations.
Referenced by line::autosolver::auto_family_refusal(), and method_refusal().
|
inline |
Port of the method -> options.config.multiserver map of runAnalyzer.m.
default resolves to rolia, as runAnalyzer.m does. THE REFERENCE HAS TWO ENTRY POINTS AND THEY DISAGREE on an explicit config: runAnalyzer.m overwrites options.config.multiserver unconditionally at method default, so a MATLAB caller who sets it through the solver constructor is silently ignored, while solver_qns.m called directly honours it and maps its own default to CONWAY. This resolves the pair the only way that is a superset of neither: the method wins when named, an explicit config is honoured (the low-level reference's behaviour, and the only way a caller can express the choice at all), and an unset one gives rolia (the high-level reference's). Native Python currently leaves default at CONWAY here, which is a genuine divergence from MATLAB and the JAR; see the report accompanying this audit.
Definition at line 185 of file solver_qns.h.
References resolve_multiserver().
Referenced by resolve_multiserver(), and solver_qns_run_analyzer().
| mva::AvgResult< T > line::qns::solver_qns_run_analyzer | ( | const qn::NetworkStruct< T > & | L, |
| const QnsOptions & | opt ) |
Port of @@SolverQNS/runAnalyzer.m and solver_qns.m.
| L | the refreshed struct |
| opt | the method, the multiserver rule and the JMVA sample cap |
Definition at line 291 of file solver_qns.h.
References line::mva::AvgResult< T >::actualmethod, line::mva::AvgResult< T >::AN, line::mva::ArvR, line::mva::ClassResults< T >::C, line::util::capture(), line::qn::check_binding_capacity(), check_method(), check_supported(), line::qn::NetworkStruct< T >::classes, line::mva::AvgResult< T >::CN, line::lqns::LqnsSolution< T >::defined_Q, line::lqns::LqnsSolution< T >::defined_R, line::lqns::LqnsSolution< T >::defined_T, line::lqns::LqnsSolution< T >::defined_U, line::util::ProcResult::exitCode, line::util::TempDir::file(), line::mva::filter_metric(), line::lqns::SolverLQNS< T >::get_ensemble_avg(), line::lqns::SolverLQNS< T >::get_struct(), line::qn::NetworkStruct< T >::has_immediate_feedback(), line::qn::NetworkStruct< T >::has_priorities(), line::qn::NetworkStruct< T >::has_product_form(), line::qn::NetworkStruct< T >::inchain, is_available(), is_qnsolver_multiserver(), line::mva::AvgResult< T >::iter, line::lqns::LqnsSolution< T >::iterations, line::lqns::LqnsOptions::keep, line::util::TempDir::keep(), line::mva::AvgResult< T >::method, line::lqns::LqnsOptions::multiserver, line::qn::NetworkStruct< T >::nchains, line::qn::NetworkStruct< T >::nclasses, line::qn::NetworkStruct< T >::nodes, line::qn::NetworkStruct< T >::nstations, line::NumericError::NumericError(), line::util::ProcResult::out, line::mva::ClassResults< T >::Q, line::mva::QLen, line::lqns::LqnsSolution< T >::QN, line::mva::AvgResult< T >::QN, line::io::qn2lqn(), line::mva::ClassResults< T >::R, line::mva::ResidT, resolve_multiserver(), line::mva::RespT, line::lqns::LqnsSolution< T >::RN, line::mva::AvgResult< T >::RN, line::lqns::LqnsOptions::samples, line::mva::sn_deaggregate_chain_results(), line::mva::sn_get_arvr_from_tput(), line::mva::sn_get_demands_chain(), line::mva::sn_get_residt_from_respt(), solver_qns_run_analyzer(), line::qn::NetworkStruct< T >::station_to_node, line::qn::NetworkStruct< T >::stations, line::util::LineConsole::step(), line::util::ProcResult::timedOut, line::lqns::LqnsOptions::timeout_seconds, line::lqns::LqnsSolution< T >::TN, line::mva::AvgResult< T >::TN, line::mva::ClassResults< T >::Tp, line::mva::Tput, line::mva::ClassResults< T >::U, line::lqns::LqnsSolution< T >::UN, line::mva::AvgResult< T >::UN, line::UnsupportedError::UnsupportedError(), line::mva::Util, line::mva::ChainDemands< T >::Vchain, line::mva::AvgResult< T >::WN, line::io::write_jmva(), line::mva::ClassResults< T >::X, and line::mva::AvgResult< T >::XN.
Referenced by solver_qns_run_analyzer().