LINE Solver (C++)
Templated C++ port of the LINE queueing solver
Loading...
Searching...
No Matches
line::snc Namespace Reference

Classes

struct  Env
 The pair (sigma, rho) of an envelope evaluated at one theta. More...
struct  SncResult
 A bound together with the theta that attains it. More...

Typedefs

using Envelope = std::function<Env(double)>
 An envelope as a function of the Chernoff parameter.

Functions

SncResult snc_bound_backlog (const Envelope &arv, const Envelope &srv, double b, double thetamax=1e3)
 Violation probability of a backlog level.
SncResult snc_bound_delay (const Envelope &arv, const Envelope &srv, double d, double thetamax=1e3)
 Violation probability of a delay target.
Env snc_conv (const Env &s1, const Env &s2, double theta, double delta=-1.0)
 Min-plus convolution of two service envelopes (tandem concatenation).
Env snc_env_cpoisson (double lambda, double mu, double theta)
 MGF arrival envelope of a compound Poisson flow with Exp job sizes.
Envelope snc_env_cpoisson_fn (double lambda, double mu)
 The same envelope as a function of theta.
Env snc_env_map (const Matrix< double > &D0, const Matrix< double > &D1, double theta)
 MGF arrival envelope of a MAP/MMPP flow with unit-size jobs.
Envelope snc_env_map_fn (const Matrix< double > &D0, const Matrix< double > &D1)
 The same envelope as a function of theta.
Env snc_env_poisson (double lambda, double theta)
 MGF arrival envelope of a Poisson flow with unit-size jobs.
Envelope snc_env_poisson_fn (double lambda)
 The same envelope as a function of theta.
Env snc_env_tokenbucket (double b, double r)
 Deterministic token-bucket arrival envelope.
Env snc_env_tokenbucket (double b, double r, double theta)
 Deterministic token-bucket arrival envelope.
Envelope snc_env_tokenbucket_fn (double b, double r)
 The same envelope as a function of theta.
Env snc_leftover (const Env &srv, const Env &cross)
 Leftover service envelope under blind (arbitrary) multiplexing.
SncResult snc_mean_backlog (const Envelope &arv, const Envelope &srv, double thetamax=1e3)
 Upper bound on the mean backlog, from integrating the backlog tail bound.
SncResult snc_mean_delay (const Envelope &arv, const Envelope &srv, double thetamax=1e3)
 Upper bound on the mean delay, from integrating the delay tail bound.
Env snc_output (const Env &arv, const Env &srv, double theta)
 Output (departure) arrival envelope of a flow leaving a server.
SncResult snc_perc_backlog (const Envelope &arv, const Envelope &srv, double eps, double thetamax=1e3)
 Backlog quantile at a prescribed violation probability.
SncResult snc_perc_delay (const Envelope &arv, const Envelope &srv, double eps, double thetamax=1e3)
 Delay quantile at a prescribed violation probability.
Env snc_srv_exp (double mu, double theta)
 MGF service envelope of an exponential server, in JOB units.
Envelope snc_srv_exp_fn (double mu)
 The same envelope as a function of theta.
Env snc_srv_rate (double C)
 MGF service envelope of a constant-rate work-conserving server.
Env snc_srv_rate (double C, double theta)
 MGF service envelope of a constant-rate work-conserving server.
Envelope snc_srv_rate_fn (double C)
 The same envelope as a function of theta.
SncResult snc_thetaopt (const std::function< double(double)> &fun, double thetamax=1e3)
 Minimizes a Chernoff bound over the free parameter theta.

Typedef Documentation

◆ Envelope

using line::snc::Envelope = std::function<Env(double)>

An envelope as a function of the Chernoff parameter.

Definition at line 48 of file snc_types.h.

Function Documentation

◆ snc_bound_backlog()

SncResult line::snc::snc_bound_backlog ( const Envelope & arv,
const Envelope & srv,
double b,
double thetamax = 1e3 )
inline

