LINE Solver (C++)
Templated C++ port of the LINE queueing solver
Toggle main menu visibility
Loading...
Searching...
No Matches
fj_sm_tput.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_FJ_SM_TPUT_H
6
#define LINE_API_FJ_SM_TPUT_H
7
8
/**
9
* @file
10
* @ingroup api_fj
11
* Saturated (single-message) maximum throughput of a K-way fork-join system
12
* with exponential branch service.
13
*
14
* Templated port of matlab/src/api/fj/fj_sm_tput.m, cross-checked against
15
* jar/src/main/java/jline/api/fj/FJ_sm_tput.java (identical).
16
*
17
* lambda_max = mu / H_K = 1 / X_K^max
18
*
19
* Rational, hence exact in the field, and the exact reciprocal of fj_xmax_exp
20
* by construction.
21
*/
22
23
#include "
line/api/fj/fj_harmonic.h
"
24
#include "
line/api/fj/fj_types.h
"
25
#include "
line/num/number.h
"
26
#include "
line/util/error.h
"
27
28
namespace
line
{
29
namespace
fj
{
30
31
/**
32
* @brief Saturated (single-message) maximum throughput of a K-way fork-join
33
* system with exponential branch service.
34
*
35
* @param K number of parallel branches, K >= 1
36
* @param mu per-branch service rate, mu > 0
37
* @return maximum sustainable arrival rate
38
*/
39
template
<
class
T>
40
T
fj_sm_tput
(
unsigned
K,
const
T& mu) {
41
detail::require_positive_K(K,
"fj_sm_tput"
);
42
if
(mu <=
num_traits<T>::from_int
(0))
throw
InputError
(
"fj_sm_tput: the service rate mu must be positive"
);
43
return
mu /
fj_harmonic<T>
(K);
44
}
45
46
}
// namespace fj
47
}
// namespace line
48
49
#endif
// LINE_API_FJ_SM_TPUT_H
line::InputError::InputError
InputError(const std::string &what)
Definition
error.h:39
error.h
The exception types the port throws.
fj_harmonic.h
Harmonic number H_K = sum_{k=1..K} 1/k.
fj_types.h
Shared return types and arithmetic helpers for the templated fork-join port.
line::fj
Definition
fj_amva.h:34
line::fj::fj_sm_tput
T fj_sm_tput(unsigned K, const T &mu)
Saturated (single-message) maximum throughput of a K-way fork-join system with exponential branch ser...
Definition
fj_sm_tput.h:40
line::fj::fj_harmonic
T fj_harmonic(unsigned K)
Harmonic number H_K = sum_{k=1..K} 1/k.
Definition
fj_harmonic.h:37
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
fj
fj_sm_tput.h
Generated by
1.18.0