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

Multiclass M/M/1 under DPS (discriminatory processor sharing), solved numerically on the truncated population chain. More...

#include <algorithm>
#include <cstddef>
#include <vector>
#include "line/api/mc/ctmc_solve.h"
#include "line/api/qsys/qsys_types.h"
#include "line/num/number.h"
#include "line/util/error.h"
#include "line/util/matrix.h"
Include dependency graph for qsys_mm1_dps.h:

Go to the source code of this file.

Classes

struct  line::qsys::Mm1DpsResult< T >

Namespaces

namespace  line
namespace  line::qsys

Functions

template<class T>
Mm1DpsResult< T > line::qsys::qsys_mm1_dps (const std::vector< T > &lambda, const std::vector< T > &mu, const std::vector< T > &w, const T &tol, unsigned maxCutoff)
 Multiclass M/M/1 under DPS (discriminatory processor sharing), solved numerically on the truncated population chain.
template<class T>
Mm1DpsResult< T > line::qsys::qsys_mm1_dps (const std::vector< T > &lambda, const std::vector< T > &mu, const std::vector< T > &w)
 MATLAB defaults: tol = 1e-10, maxCutoff = 2048.

Detailed Description

Multiclass M/M/1 under DPS (discriminatory processor sharing), solved numerically on the truncated population chain.

Templated port of matlab/src/api/qsys/qsys_mm1_dps.m, cross-checked against jar/src/main/java/jline/api/qsys/Qsys_mm1_dps.java.

The state is the per-class population vector (n_1,...,n_K); class k arrives at rate lambda_k and completes at rate

mu_k n_k w_k / sum_j n_j w_j,

so the server capacity is split in proportion to the weighted populations. The chain is truncated at a total population level taken from the geometric tail bound, N = max(16, ceil(log(tol)/log(rho))), and the level is doubled until the per-class mean counts move by less than tol or the hard cutoff is reached. Response times follow by Little's law, T_k = E[N_k]/lambda_k.

The truncation blocks arrivals at the top level rather than dropping them, which is what makes the answer a lower bound that converges from below as the cutoff grows; that is the reference behaviour and is kept.

ARITHMETIC. The cutoff is chosen through a logarithm and the doubling loop is driven to a tolerance, so the function is gated on transcendental arithmetic. The inner solve is exact field arithmetic given the truncation, but the truncation itself is the approximation.

COST. The truncated state space has C(N+K,K) states and the stationary solve is dense here, so the MATLAB default maxCutoff of 2048 is not usable at K >= 2; callers should pass a cutoff matched to the load. The defaults are kept as the MATLAB ones so that a like-for-like comparison is possible on small instances.

Definition in file qsys_mm1_dps.h.