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

Normalizing constant of the two-station multiclass LCFS network as a sum of PERMANENTS, the closed form of Casale, QUESTA 2026. More...

#include <cstddef>
#include <vector>
#include "line/api/pfqn/pfqn_perm.h"
#include "line/num/number.h"
#include "line/util/error.h"
#include "line/util/matrix.h"
Include dependency graph for pfqn_lcfsqn_nc.h:

Go to the source code of this file.

Namespaces

namespace  line
namespace  line::pfqn

Functions

template<class T>
line::pfqn::pfqn_lcfsqn_nc (const std::vector< T > &alpha, const std::vector< T > &beta, const std::vector< int > &N)
 Normalizing constant of the two-station multiclass LCFS network as a sum of PERMANENTS, the closed form of Casale, QUESTA 2026.

Detailed Description

Normalizing constant of the two-station multiclass LCFS network as a sum of PERMANENTS, the closed form of Casale, QUESTA 2026.

Templated port of matlab/src/api/pfqn/pfqn_lcfsqn_nc.m.

Splitting the job sequence at the position x of the boundary between the two stations gives

G(N) = ( sum_{x=0}^{K} perm(A_x, N) ) / prod_r N_r!, K = sum_r N_r,

where A_x is the (K x R) matrix of the per-position, per-class weights

A_x(i,r) = alpha_r^i for i <= x (LCFS side) A_x(i,r) = alpha_r^{i-1} beta_r for i > x (LCFS-PR side)

and the permanent is taken with column multiplicities N.

TWO REFERENCE DEFECTS, both corrected here, both invisible at the default population N = ones(1,R) and both silent for any other one.

  1. TRANSPOSED MATRIX. MATLAB's make_A builds the matrix transposed with respect to the way perm() then reads it: make_A fills A(class, position) over i = 1..R and j = 1..K, while perm(A, N) reads A(position, class) over i = 1..sum(N) and k = 1..R. The two indexings coincide only when K = R, i.e. exactly the default. For any larger population the rows i = R+1, ..., K of the matrix perm() actually reads are identically zero, so every product term in Ryser's formula contains a zero factor and the routine returns G = 0 – silently, since zero is a representable constant and nothing downstream checks positivity.
  2. MISSING prod_r N_r!. The permanent counts the ORDERED arrangements of the jobs, so it over-counts every state by the number of permutations WITHIN each class. The same division appears explicitly in the sibling routine pfqn_joint, whose local Fper ends in perm(A)/prod(factorial(N)); it is absent here. With N = ones the factorials are all 1, which is why the omission never showed.

Both corrections are verified, not assumed: with them the closed form agrees with pfqn_lcfsqn_ca – an independent recursion sharing no code – as an EXACT rational on every population tested, and without either one it does not.

Arithmetic: EXACT-CAPABLE, inheriting exactness from pfqn_perm. Note that the cost is (K+1) * prod_r (N_r + 1) * K * R, so this form is a closed-form cross-check on the recursion of pfqn_lcfsqn_ca rather than a replacement for it.

Definition in file pfqn_lcfsqn_nc.h.