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

Bard-Schweitzer approximate MVA. More...

#include <cmath>
#include <cstddef>
#include <limits>
#include <vector>
#include "line/api/pfqn/pfqn_cntol.h"
#include "line/num/number.h"
#include "line/util/error.h"
#include "line/util/matrix.h"
Include dependency graph for pfqn_bs.h:

Go to the source code of this file.

Classes

struct  line::pfqn::AmvaResult< T >

Namespaces

namespace  line
namespace  line::pfqn

Enumerations

enum class  line::pfqn::AmvaSched { line::pfqn::PS , line::pfqn::FCFS , line::pfqn::INF }
 Station scheduling as far as the AMVA formulas distinguish it. More...

Functions

template<class T>
AmvaResult< T > line::pfqn::pfqn_bs (const Matrix< T > &L, const std::vector< T > &N, const std::vector< T > &Z, const std::vector< AmvaSched > &type, double tol=1e-6, std::size_t maxiter=1000, const Matrix< T > &QN0=Matrix< T >())
 Bard-Schweitzer approximate MVA.
template<class T>
AmvaResult< T > line::pfqn::pfqn_bs (const Matrix< T > &L, const std::vector< T > &N, const std::vector< T > &Z)
template<class T>
AmvaResult< T > line::pfqn::pfqn_bs (const Matrix< T > &L, const std::vector< T > &N)

Detailed Description

Bard-Schweitzer approximate MVA.

Templated port of matlab/src/api/pfqn/pfqn_bs.m. The exact arrival theorem Q(i|n - e_r) is replaced by the proportional estimate Q(i,r|n - e_r) = Q(i,r|n) (N_r - 1)/N_r, Q(i,s|n - e_r) = Q(i,s|n), and the resulting fixed point is iterated to a relative tolerance on Q.

FCFS stations use the other class's own demand in the queueing term (L(i,s) Q(i,s)), the PS family uses the arriving class's demand (L(i,r) Q(i,s)); that distinction is what makes the FCFS variant sensitive to demand heterogeneity, and it is easy to lose when transcribing.

The iteration stops on a tolerance, so the result is a fixed point only to within tol whatever the arithmetic. That is a caveat on what the answer MEANS, not a reason to deny the exact backend: an exact run returns the iterate the stopping rule selected, without rounding error, which is what one wants when separating arithmetic error from algorithmic error.

Definition in file pfqn_bs.h.