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

Shared arithmetic helpers for the templated simulation output-analysis port. More...

#include <cmath>
#include <cstddef>
#include <limits>
#include <boost/math/special_functions/fpclassify.hpp>
#include "line/num/number.h"
#include "line/util/error.h"
Include dependency graph for sim_types.h:

Go to the source code of this file.

Namespaces

namespace  line
namespace  line::sim

Detailed Description

Shared arithmetic helpers for the templated simulation output-analysis port.

This family is the port of matlab/src/api/sim/ (jline.api.sim, line_solver.api.sim). The domain is named for the statistics of a simulation output process rather than for any queueing model: nothing in it takes a NetworkStruct, the input is a sequence of observations such as successive waiting times exported from a simulation run. It was called oa, for output analysis, in all four codebases until 2026-07-31, so older commits, log entries and manuals name it that way. This header holds the same role npfqn_types.h plays for the traffic approximations; no algorithm lives here.

ARITHMETIC. Every function in this family carries static_assert(num_traits<T>::has_transcendental), so exact rational arithmetic is a build error rather than a silent fallback. That is not a porting shortcut: the standardized time series areas carry the factor weight/(m sqrt(m)) with the normalizing weight sqrt(12), and the interval half width is a t quantile times a square root, so the delivered numbers are irrational in the data. There is nothing for an exact field to preserve.

The distributional quantiles (normal and Student t) are computed in double and only then converted to T, exactly as lossn_mci's normal_quantile is: the significance level alpha and the quantile order p reach these functions as doubles, so what they determine carries double information and no more, whatever the working type of the estimator is. The estimator's own statistical error dwarfs the arithmetic one by many orders of magnitude.

Definition in file sim_types.h.