LINE Solver (C++)
Templated C++ port of the LINE queueing solver
Loading...
Searching...
No Matches
pfqn_mvams.h File Reference

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"
Include dependency graph for pfqn_mvams.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.

Detailed Description

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:

  1. UN in the closed multiserver branch. MATLAB documents pfqn_mvams as returning an (M x R) utilization, and three of its four branches do, but the closed multiserver branch forwards pfqn_mvald's UN, which is the (M x 1) aggregate 1 - P(station i empty). This port returns the (M x R) per-class utilization law U(i,r) = X(r) L(i,r) / S(i), the same formula pfqn_mvaldms already uses in the mixed multiserver branch, so the metric set matches MvaResult and is consistent across all four branches. The aggregate form is still available from pfqn_mvald directly, whose result carries both UN and the full marginal distribution.
  2. Queue replicas with multiservers. MATLAB rejects mi > 1 for the mixed multiserver branch but silently drops mi in the closed multiserver branch, because pfqn_mvald has no mi argument: the replicas then affect only the residence time reported for absent classes. This port rejects mi > 1 in both multiserver branches rather than returning numbers that ignore an argument the caller supplied.

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.