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

State dependent Bernoulli server on a discrete time scale. More...

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

Go to the source code of this file.

Classes

struct  line::dqsys::Bernoulli1Result< T >
 Steady-state quantities of a finite-buffer Bernoulli server. More...

Namespaces

namespace  line
namespace  line::dqsys

Functions

template<class T>
Bernoulli1Result< T > line::dqsys::dqsys_bernoulli1 (const std::vector< T > &b, const std::vector< T > &p, std::size_t L)
 Finite buffer of L jobs.

Detailed Description

State dependent Bernoulli server on a discrete time scale.

Templated port of matlab/src/api/dqsys/dqsys_bernoulli1.m. Time advances in slots. In the slot starting at t with n jobs present the job in service departs with probability p(n) and an arrival occurs with probability b(n), independently; both are recorded at the end of the slot with the departure resolved first (Daduna's LA rule and D/A rule). The queue length at slot boundaries is a discrete birth-death chain with

pi(n) = [prod_{m=0}^{n-1} b(m) / prod_{m=0}^{n} c(m)]

  • [prod_{m=1}^{n-1} q(m) / prod_{m=1}^{n} p(m)] / H,

c = 1-b and q = 1-p, which is theorem 2.3 of Daduna (2001), and corollary 2.8 once b(n) = 0 above the capacity. For constant b and p it collapses to the Geo/Geo/1 law of dqsys_geogeo1 under the LAS_DA convention.

The law seen by an arriving customer, with himself not counted, is theorem 2.11 and is returned in arrivalPmf. It is not the time-stationary law: discrete time has no PASTA analogue, and the two differ even when the arrival stream is a state independent Bernoulli process. In that state independent case pi_1 is exactly the EAS-convention queue length law of dqsys_geogeo1, geometric with ratio r = b(1-p)/(p(1-b)).

Both laws are built by their exact product recurrences rather than in log space, so the exact instantiation returns them with no rounding.

Definition in file dqsys_bernoulli1.h.