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

Closed-lattice station tables of an order-independent (OI) station visited by CLOSED and OPEN classes, with the open classes summed out exactly. More...

#include <algorithm>
#include <cmath>
#include <cstddef>
#include <functional>
#include <limits>
#include <sstream>
#include <string>
#include <vector>
#include "line/num/number.h"
#include "line/util/error.h"
#include "line/util/matrix.h"
Include dependency graph for pfqn_oi_mixed.h:

Go to the source code of this file.

Classes

struct  line::pfqn::OiMixedOptions
 The tuning fields of pfqn_oi_mixed / pfqn_oi_open (OPTIONS in the reference). More...
struct  line::pfqn::OiMixedResult< T >
 Return value of pfqn_oi_mixed, mirroring [W, H, S, stable, tau, method]. More...

Namespaces

namespace  line
 Conservation laws of a layered queueing network, enumerated from its structure.
namespace  line::pfqn

Functions

template<class T>
OiMixedResult< T > line::pfqn::pfqn_oi_mixed (const std::vector< T > &lambda, const std::vector< double > &N, const std::function< T(const std::vector< int > &)> &mu, const OiMixedOptions &opt=OiMixedOptions())
 Closed-lattice station tables of an OI station with open classes summed out.

Detailed Description

Closed-lattice station tables of an order-independent (OI) station visited by CLOSED and OPEN classes, with the open classes summed out exactly.

Templated port of matlab/src/api/pfqn/pfqn_oi_mixed.m. Class r is closed when N(r) is finite and open when N(r) = Inf. For each closed count vector c (0 <= c <= N on the closed classes) the routine returns

W(c) = sum_o Phi(c, o) * prod_r lambda_r^{n_r}, H_r(c) = sum_o n_r Phi(c, o) * prod_r lambda_r^{n_r}, S_r(c) = sum_o Xi_r(c, o) * prod_r lambda_r^{n_r},

where o runs over ALL open count vectors, n = (c, o), Phi is the OI balance function (pfqn_ncoi) and Xi_r its in-service weight (pfqn_oi_insvc). LAMBDA is the visit ratio of a closed class and the offered traffic lambda_r * V_ir of an open class. W is the station's factor in the closed-chain convolution of a MIXED product-form network (OI queues are quasi-reversible, Berezner, Kriel, Krzesinski 1995); H and S give the per-class mean and in-service weights. With no closed class the lattice is the single point c = 0 and E[n_r] = H_r/W, E[sir_r] = S_r/W are the open station's means (pfqn_oi_open).

SATURATION RECURSION. With tau_r the per-class cutoffs of the OPEN classes, mu(c, o) = mu(c, min(o, tau)) for every closed c <= N, the open coordinates collapse into macrostates (m_r = tau_r stands for every o_r >= tau_r) while the closed coordinates stay exact. With den(m) = mu(m) - sum_{r open, m_r = tau_r} lambda_r,

G(m) den(m) = sum_{r: m_r>0} lambda_r G(m - e_r) H_j(m) den(m) = sum_{r: m_r>0} lambda_r H_j(m - e_r)

  • lambda_j 1{m_j>0} (1{j open, m_j = tau_j} G(m) + G(m - e_j)) S_j(m) den(m) = sum_{r: m_r>0} lambda_r S_j(m - e_r)
  • lambda_j 1{m_j>0} 1{mu(m) > mu(m - e_j)} G(m - e_j)

and W, H, S are the sums of G, H, S over the open macrostates at each c. A reachable macrostate with den(m) <= 0 makes its open series diverge: the station is unstable (stable = false). With every cutoff 1 and no closed class this is the Bonald-Comte-Mathieu (2017) class-subset recursion.

NON-SATURATING RATES. When the open coordinates do not saturate within taumax, the rate is frozen at a uniform open cutoff T and T is doubled until the tables move by less than tol (relative); method is then "oi.trunc", and the run fails by name past maxstates macrostates.

UNSTABLE STATION. The reference fills W, H and S with Inf; this port leaves them at zero and reports stable = false, because infinity has no representation under exact arithmetic. Every caller tests stable first.

ARITHMETIC. The recursion is additions, multiplications and divisions, so it runs in any field; the saturation and convergence tests are tolerance tests and are taken in double, as the reference takes them.

Definition in file pfqn_oi_mixed.h.