LINE Solver (C++)
Templated C++ port of the LINE queueing solver
Toggle main menu visibility
Loading...
Searching...
No Matches
snc_srv_rate.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_SRV_RATE_H
6
#define LINE_API_SNC_SRV_RATE_H
7
8
/**
9
* @file
10
* @ingroup api_snc
11
* MGF service envelope of a constant-rate work-conserving server.
12
*
13
* `S(s,t) = C*(t-s)`, so `(sigma, rho) = (0, C)` for every theta. This is the
14
* elementary service element; a station shared by cross traffic follows from it
15
* through `snc_leftover` and a tandem through `snc_conv`.
16
*
17
* USE `snc_srv_exp` INSTEAD WHENEVER THE WORK UNIT IS THE JOB: pairing this
18
* element with a job-counting arrival envelope models an M/D/1 and understates
19
* the delay of an exponential server.
20
*
21
* Port of matlab/src/api/snc/snc_srv_rate.m.
22
*/
23
24
#include "
line/api/snc/snc_types.h
"
25
#include "
line/util/error.h
"
26
27
namespace
line
{
28
namespace
snc
{
29
30
/**
31
* @brief MGF service envelope of a constant-rate work-conserving server.
32
*
33
* @param C server capacity, work per slot
34
*/
35
inline
Env
snc_srv_rate
(
double
C) {
36
if
(C <= 0)
throw
UnsupportedError
(
"snc_srv_rate: C must be positive"
);
37
return
Env
{0.0, C};
38
}
39
40
/**
41
* @brief MGF service envelope of a constant-rate work-conserving server.
42
*
43
* @param theta accepted and ignored, for signature compatibility
44
*/
45
inline
Env
snc_srv_rate
(
double
C,
double
theta) {
46
if
(theta <= 0)
throw
UnsupportedError
(
"snc_srv_rate: theta must be positive"
);
47
return
snc_srv_rate
(C);
48
}
49
50
/** The same envelope as a function of theta. */
51
inline
Envelope
snc_srv_rate_fn
(
double
C) {
52
return
[C](
double
theta) {
return
snc_srv_rate
(C, theta); };
53
}
54
55
}
// namespace snc
56
}
// namespace line
57
58
#endif
// LINE_API_SNC_SRV_RATE_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_srv_rate_fn
Envelope snc_srv_rate_fn(double C)
The same envelope as a function of theta.
Definition
snc_srv_rate.h:51
line::snc::snc_srv_rate
Env snc_srv_rate(double C)
MGF service envelope of a constant-rate work-conserving server.
Definition
snc_srv_rate.h:35
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
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_srv_rate.h
Generated by
1.18.0