LINE Solver (C++)
Templated C++ port of the LINE queueing solver
Toggle main menu visibility
Loading...
Searching...
No Matches
snc_env_poisson.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_ENV_POISSON_H
6
#define LINE_API_SNC_ENV_POISSON_H
7
8
/**
9
* @file
10
* @ingroup api_snc
11
* MGF arrival envelope of a Poisson flow with unit-size jobs.
12
*
13
* `log E[exp(theta*A(0,t))] = lambda*t*(exp(theta)-1)` exactly, so the envelope
14
* is tight with a zero burst term and
15
* `rho(theta) = lambda*(exp(theta)-1)/theta`.
16
*
17
* Port of matlab/src/api/snc/snc_env_poisson.m.
18
*/
19
20
#include <cmath>
21
#include "
line/api/snc/snc_types.h
"
22
#include "
line/util/error.h
"
23
24
namespace
line
{
25
namespace
snc
{
26
27
/**
28
* @brief MGF arrival envelope of a Poisson flow with unit-size jobs.
29
*
30
* @param lambda arrival rate, jobs per slot
31
* @param theta Chernoff parameter, theta > 0
32
*/
33
inline
Env
snc_env_poisson
(
double
lambda,
double
theta) {
34
if
(lambda < 0)
35
throw
UnsupportedError
(
"snc_env_poisson: lambda must be nonnegative"
);
36
if
(theta <= 0)
throw
UnsupportedError
(
"snc_env_poisson: theta must be positive"
);
37
return
Env
{0.0, lambda * (std::exp(theta) - 1.0) / theta};
38
}
39
40
/** The same envelope as a function of theta. */
41
inline
Envelope
snc_env_poisson_fn
(
double
lambda) {
42
return
[lambda](
double
theta) {
return
snc_env_poisson
(lambda, theta); };
43
}
44
45
}
// namespace snc
46
}
// namespace line
47
48
#endif
// LINE_API_SNC_ENV_POISSON_H
line::UnsupportedError::UnsupportedError
UnsupportedError(const std::string &what)
Definition
error.h:51
error.h
The exception types the port throws.
line::snc
Definition
snc_bound_backlog.h:34
line::snc::snc_env_poisson_fn
Envelope snc_env_poisson_fn(double lambda)
The same envelope as a function of theta.
Definition
snc_env_poisson.h:41
line::snc::Envelope
std::function< Env(double)> Envelope
An envelope as a function of the Chernoff parameter.
Definition
snc_types.h:48
line::snc::snc_env_poisson
Env snc_env_poisson(double lambda, double theta)
MGF arrival envelope of a Poisson flow with unit-size jobs.
Definition
snc_env_poisson.h:33
line
Definition
aoi_dist2ph.h:52
snc_types.h
Shared types of the stochastic network calculus domain.
line::snc::Env
The pair (sigma, rho) of an envelope evaluated at one theta.
Definition
snc_types.h:42
include
line
api
snc
snc_env_poisson.h
Generated by
1.18.0