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

CoMoM (class-oriented method of moments) for the finite repairman model: one queueing station of multiplicity m plus a delay. More...

#include <cstddef>
#include <vector>
#include "line/api/pfqn/pfqn_ca.h"
#include "line/api/pfqn/pfqn_nc_sanitize.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_comomrm.h:

Go to the source code of this file.

Classes

struct  line::pfqn::ComomResult< T >

Namespaces

namespace  line
namespace  line::pfqn

Functions

template<class T>
ComomResult< T > line::pfqn::pfqn_comomrm (const Matrix< T > &L, const std::vector< int > &N, const Matrix< T > &Z, int m)
 CoMoM (class-oriented method of moments) for the finite repairman model: one queueing station of multiplicity m plus a delay.
template<class T>
ComomResult< T > line::pfqn::pfqn_comomrm (const Matrix< T > &L, const std::vector< int > &N, const Matrix< T > &Z)
 Overload with the unit multiplicity default.

Detailed Description

CoMoM (class-oriented method of moments) for the finite repairman model: one queueing station of multiplicity m plus a delay.

Templated port of matlab/src/api/pfqn/pfqn_comomrm.m. This is the routine pfqn_nc dispatches to for the repairman case under both the 'comom' and the 'default' method.

The basis h at stage r holds 2r normalizing constants: the r "plus" moments G(n + e_s) and the r constants G(n) and G(n - e_s), s < r. Adding one class-r job applies

h <- ( F1r + F2r / n_r ) h,

with F1r a single 1 in the leading position and F2r built from the convolution equation (CE) and the population constraints (PC),

F2r = [ -C^{-1} A12 B2r ; B2r ], B2r = [ m L_r I , Z_r I ],

where C^{-1} is available in closed form for the repairman model (the reference writes it out rather than solving a system, and so does this port, so no linear solver is involved anywhere). Moving from class r-1 to class r expands the basis by interleaving two fresh entries carried over from the PREVIOUS step's basis.

SCALING. The reference renormalizes h after every step and folds the discarded factors into a log accumulator; the expansion step then divides the carried-over entries by the last scale factor to put them on the current scale. This port carries the UNSCALED basis and the previous unscaled basis instead, which makes the expansion a plain copy and makes

G(N) = Gremaind * h[R]

exact, with h[R] the reference's h(end-(R-1)). The two formulations are algebraically identical: MATLAB's lG = lG0 + log(h(end-(R-1))) + sum(log scale) is the log of exactly that product, since h_scaled * prod(scale) is the unscaled basis by construction.

Arithmetic: EXACT-CAPABLE. Every operation is an addition, a multiplication or a division in the field of the inputs. The only transcendentals in the reference are the log-space scale bookkeeping described above and the factln/exp seeding of the zero-think-time head, which is a ratio of factorials and is formed here directly.

Definition in file pfqn_comomrm.h.