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

Conditional mean number of IN-SERVICE jobs per class at an order-independent station. More...

#include <cstddef>
#include <functional>
#include <vector>
#include "line/num/number.h"
#include "line/util/error.h"
#include "line/util/matrix.h"
Include dependency graph for pfqn_oi_insvc.h:

Go to the source code of this file.

Classes

struct  line::pfqn::OiInsvcResult< T >
 Return value of pfqn_oi_insvc, mirroring [g, Xi, Phi]. More...

Namespaces

namespace  line
namespace  line::pfqn

Functions

template<class T>
OiInsvcResult< T > line::pfqn::pfqn_oi_insvc (const std::function< T(const std::vector< int > &)> &oirate, const std::vector< int > &N)
 Conditional mean number of IN-SERVICE jobs per class at an order-independent station.

Detailed Description

Conditional mean number of IN-SERVICE jobs per class at an order-independent station.

Templated port of matlab/src/api/pfqn/pfqn_oi_insvc.m. This is the quantity behind LINE's utilization convention at OI stations, U_r = E[sir_r]/c, where sir_r counts class-r JOBS receiving a strictly positive rate (a job served concurrently by several servers counts once). Conditioning on the tail element of the ordering gives the balanced-fairness recursion for the OI balance function and its sir-weighted companion,

Phi(0) = 1, Phi(n) = (1/mu(n)) sum_{r: n_r>0} Phi(n - e_r) Xi_r(0) = 0, Xi_r(n) = (1/mu(n)) [ sum_s Xi_r(n - e_s)

  • 1{n_r>0} 1{mu(n) > mu(n - e_r)} Phi(n - e_r) ],

and E[sir_r | n] = Xi_r(n)/Phi(n).

UNREACHABLE STATES. A composition no server can serve has mu(n) <= 0; the reference leaves Phi and Xi at zero there and the port does the same, rather than dividing by zero or substituting a rate. g is then zero at that state, which is the correct reading: the state carries no weight.

ARITHMETIC. Additions and divisions only, so the routine is EXACT in rational arithmetic and is deliberately left ungated. The strict comparison mu(n) > mu(n - e_r) that decides whether the tail job is in service is an exact comparison there, which matters: in floating point two rates that are equal in the model can differ in the last bit and flip that indicator.

Definition in file pfqn_oi_insvc.h.