5#ifndef LINE_API_FES_MAP_AGGREGATE_H
6#define LINE_API_FES_MAP_AGGREGATE_H
55 std::vector<mam::Map<T>>
fes;
63 std::vector<std::size_t>
grid;
77 const std::vector<double>& servers, std::size_t n,
78 const std::vector<std::size_t>& grid,
79 const std::string& method =
"ssolve") {
81 "fes_map_aggregate inherits map2_fit_idc's arithmetic");
82 const std::size_t M = maps.size();
83 if (M < 1)
throw InputError(
"fes_map_aggregate: at least one station is required");
84 if (servers.size() != M)
85 throw InputError(
"fes_map_aggregate: one server count per station is required");
93 for (std::size_t k = 0; k < n; ++k) {
100 for (std::size_t i = 1; i < M; ++i) {
101 const std::vector<mam::Map<T>> stationLev =
fes_map_levels(maps[i], n, servers[i]);
102 std::vector<std::vector<T>> gmom(4, std::vector<T>(grid.size()));
103 for (std::size_t g = 0; g < grid.size(); ++g) {
109 gmom[3][g] = mom.
idc;
112 if (grid.size() < n) {
113 std::vector<T> xs(grid.size()), xq(n);
114 for (std::size_t g = 0; g < grid.size(); ++g)
116 for (std::size_t k = 0; k < n; ++k)
123 std::vector<mam::Map<T>> newFes;
125 for (std::size_t k = 0; k < n; ++k) {
128 newFes.push_back(fit.
map);
136 for (std::size_t k = 0; k < n; ++k)
144 const std::vector<double>& servers, std::size_t n) {
The exception types the port throws.
Inter-departure MAP of a closed subnetwork made of one MAP station and one MAP flow-equivalent server...
Shape-preserving interpolation of the flow-equivalent descriptors, and the population grid they are e...
Per-level processes of a load-dependent flow-equivalent server.
Moments and index of dispersion of an inter-departure MAP.
Fit a MAP(2) to three moments and an asymptotic index of dispersion.
Markovian arrival process descriptors: stationary vectors, rate, moments, autocorrelation and the ind...
std::vector< mam::Map< T > > fes_map_levels(const mam::Map< T > &map, std::size_t n, double mi=1.0)
Replicate a load independent MAP over n levels, scaling level k by min(k, mi).
FesMapMoments< T > fes_map_moments(const mam::Map< T > &map, const std::string &method="ssolve", double step_safety=0.1, double tol=1e-12, std::size_t iter_max=1000000)
Moments and index of dispersion of an inter-departure MAP.
mam::Map< T > fes_map_interdeparture(const std::vector< mam::Map< T > > &maps, const std::vector< mam::Map< T > > &fes, std::size_t n)
Inter-departure MAP of a closed subnetwork made of one MAP station and one MAP flow-equivalent server...
FesMapAggregateResult< T > fes_map_aggregate(const std::vector< mam::Map< T > > &maps, const std::vector< double > &servers, std::size_t n, const std::vector< std::size_t > &grid, const std::string &method="ssolve")
Recursive MAP flow-equivalent server for a station subset.
std::vector< T > 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.
std::vector< std::size_t > 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.
T map_idc(const Map< T > &m)
Index of dispersion for counts, I = 1 + 2(lambda - pie (Q + e pi)^-1 D1 e).
Map2FitIdcResult< T > map2_fit_idc(const T &e1, const T &e2, const T &e3, const T &I)
Fit a MAP(2) to three moments and an asymptotic index of dispersion.
T map_moment(const Map< T > &m, unsigned k)
Raw moment of order k of the inter-arrival time: k!
Number-type abstraction for the templated API port.
The load-dependent MAP that replaces a subnetwork, with its descriptors.
std::vector< mam::Map< T > > fes
Service process of the flow-equivalent server, index k-1 holding k jobs.
std::vector< int > status
Fit status at each population, see map2_fit_idc.
std::vector< std::vector< T > > moments
Descriptors e1, e2, e3 and the index of dispersion at each population.
std::vector< std::size_t > grid
Populations at which the inter-departure MAP was evaluated.
std::vector< T > throughput
Throughput of the subnetwork at each population.
Descriptors a MAP(2) is fitted against.
The fitted process and which of the reference's five outcomes produced it.
int status
0 all four descriptors matched, 1 exponential because the burstiness is not representable,...
A MAP as the pair of matrices (D0, D1).