LINE Solver (C++)
Templated C++ port of the LINE queueing solver
Toggle main menu visibility
Loading...
Searching...
No Matches
pfqn_xzabalow.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2012-2026, QORE Lab, Imperial College London
3
* All rights reserved.
4
*/
5
#ifndef LINE_API_PFQN_PFQN_XZABALOW_H
6
#define LINE_API_PFQN_PFQN_XZABALOW_H
7
8
/**
9
* @file
10
* @ingroup api_pfqn
11
* Asymptotic-bound-analysis lower bound on throughput.
12
*
13
* Templated port of matlab/src/api/pfqn/pfqn_xzabalow.m. Single-class model: L is the
14
* per-station demand vector, N the population, Z the think time.
15
*
16
* All operations stay in the field, so the bound is exact in rational
17
* arithmetic: a bound computed exactly is worth having, since a bound violated
18
* only by rounding is indistinguishable from a real violation.
19
*/
20
21
#include <algorithm>
22
#include <vector>
23
24
#include "
line/num/number.h
"
25
#include "
line/util/error.h
"
26
#include "
line/util/matrix.h
"
27
28
namespace
line
{
29
namespace
pfqn
{
30
31
/** X >= N / (Z + N sum(L)), the ABA population bound. */
32
template
<
class
T>
33
T
pfqn_xzabalow
(
const
std::vector<T>& L,
const
T& N,
const
T& Z) {
34
if
(L.empty())
throw
InputError
(
"pfqn_xzabalow: empty demand vector"
);
35
T Ltot =
num_traits<T>::from_int
(0);
36
for
(
const
T& d : L) Ltot += d;
37
return
N / (Z + Ltot * N);
38
}
39
40
}
// namespace pfqn
41
}
// namespace line
42
43
#endif
line::InputError::InputError
InputError(const std::string &what)
Definition
error.h:39
error.h
The exception types the port throws.
matrix.h
Dense matrix and non-owning view.
line::pfqn
Definition
cd_peak_scaling.h:43
line::pfqn::pfqn_xzabalow
T pfqn_xzabalow(const std::vector< T > &L, const T &N, const T &Z)
X >= N / (Z + N sum(L)), the ABA population bound.
Definition
pfqn_xzabalow.h:33
line
Definition
aoi_dist2ph.h:52
number.h
Number-type abstraction for the templated API port.
line::num_traits
Definition
number.h:111
include
line
api
pfqn
pfqn_xzabalow.h
Generated by
1.18.0