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

Port of solver_mam_ldqbd.m: the level-dependent QBD analyzer for a single-class network of one infinite server and one FCFS queue. More...

#include <algorithm>
#include <cmath>
#include <cstddef>
#include <string>
#include <vector>
#include "line/api/mam/ldqbd.h"
#include "line/api/mam/ldqbd_mphc.h"
#include "line/api/mam/map_moment.h"
#include "line/api/mam/qbd_setupdelayoff.h"
#include "line/lang/distribution.h"
#include "line/lang/qn/network_struct.h"
#include "line/solvers/mam/mam_types.h"
#include "line/solvers/mva/mva_types.h"
#include "line/util/error.h"
#include "line/util/matrix.h"
Include dependency graph for solver_mam_ldqbd.h:

Go to the source code of this file.

Classes

struct  line::mam::LdqbdBlocks< T >
 The LD-QBD blocks and parameters, the reference's optional eighth output. More...
struct  line::mam::LdqbdSolution< T >
 What the analyzer returns: the metrics plus the blocks it built them from. More...

Namespaces

namespace  line
namespace  line::mam

Functions

template<class T>
LdqbdSolution< T > line::mam::solver_mam_ldqbd (const qn::NetworkStruct< T > &L, const MamOptions &opt)
 Port of solver_mam_ldqbd.m.

Detailed Description

Port of solver_mam_ldqbd.m: the level-dependent QBD analyzer for a single-class network of one infinite server and one FCFS queue.

WHY THIS MATTERS MORE THAN ITS SIZE SUGGESTS. It is the one branch of the MAM ladder where the reference prefers an EXACT method over the dec.source decomposition, and solver_mam_analyzer.m routes default here for a single-class closed Delay+Queue. The level-dependent arrival rate (N - n) lambda captures the population constraint that dec.source can only approximate through its throughput fixed point, so on this shape the two answers are not close: on the test model below the LD-QBD queue length is 1.36 against dec.source's 1.42, and the LD-QBD one is right.

EXACTNESS: exact for exponential service at any number of servers, and for PH service at any number of servers. The multiserver PH chain comes from ldqbd_mphc, whose level coordinate is the MULTISET of the phases the min(n,c) busy servers sit in. The collapsed single-phase approximation the reference carried until 2026-08-18 – one PH process run at min(n,c) times its speed, ~1e-2 relative against SolverCTMC – is gone from every codebase.

TWO REGIMES, one generator. Closed: level n is the number at the queue, 0 <= n <= N, and the arrival rate out of level n is (N-n) lambda_eff, which vanishes at n = N and closes the chain by itself. Open: Poisson arrivals at a constant lambda_eff, truncated at a level chosen so the tail probability is below 1e-10 (or at options.cutoff). Only the per-level arrival rate and the top level differ.

ARITHMETIC. ldqbd_R runs a backward recursion of matrix inverses and its pinv fallback needs singular vectors, so the whole path is gated on transcendental arithmetic and refuses by name under exact/Rational.

Definition in file solver_mam_ldqbd.h.