Violation probability of a backlog level.

Parameters
arvarrival envelope
srvservice envelope
bbacklog level, units of the envelopes
thetamaxupper end of the theta search

Definition at line 44 of file snc_bound_backlog.h.

References snc_bound_backlog(), snc_thetaopt(), line::snc::SncResult::theta, line::UnsupportedError::UnsupportedError(), and line::snc::SncResult::value.

Referenced by snc_bound_backlog().

◆ snc_bound_delay()

SncResult line::snc::snc_bound_delay ( const Envelope & arv,
const Envelope & srv,
double d,
double thetamax = 1e3 )
inline

Violation probability of a delay target.

Parameters
arvarrival envelope
srvservice envelope
ddelay target, slots
thetamaxupper end of the theta search

Definition at line 44 of file snc_bound_delay.h.

References snc_bound_delay(), snc_thetaopt(), line::snc::SncResult::theta, line::UnsupportedError::UnsupportedError(), and line::snc::SncResult::value.

Referenced by snc_bound_delay().

◆ snc_conv()

Env line::snc::snc_conv ( const Env & s1,
const Env & s2,
double theta,
double delta = -1.0 )
inline

Min-plus convolution of two service envelopes (tandem concatenation).

Parameters
s1envelope of the first station
s2envelope of the second station
thetaChernoff parameter, theta > 0
deltarate separation used when the two rates coincide; a nonpositive value selects the default 1e-2*min(rho1,rho2)

Definition at line 49 of file snc_conv.h.

References line::snc::Env::rho, line::snc::Env::sigma, snc_conv(), and line::UnsupportedError::UnsupportedError().

Referenced by snc_conv().

◆ snc_env_cpoisson()

Env line::snc::snc_env_cpoisson ( double lambda,
double mu,
double theta )
inline

MGF arrival envelope of a compound Poisson flow with Exp job sizes.

Parameters
lambdajob arrival rate, jobs per slot
murate of the Exp job size, so the mean work per job is 1/mu
thetaChernoff parameter, theta > 0

Definition at line 40 of file snc_env_cpoisson.h.

References snc_env_cpoisson(), and line::UnsupportedError::UnsupportedError().

Referenced by snc_env_cpoisson(), and snc_env_cpoisson_fn().

◆ snc_env_cpoisson_fn()

Envelope line::snc::snc_env_cpoisson_fn ( double lambda,
double mu )
inline

The same envelope as a function of theta.

Definition at line 49 of file snc_env_cpoisson.h.

References snc_env_cpoisson(), and snc_env_cpoisson_fn().

Referenced by snc_env_cpoisson_fn().

◆ snc_env_map()

Env line::snc::snc_env_map ( const Matrix< double > & D0,
const Matrix< double > & D1,
double theta )
inline

MGF arrival envelope of a MAP/MMPP flow with unit-size jobs.

Parameters
D0hidden-transition generator block of the MAP
D1arrival-transition block of the MAP
thetaChernoff parameter, theta > 0

Definition at line 56 of file snc_env_map.h.

References line::Matrix< T >::cols(), line::Matrix< T >::rows(), snc_env_map(), and line::UnsupportedError::UnsupportedError().

Referenced by snc_env_map(), and snc_env_map_fn().

◆ snc_env_map_fn()

Envelope line::snc::snc_env_map_fn ( const Matrix< double > & D0,
const Matrix< double > & D1 )
inline

The same envelope as a function of theta.

Definition at line 106 of file snc_env_map.h.

References snc_env_map(), and snc_env_map_fn().

Referenced by snc_env_map_fn(), and line::ba::solver_ba_snc_envelopes().

◆ snc_env_poisson()

Env line::snc::snc_env_poisson ( double lambda,
double theta )
inline

MGF arrival envelope of a Poisson flow with unit-size jobs.

Parameters
lambdaarrival rate, jobs per slot
thetaChernoff parameter, theta > 0

