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

Multichain generalization of pfqn_busyp. More...

#include <algorithm>
#include <cmath>
#include <cstddef>
#include <limits>
#include <vector>
#include "line/api/pfqn/pfqn_busyp.h"
#include "line/num/number.h"
#include "line/util/error.h"
#include "line/util/matrix.h"
Include dependency graph for pfqn_busyp_multiclass.h:

Go to the source code of this file.

Namespaces

namespace  line
namespace  line::pfqn

Functions

template<class T>
std::vector< double > line::pfqn::pfqn_busyp_multiclass (const Matrix< T > &alpha, const Matrix< T > &mu, const std::vector< Matrix< T > > &P, const std::vector< double > &N, const std::vector< std::size_t > &subnet, const std::vector< std::size_t > &n, const Matrix< T > &gamma=Matrix< T >(), const Matrix< T > &phi=Matrix< T >(), double tol=PFQN_BUSYP_DEFAULT_TOL, int jobclass=-1)
 Mean busy period of order n for the subnetwork, multichain.

Detailed Description

Multichain generalization of pfqn_busyp.

Templated port of matlab/src/api/pfqn/pfqn_busyp_multiclass.m, jar/src/main/java/jline/api/pfqn/Pfqn_busyp_multiclass.java and python/line_solver/api/pfqn/busyp_multiclass.py.

Daduna (J. ACM 35(3), 1988) states Theorems 1 and 3 for a single chain and notes in Section 5 that they carry over to the whole product-form class. The proof uses only that the stationary law is product form and that the busy period is Keilson's mean ergodic sojourn time on a level set, neither of which is single-chain, so replacing the scalar population by a per-chain vector m gives, for a closed network,

        sum_{m : |m| >= n}   G_I(m) H(N-m)

b(n,I) = -----------------------------------------------— sum_{m : |m| = n-1} G_I(m) sum_r A_r(I) H(N-m-e_r)

with G_I and H the normalizing constants of the subnetwork and of its complement at a population VECTOR and A_r(I) the chain-r arrival flow into I. The denominator is the exact chain-r flow across the cut: a chain-r departure from the complement at population k occurs at rate alpha_ir H(k-e_r)/H(k), and the H(k) cancels the state weight. At R=1 the inner sum holds the single term m=n-1 and H(N-m-e_1)=H(N-n), so it collapses to Theorem 1 exactly, which is the regression the test runs.

THE OPEN CASE NEEDS NO LATTICE. In an open product-form network the stations are independent and the total occupancy of a node depends on the AGGREGATE load sum_r alpha_ir/mu_ir alone, since summing the station function over the compositions of t collapses the multinomial to (sum_r rho_ir)^t. It is therefore reduced here to the single-chain routine on aggregated demands.

PER CLASS: with jobclass = r the level set becomes {m_r >= n}, the jobs of chain r alone. Only chain-r arrivals move that level, so the flow sum loses its sum over r and the same two lattices serve every class.

A MIXED MODEL keeps the closed lattice with its OPEN dimensions TRUNCATED. The closed chains are conserved between the subnetwork and its complement, the open ones are not: the complement's open count is free, so its open dimensions are summed out and no e_r shift applies to an open chain, removing one job from an unbounded dimension leaving the same sum. The truncation grows until the answer stops moving, and is the only approximation in that branch. For a per-class query on a CLOSED chain there is an exact shortcut: marginalizing the open chains leaves a closed network with the demands deflated by 1/(1-rho_i^open), where the RATES and not the visits must be deflated, since A_r is built from the visit ratios.

ARITHMETIC: log domain in double, as in the three reference implementations.

Definition in file pfqn_busyp_multiclass.h.