LINE Solver (C++)
Templated C++ port of the LINE queueing solver
Toggle main menu visibility
Loading...
Searching...
No Matches
fj_rmax.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_RMAX_H
6
#define LINE_API_FJ_RMAX_H
7
8
/**
9
* @file
10
* @ingroup api_fj
11
* Pessimistic (independence) fork-join response time: the expected maximum of
12
* K independent M/M/1 response times, each exponential with rate mu - lambda.
13
*
14
* Templated port of matlab/src/api/fj/fj_rmax.m, cross-checked against
15
* FJ_rmax.fj_rmax in jar/src/main/java/jline/api/fj/FJ_rmax.java (identical;
16
* the JAR additionally rejects rho >= 1 explicitly, where MATLAB leaves the
17
* check to qsys_mm1).
18
*
19
* Rmax = H_K R(rho) = H_K / (mu - lambda)
20
*
21
* Rational, hence exact in the field.
22
*/
23
24
#include "
line/api/fj/fj_harmonic.h
"
25
#include "
line/api/fj/fj_types.h
"
26
#include "
line/api/qsys/qsys_mm1.h
"
27
#include "
line/num/number.h
"
28
29
namespace
line
{
30
namespace
fj
{
31
32
/**
33
* @brief Pessimistic (independence) fork-join response time: the expected
34
* maximum of K independent M/M/1 response times, each exponential with
35
* rate mu - lambda.
36
*
37
* @param K number of parallel branches, K >= 1
38
* @param lambda arrival rate
39
* @param mu per-branch service rate
40
* @return H_K / (mu - lambda)
41
*/
42
template
<
class
T>
43
T
fj_rmax
(
unsigned
K,
const
T& lambda,
const
T& mu) {
44
detail::require_positive_K(K,
"fj_rmax"
);
45
return
fj_harmonic<T>
(K) *
qsys::qsys_mm1
(lambda, mu).W;
46
}
47
48
}
// namespace fj
49
}
// namespace line
50
51
#endif
// LINE_API_FJ_RMAX_H
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_rmax
T fj_rmax(unsigned K, const T &lambda, const T &mu)
Pessimistic (independence) fork-join response time: the expected maximum of K independent M/M/1 respo...
Definition
fj_rmax.h:43
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::qsys::qsys_mm1
QsysResult< T > qsys_mm1(const T &lambda, const T &mu)
Exact mean response time of the M/M/1 queue.
Definition
qsys_mm1.h:35
line
Definition
aoi_dist2ph.h:52
number.h
Number-type abstraction for the templated API port.
qsys_mm1.h
Exact mean response time of the M/M/1 queue.
include
line
api
fj
fj_rmax.h
Generated by
1.18.0