![]() |
LINE Solver (C++)
Templated C++ port of the LINE queueing solver
|
Exact Mean Value Analysis for mixed open/closed networks with multiserver stations. More...
#include <algorithm>#include <cmath>#include <cstddef>#include <limits>#include <vector>#include "line/api/pfqn/pfqn_mva.h"#include "line/num/number.h"#include "line/util/error.h"#include "line/util/matrix.h"#include "line/util/population.h"Go to the source code of this file.
Classes | |
| struct | line::pfqn::MvaLdResult< T > |
| Result of pfqn_mvald, mirroring the seven MATLAB outputs. More... | |
Namespaces | |
| namespace | line |
| namespace | line::pfqn |
Functions | |
| bool | line::pfqn::is_open_class (int n) |
| True when the population entry denotes an open class. | |
| template<class T> | |
| MvaLdResult< T > | line::pfqn::pfqn_mvald (const Matrix< T > &L, const std::vector< int > &N, const Matrix< T > &Z, const Matrix< T > &mu, bool stabilize=true) |
| Exact MVA for a closed network of load-dependent stations. | |
| template<class T> | |
| MvaResult< T > | line::pfqn::pfqn_mvamx (const std::vector< T > &lambda, const Matrix< T > &D, const std::vector< int > &N, const Matrix< T > &Z, const std::vector< int > &mi) |
| Exact MVA for a mixed open/closed network of single-server stations. | |
| template<class T> | |
| MvaResult< T > | line::pfqn::pfqn_mvaldmx (const std::vector< T > &lambda, const Matrix< T > &D, const std::vector< int > &N, const Matrix< T > &Z, const Matrix< T > &mu) |
| Exact MVA for mixed open/closed networks with limited load dependence. | |
| template<class T> | |
| MvaResult< T > | line::pfqn::pfqn_mvaldms (const std::vector< T > &lambda, const Matrix< T > &D, const std::vector< int > &N, const Matrix< T > &Z, const std::vector< int > &S) |
| Exact MVA for mixed open/closed networks with multiserver stations. | |
| template<class T> | |
| MvaResult< T > | line::pfqn::pfqn_mvams (const std::vector< T > &lambda, const Matrix< T > &L, const std::vector< int > &N, const Matrix< T > &Z, const std::vector< int > &mi, const std::vector< int > &S) |
| General-purpose exact MVA for mixed networks with multiserver stations. | |
| template<class T> | |
| MvaResult< T > | line::pfqn::pfqn_mvams (const std::vector< T > &lambda, const Matrix< T > &L, const std::vector< int > &N, const Matrix< T > &Z, const std::vector< int > &S) |
| Overload with unit multiplicities. | |
| template<class T> | |
| MvaResult< T > | line::pfqn::pfqn_mvams (const std::vector< T > &lambda, const Matrix< T > &L, const std::vector< int > &N, const Matrix< T > &Z) |
| Overload with unit multiplicities and a single server everywhere. | |
| template<class T> | |
| MvaResult< T > | line::pfqn::pfqn_mvams_ilock (const std::vector< T > &lambda, const Matrix< T > &L, const std::vector< int > &N, const Matrix< T > &Z, const std::vector< int > &mi, const std::vector< int > &S, const Matrix< T > &IL) |
| MVA entry point for models carrying the interlocked-flow correction. | |
Variables | |
| constexpr int | line::pfqn::OPEN_CLASS = -1 |
| Marks an open (infinite-population) class in a population vector. | |
| constexpr int | line::pfqn::INF_SERVERS = -1 |
| Marks an infinite-server station in a server-count vector. | |
Exact Mean Value Analysis for mixed open/closed networks with multiserver stations.
Templated port of matlab/src/api/pfqn/pfqn_mvams.m. That function is a dispatcher over four exact MVA variants, so the port carries them all:
no multiserver, closed -> pfqn_mva (pfqn_mva.h, already ported) no multiserver, mixed -> pfqn_mvamx (below) multiserver, closed -> pfqn_mvald (below) multiserver, mixed -> pfqn_mvaldms (below, via pfqn_mvaldmx)
pfqn_mvald is the load-dependent MVA of Reiser and Lavenberg, carrying the marginal queue-length distribution pi(k|n) along the population lattice; pfqn_mvaldmx is the Bruell-Balbo-Ashfari mixed extension for limited load dependence, whose effective-capacity terms come from pfqn_ldmx_ec. A multiserver station with S servers is the load-dependent station with rates mu(i,k) = min(k, S), which is where the "ms" in the name comes from.
Arithmetic. Every step of all four variants is an addition, a subtraction, a multiplication, a division or an integer power in the field of the inputs: the family is exact-capable end to end and needs no transcendental function. The only non-field step in MATLAB is the log used to accumulate lG, and the port does what pfqn_mva.h already does, accumulating the product of the reciprocal throughputs along the lattice path and taking the log once at the end of a value that is still exact.
Contract notes, where this port deliberately differs from MATLAB:
Index conventions. An open class is marked by OPEN_CLASS in the population vector (MATLAB uses Inf, which an int vector cannot hold) and an infinite server station by INF_SERVERS in the server-count vector (MATLAB uses Inf).
Definition in file pfqn_mvams.h.