Definition at line 33 of file snc_env_poisson.h.

References snc_env_poisson(), and line::UnsupportedError::UnsupportedError().

Referenced by snc_env_poisson(), and snc_env_poisson_fn().

◆ snc_env_poisson_fn()

Envelope line::snc::snc_env_poisson_fn ( double lambda)
inline

The same envelope as a function of theta.

Definition at line 41 of file snc_env_poisson.h.

References snc_env_poisson(), and snc_env_poisson_fn().

Referenced by snc_env_poisson_fn(), and line::ba::solver_ba_snc_envelopes().

◆ snc_env_tokenbucket() [1/2]

Env line::snc::snc_env_tokenbucket ( double b,
double r )
inline

Deterministic token-bucket arrival envelope.

Parameters
bbucket depth, units of work
rtoken rate, work per slot

Definition at line 33 of file snc_env_tokenbucket.h.

References snc_env_tokenbucket(), and line::UnsupportedError::UnsupportedError().

Referenced by snc_env_tokenbucket(), snc_env_tokenbucket(), and snc_env_tokenbucket_fn().

◆ snc_env_tokenbucket() [2/2]

Env line::snc::snc_env_tokenbucket ( double b,
double r,
double theta )
inline

Deterministic token-bucket arrival envelope.

Parameters
thetaaccepted and ignored, for signature compatibility

Definition at line 44 of file snc_env_tokenbucket.h.

References snc_env_tokenbucket(), and line::UnsupportedError::UnsupportedError().

◆ snc_env_tokenbucket_fn()

Envelope line::snc::snc_env_tokenbucket_fn ( double b,
double r )
inline

The same envelope as a function of theta.

Definition at line 50 of file snc_env_tokenbucket.h.

References snc_env_tokenbucket(), and snc_env_tokenbucket_fn().

Referenced by snc_env_tokenbucket_fn().

◆ snc_leftover()

Env line::snc::snc_leftover ( const Env & srv,
const Env & cross )
inline

Leftover service envelope under blind (arbitrary) multiplexing.

Parameters
srvthe service envelope
crossthe cross-flow arrival envelope

Definition at line 37 of file snc_leftover.h.

References line::snc::Env::rho, line::snc::Env::sigma, and snc_leftover().

Referenced by snc_leftover(), and line::ba::solver_ba_snc_envelopes().

◆ snc_mean_backlog()

SncResult line::snc::snc_mean_backlog ( const Envelope & arv,
const Envelope & srv,
double thetamax = 1e3 )
inline

Upper bound on the mean backlog, from integrating the backlog tail bound.

Parameters
arvarrival envelope
srvservice envelope
thetamaxupper end of the theta search

Definition at line 44 of file snc_mean_backlog.h.

References snc_mean_backlog(), and snc_thetaopt().

Referenced by snc_mean_backlog().

◆ snc_mean_delay()

SncResult line::snc::snc_mean_delay ( const Envelope & arv,
const Envelope & srv,
double thetamax = 1e3 )
inline

Upper bound on the mean delay, from integrating the delay tail bound.

Parameters
arvarrival envelope
srvservice envelope
thetamaxupper end of the theta search

Definition at line 48 of file snc_mean_delay.h.

References snc_mean_delay(), and snc_thetaopt().

Referenced by snc_mean_delay(), and line::ba::solver_ba_snc().

◆ snc_output()

Env line::snc::snc_output ( const Env & arv,
const Env & srv,
double theta )
inline

Output (departure) arrival envelope of a flow leaving a server.

Parameters
arvthe arrival envelope entering the server
srvthe service envelope
thetaChernoff parameter, theta > 0

Definition at line 40 of file snc_output.h.

References line::snc::Env::rho, line::snc::Env::sigma, snc_output(), and line::UnsupportedError::UnsupportedError().

Referenced by snc_output(), and line::ba::solver_ba_snc_envelopes().

◆ snc_perc_backlog()

