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

Kleinrock's conservation law for work-conserving non-preemptive M/G/1 disciplines. More...

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

Go to the source code of this file.

Classes

struct  line::qsys::Mg1ConservationResult< T >
 MATLAB's [V, res] outputs. More...

Namespaces

namespace  line
 Conservation laws of a layered queueing network, enumerated from its structure.
namespace  line::qsys

Functions

template<class T>
Mg1ConservationResult< T > line::qsys::qsys_mg1_conservation (const std::vector< T > &lambda, const std::vector< T > &mu, const std::vector< T > &cs, const std::vector< T > &W=std::vector< T >())
 The M/G/1 conservation-law invariant.

Detailed Description

Kleinrock's conservation law for work-conserving non-preemptive M/G/1 disciplines.

Port of matlab/src/api/qsys/qsys_mg1_conservation.m. For any such discipline sum_i rho_i Wq_i is invariant and equals

V = rho sum_i lambda_i E[S_i^2] / (2 (1 - rho)),

so V/rho is the FCFS waiting time; given per-class waiting times W the residual sum_i rho_i W_i - V checks a discipline against the law.

ARITHMETIC: field; exact for T = Rational. A residual not asked for is NaN in MATLAB, which the exact field cannot hold, so hasResidual flags it and the res field is set only when W was given.

Definition in file qsys_mg1_conservation.h.