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

Schmidt's MVA for closed networks with general scheduling disciplines and class-dependent multiserver FCFS stations. More...

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

Go to the source code of this file.

Classes

struct  line::pfqn::SchmidtResult< T >
 Return value of pfqn_schmidt, mirroring [XN,QN,UN,CN]. More...

Namespaces

namespace  line
namespace  line::pfqn

Functions

template<class T>
SchmidtResult< T > line::pfqn::pfqn_schmidt (const Matrix< T > &D, const std::vector< int > &N, const Matrix< int > &S, const std::vector< SchedStrategy > &sched, const Matrix< T > &v)
 Schmidt's MVA for closed networks with general scheduling disciplines and class-dependent multiserver FCFS stations.
template<class T>
SchmidtResult< T > line::pfqn::pfqn_schmidt (const Matrix< T > &D, const std::vector< int > &N, const Matrix< int > &S, const std::vector< SchedStrategy > &sched)
 Unit visit ratios, the MATLAB default.

Detailed Description

Schmidt's MVA for closed networks with general scheduling disciplines and class-dependent multiserver FCFS stations.

Templated port of matlab/src/api/pfqn/pfqn_schmidt.m, cross-checked against jar/src/main/java/jline/api/pfqn/ld/Pfqn_schmidt.java.

The recursion walks the population lattice 0 <= k <= N and, at each k, computes the residence time by the arrival theorem. Three station kinds are distinguished, as in the reference:

  • INF: w = D(i,c).
  • PS, and FCFS with class-independent demands: the standard w = D(i,c)/s (1 + sum_r L(i,r | k - e_c)) plus, for s > 1, the idle-server correction sum_{j=1}^{s-1} (s-j) Pr(j-1 busy | k - e_c) D/s. Both need the scalar busy-server distribution Pr(j | k).
  • FCFS with class-dependent demands and s > 1: the full per-class state distribution Pr(nvec | k) is carried, and w = sum_{nvec <= k, nvec_c > 0} B_c(nvec) Pr(nvec - e_c | k - e_c), with B_c the queue-composition-weighted mean service time.

Pure service times. The B_c terms need per-visit service times S = D/v, not demands, so the visit ratios enter explicitly; with v == 1 the two coincide.

Arithmetic: EXACT-CAPABLE, no transcendental gate. Every step is a finite sum, product or quotient over the population lattice, so the whole recursion stays in the field of the inputs and is exact in rational arithmetic. The reference's three floating-point guards (max(v, 1e-12) on the visit ratios, max(s (sum(nvec) - 1), 1e-12) on the B_c denominator, and the max(eps, .) and max(1e-12, .) floors on the idle-state probability) are carried over verbatim as constants of the algorithm, since removing them would change the numbers the reference produces; they are the only place a magic constant enters, and none of them makes the arithmetic inexact.

Definition in file pfqn_schmidt.h.