SncResult line::snc::snc_perc_backlog ( const Envelope & arv,
const Envelope & srv,
double eps,
double thetamax = 1e3 )
inline

Backlog quantile at a prescribed violation probability.

Parameters
arvarrival envelope
srvservice envelope
epsviolation probability, 0 < eps < 1
thetamaxupper end of the theta search

Definition at line 42 of file snc_perc_backlog.h.

References snc_perc_backlog(), snc_thetaopt(), line::snc::SncResult::theta, line::UnsupportedError::UnsupportedError(), and line::snc::SncResult::value.

Referenced by snc_perc_backlog(), and line::ba::solver_ba_snc_perc().

◆ snc_perc_delay()

SncResult line::snc::snc_perc_delay ( const Envelope & arv,
const Envelope & srv,
double eps,
double thetamax = 1e3 )
inline

Delay quantile at a prescribed violation probability.

Parameters
arvarrival envelope
srvservice envelope
epsviolation probability, 0 < eps < 1
thetamaxupper end of the theta search

Definition at line 43 of file snc_perc_delay.h.

References snc_perc_delay(), snc_thetaopt(), line::snc::SncResult::theta, line::UnsupportedError::UnsupportedError(), and line::snc::SncResult::value.

Referenced by snc_perc_delay(), and line::ba::solver_ba_snc_perc().

◆ snc_srv_exp()

Env line::snc::snc_srv_exp ( double mu,
double theta )
inline

MGF service envelope of an exponential server, in JOB units.

Parameters
muservice rate, jobs per slot
thetaChernoff parameter, theta > 0

Definition at line 46 of file snc_srv_exp.h.

References snc_srv_exp(), and line::UnsupportedError::UnsupportedError().

Referenced by snc_srv_exp(), snc_srv_exp_fn(), and line::ba::solver_ba_snc_envelopes().

◆ snc_srv_exp_fn()

Envelope line::snc::snc_srv_exp_fn ( double mu)
inline

The same envelope as a function of theta.

Definition at line 53 of file snc_srv_exp.h.

References snc_srv_exp(), and snc_srv_exp_fn().

Referenced by snc_srv_exp_fn().

◆ snc_srv_rate() [1/2]

Env line::snc::snc_srv_rate ( double C)
inline

MGF service envelope of a constant-rate work-conserving server.

Parameters
Cserver capacity, work per slot

Definition at line 35 of file snc_srv_rate.h.

References snc_srv_rate(), and line::UnsupportedError::UnsupportedError().

Referenced by snc_srv_rate(), snc_srv_rate(), and snc_srv_rate_fn().

◆ snc_srv_rate() [2/2]

Env line::snc::snc_srv_rate ( double C,
double theta )
inline

MGF service envelope of a constant-rate work-conserving server.

Parameters
thetaaccepted and ignored, for signature compatibility

Definition at line 45 of file snc_srv_rate.h.

References snc_srv_rate(), and line::UnsupportedError::UnsupportedError().

◆ snc_srv_rate_fn()

Envelope line::snc::snc_srv_rate_fn ( double C)
inline

The same envelope as a function of theta.

Definition at line 51 of file snc_srv_rate.h.

References snc_srv_rate(), and snc_srv_rate_fn().

Referenced by snc_srv_rate_fn().

◆ snc_thetaopt()

SncResult line::snc::snc_thetaopt ( const std::function< double(double)> & fun,
double thetamax = 1e3 )
inline

Minimizes a Chernoff bound over the free parameter theta.

Parameters
funthe objective, a function of theta
thetamaxupper end of the search range
Returns
the minimum and its theta; (infinity, NaN) if nothing is feasible

Definition at line 66 of file snc_thetaopt.h.

References snc_thetaopt(), and line::UnsupportedError::UnsupportedError().

Referenced by snc_bound_backlog(), snc_bound_delay(), snc_mean_backlog(), snc_mean_delay(), snc_perc_backlog(), snc_perc_delay(), and snc_thetaopt().