![]() |
LINE Solver (C++)
Templated C++ port of the LINE queueing solver
|
The CHAIN-level and SYSTEM-level views of a solved model. More...
#include <cmath>#include <cstddef>#include <string>#include <vector>#include "line/lang/qn/network_struct.h"#include "line/num/number.h"#include "line/solvers/mva/sn_chain.h"#include "line/solvers/mva/solver_mva_runner.h"#include "line/util/error.h"#include "line/util/matrix.h"Go to the source code of this file.
Classes | |
| struct | line::solvers::SysResult< T > |
| @@NetworkSolver/getAvgSys: one response time and one throughput per chain. More... | |
| struct | line::solvers::ChainResult< T > |
| The station- or node-level table aggregated by chain. More... | |
Namespaces | |
| namespace | line |
| namespace | line::solvers |
Functions | |
| template<class T> | |
| SysResult< T > | line::solvers::solver_get_avg_sys (const qn::NetworkStruct< T > &sn, const mva::AvgResult< T > &r) |
| Port of @@NetworkSolver/getAvgSys.m. | |
| template<class T> | |
| ChainResult< T > | line::solvers::solver_get_avg_chain (const qn::NetworkStruct< T > &sn, const mva::AvgResult< T > &r) |
| Port of @@NetworkSolver/getAvgChain.m: the station table aggregated by chain. | |
| template<class T> | |
| ChainResult< T > | line::solvers::solver_get_avg_node_chain (const qn::NetworkStruct< T > &sn, const Matrix< T > &QNn, const Matrix< T > &UNn, const Matrix< T > &RNn, const Matrix< T > &WNn, const Matrix< T > &ANn, const Matrix< T > &TNn) |
| Port of @@NetworkSolver/getAvgNodeChain.m: the NODE table aggregated by chain. | |
| std::vector< std::string > | line::solvers::chain_names (std::size_t nchains) |
| Chain1, Chain2, ... – the reference's own chain labels. | |
| template<class T> | |
| std::vector< std::string > | line::solvers::chain_class_labels (const qn::NetworkStruct< T > &sn) |
| (ClassA ClassB), the JobClasses column: which classes a chain holds. | |
The CHAIN-level and SYSTEM-level views of a solved model.
Ports of @@NetworkSolver/getAvgSys.m, getAvgChain.m and getAvgNodeChain.m with the tables built on top of them (getAvgSysTable, getAvgChainTable, getAvgNodeChainTable).
A CHAIN IS NOT A CLASS AND THE AGGREGATION IS NOT A SUM FOR EVERY METRIC, which is the whole reason these live apart from the AvgTable. Queue lengths, utilizations, arrival rates, throughputs and residence times are ADDITIVE over the classes of a chain, so their chain value is the row sum. Response time is NOT: a chain's response time at a station is the per-visit time averaged over the classes with the VISIT SHARE alpha as the weight, because a job of the chain arrives as one class or another in proportion to how often that class visits. Summing it instead would report the total time a job would spend if it were every class at once.
The system view is a third thing again. getAvgSys returns one response time and one throughput PER CHAIN, both measured at the chain's reference station: the throughput is the completing flow INTO that station, read off the routing matrix, and the response time is the cycle time – Little's law on a closed chain, the visit-weighted sum of the per-class system times on an open one.
INDEXING: these functions take a solved mva::AvgResult (station x class) and the struct it was solved from, and never re-solve. That keeps them usable from any solver whose runner returns an AvgResult, which is what the reference means by putting them on @NetworkSolver rather than on one solver.
ONE DEVIATION FROM THE REFERENCE, STATED: getAvgSys.m indexes sn.rt and, in one branch, sn.visits{c} with a STATION index, while both matrices are indexed by STATEFUL node. The two orders coincide on every model whose stateful nodes are all stations – which is every model the reference is exercised on – and differ as soon as one is not (a Cache, a Logger). This port uses stateful_of_station, so it agrees with the reference wherever the reference is self-consistent and is correct where it is not.
Definition in file solver_chain_tables.h.