LINE Solver (C++)
Templated C++ port of the LINE queueing solver
Toggle main menu visibility
Loading...
Searching...
No Matches
snc_types.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_SNC_TYPES_H
6
#define LINE_API_SNC_TYPES_H
7
8
/**
9
* @file
10
* @ingroup api_snc
11
* Shared types of the stochastic network calculus domain.
12
*
13
* An envelope is the pair `(sigma(theta), rho(theta))` in the exponential form
14
*
15
* E[exp(theta*A(s,t))] <= exp(theta*(rho*(t-s) + sigma)), theta > 0,
16
*
17
* and its service counterpart with the sign of theta reversed. The whole domain
18
* passes envelopes as FUNCTIONS of theta rather than as numbers, because every
19
* bound is an infimum over theta and a composition (superposition, leftover
20
* service, concatenation, departure) has to be re-evaluated at whatever theta
21
* the search asks for.
22
*
23
* ARITHMETIC. This domain is DOUBLE-ONLY, deliberately. Every entry point is an
24
* exp/log expression minimized numerically over theta, so there is no exact or
25
* multiprecision instantiation to offer: a Rational cannot carry `exp(theta)`
26
* and a Real would buy digits the Chernoff search does not have. The templated
27
* SolverBA arm converts at the boundary with `num_traits<T>::to_double` and
28
* `from_double`, exactly as `sylvester.h` does for the same reason.
29
*
30
* Port of matlab/src/api/snc, cross-checked against jline.api.snc.
31
*
32
* Reference: M. Fidler, A. Rizk, "A Guide to the Stochastic Network Calculus",
33
* IEEE Communications Surveys and Tutorials 17(1), 92-105, 2015.
34
*/
35
36
#include <functional>
37
38
namespace
line
{
39
namespace
snc
{
40
41
/** The pair (sigma, rho) of an envelope evaluated at one theta. */
42
struct
Env
{
43
double
sigma
= 0.0;
44
double
rho
= 0.0;
45
};
46
47
/** An envelope as a function of the Chernoff parameter. */
48
using
Envelope
= std::function<
Env
(
double
)>;
49
50
/** A bound together with the theta that attains it. */
51
struct
SncResult
{
52
/** The bound: a violation probability, a quantile or a mean bound. */
53
double
value
= 0.0;
54
/** The minimizing theta, NaN when no feasible theta exists. */
55
double
theta
= 0.0;
56
};
57
58
}
// namespace snc
59
}
// namespace line
60
61
#endif
// LINE_API_SNC_TYPES_H
line::snc
Definition
snc_bound_backlog.h:34
line::snc::Envelope
std::function< Env(double)> Envelope
An envelope as a function of the Chernoff parameter.
Definition
snc_types.h:48
line
Definition
aoi_dist2ph.h:52
line::snc::Env
The pair (sigma, rho) of an envelope evaluated at one theta.
Definition
snc_types.h:42
line::snc::Env::sigma
double sigma
Definition
snc_types.h:43
line::snc::Env::rho
double rho
Definition
snc_types.h:44
line::snc::SncResult
A bound together with the theta that attains it.
Definition
snc_types.h:51
line::snc::SncResult::value
double value
The bound: a violation probability, a quantile or a mean bound.
Definition
snc_types.h:53
line::snc::SncResult::theta
double theta
The minimizing theta, NaN when no feasible theta exists.
Definition
snc_types.h:55
include
line
api
snc
snc_types.h
Generated by
1.18.0