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

M/G/1 with non-preemptive head-of-line priorities: per-class mean response times from the Cobham/Kleinrock formula. More...

#include <cstddef>
#include <vector>
#include "line/api/qsys/qsys_types.h"
#include "line/num/number.h"
#include "line/util/error.h"
Include dependency graph for qsys_mg1_prio.h:

Go to the source code of this file.

Classes

struct  line::qsys::Mg1PrioResult< T >

Namespaces

namespace  line
namespace  line::qsys

Functions

template<class T>
Mg1PrioResult< T > line::qsys::qsys_mg1_prio (const std::vector< T > &lambda, const std::vector< T > &mu, const std::vector< T > &cs)
 M/G/1 with non-preemptive head-of-line priorities: per-class mean response times from the Cobham/Kleinrock formula.

Detailed Description

M/G/1 with non-preemptive head-of-line priorities: per-class mean response times from the Cobham/Kleinrock formula.

Templated port of matlab/src/api/qsys/qsys_mg1_prio.m, cross-checked against jar/src/main/java/jline/api/qsys/Qsys_mg1_prio.java (identical, including the rhohat convention below).

rho_i = lambda_i/mu_i B_0 = (1/2) sum_i lambda_i (1 + cs_i^2)/mu_i^2 the mean work left Wq_k = B_0 / [ (1 - sum_{i<k} rho_i)(1 - sum_{i<=k} rho_i) ] W_k = Wq_k + 1/mu_k

Class 1 is the highest priority. The returned rhohat is Q/(1+Q) with Q = sum_k lambda_k W_k, the qsys family convention, not the utilization: MATLAB computes the utilization into the same output variable and then overwrites it, so the utilization is not observable from the return value.

Only squares of the coefficients of variation appear, so the whole computation is a rational function of the inputs and exact for T = Rational.

Definition in file qsys_mg1_prio.h.