LINE Solver (C++)
Templated C++ port of the LINE queueing solver
Loading...
Searching...
No Matches
fes_map_interp.h File Reference

Shape-preserving interpolation of the flow-equivalent descriptors, and the population grid they are evaluated on. More...

#include <algorithm>
#include <cmath>
#include <cstddef>
#include <vector>
#include "line/num/number.h"
#include "line/util/matrix.h"
Include dependency graph for fes_map_interp.h:

Go to the source code of this file.

Namespaces

namespace  line
namespace  line::fes

Functions

std::vector< std::size_t > line::fes::fes_map_grid (std::size_t n, std::size_t nhead=FES_MAP_GRID_NHEAD, std::size_t ntail=FES_MAP_GRID_NTAIL)
 Populations at which the inter-departure MAP is evaluated.
template<class T>
std::vector< T > line::fes::fes_map_interp (const std::vector< T > &x, const std::vector< T > &y, const std::vector< T > &xq)
 Monotone piecewise cubic Hermite interpolation of one series.

Variables

const std::size_t line::fes::FES_MAP_GRID_NHEAD = 10
 Leading populations kept in full by the default grid.
const std::size_t line::fes::FES_MAP_GRID_NTAIL = 10
 Equispaced points above them.

Detailed Description

Shape-preserving interpolation of the flow-equivalent descriptors, and the population grid they are evaluated on.

Templated port of matlab/src/api/fes/fes_map_interp.m, fes_map_interp_edge.m and fes_map_grid.m, mirrored by the JAR and native Python.

Fritsch and Carlson slopes are used, with the noncentered three-point endpoint rule of de Boor, so the interpolant never overshoots and a monotone sequence of throughputs stays monotone. The algorithm is written out rather than delegated to MATLAB's pchip so that the four codebases return identical values; the MATLAB port is checked against the built-in to machine precision.

ARITHMETIC: field operations only, exact at T = Rational.

Definition in file fes_map_interp.h.