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

The distribution subtree of a JMT .jsimg file, and the scalar formatting every JMT writer shares. More...

#include <cmath>
#include <cstdio>
#include <string>
#include <vector>
#include "line/lang/distribution.h"
#include "line/lang/lang_types.h"
#include "line/num/number.h"
#include "line/util/error.h"
#include "line/util/matrix.h"
#include "line/util/xml.h"
Include dependency graph for jmt_dist.h:

Go to the source code of this file.

Classes

struct  line::io::JmtDistView< T >
 The (D0, D1) pair a JMT MAP or phase-type parameter block is built from, plus the moments the analytic families are reconstructed from. More...
struct  line::io::Distrib< T >

Namespaces

namespace  line
namespace  line::io

Enumerations

enum class  line::io::ProcessType
 Distribution kinds, with the values of MATLAB ProcessType. More...

Functions

std::string line::io::jmt_fmt (double x)
 sprintf('%.12f', x), the numeric format of every JMT <value> body.
std::string line::io::jmt_int (double x)
 int2str(x): round to nearest, print as a decimal integer.
std::string line::io::jmt_num (double x)
 num2str(x): MATLAB's default five-significant-digit form.
std::string line::io::jmt_sig2 (double x)
 num2str(x, 2): the two-significant-digit form used for alpha/precision.
xml::Elementline::io::jmt_scalar (xml::Element &parent, const char *class_path, const char *name, const std::string &value)
 <subParameter classPath="java.lang.Double" name="NAME"><value>V</value>
xml::Elementline::io::jmt_double (xml::Element &parent, const char *name, double v)
 A java.lang.Double scalar subparameter.
template<class T>
JmtDistView< T > line::io::jmt_dist_view (const Distrib< T > &d)
 Lower a Distrib to the view above.
bool line::io::jmt_is_phase_type (ProcessType t, std::size_t phases)
 True when the reference routes the process through JMT's PhaseTypeDistr rather than through a named analytic law.
xml::Elementline::io::jmt_object_array (xml::Element &parent, const char *name)
 <subParameter array="true" classPath="java.lang.Object" name="NAME">
void line::io::jmt_append_row (xml::Element &parent, const Matrix< double > &M, std::size_t row, std::size_t n, bool negate_diagonal)
 One vector of entry doubles, the JMT encoding of a matrix row.
template<class T>
void line::io::jmt_append_distribution (xml::Element &wrapper, const JmtDistView< T > &v, const char *who)
 Append the distribution and distrPar pair for one process.

Detailed Description

The distribution subtree of a JMT .jsimg file, and the scalar formatting every JMT writer shares.

ONE EMITTER, SEVEN CALLERS. The reference spells this block out again in saveServiceStrategy, saveArrivalStrategy, saveDelayOffStrategy, saveSwitchoverStrategy, saveTimingStrategies, saveRetrialDistributions and saveImpatience – seven near-copies, which is why those files are the seven largest in @@JMTIO. They differ only in the WRAPPER element that carries the pair, never in the pair itself, so this port factors the pair out and leaves each caller its own wrapper. A divergence between two copies of the same emitter is a wrong service time in one place and not the other, and it cannot be seen by reading either copy.

WHAT JMT IS GIVEN IS THE FITTED PROCESS, NOT THE DECLARED ONE, for the families whose parameters the reference re-derives from the first two moments: Gamma, Pareto, Weibull, Lognormal and Uniform are all reconstructed from sn.rates and sn.scv rather than from the constructor arguments. That is the reference's behaviour and is kept, because the moments are what the struct carries after a refresh; a model whose Weibull was fitted by moments therefore round-trips, and one whose shape was set directly is exported as the Justus-approximation Weibull with the same mean and SCV.

Definition in file jmt_dist.h.