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

Conversion of a LINE MAP into the arrival or service descriptor of the fork-join response-time-tail algorithm of Qiu, Perez and Harrison (IFIP Performance 2015). More...

#include <cstddef>
#include <vector>
#include "line/api/mam/map_moment.h"
#include "line/num/number.h"
#include "line/util/error.h"
#include "line/util/linalg.h"
#include "line/util/matrix.h"
Include dependency graph for fj_dist2fj.h:

Go to the source code of this file.

Classes

struct  line::fj::FjDist< T >
 Descriptor of an arrival or a service process. More...

Namespaces

namespace  line
namespace  line::fj

Enumerations

enum class  line::fj::FjProcType { line::fj::Exp = 0 , line::fj::Erlang = 1 , line::fj::HyperExp = 2 , line::fj::Map = 5 }
 The subset of ProcessType that the fork-join algorithm accepts. More...
enum class  line::fj::FjDistKind { line::fj::Arrival , line::fj::Service }
 Which of the two descriptors to build. More...

Functions

template<class T>
FjDist< T > line::fj::fj_dist2fj (const mam::Map< T > &m, FjDistKind kind, FjProcType procType)
 Build the fork-join descriptor of a MAP.

Detailed Description

Conversion of a LINE MAP into the arrival or service descriptor of the fork-join response-time-tail algorithm of Qiu, Perez and Harrison (IFIP Performance 2015).

Templated port of matlab/src/api/fj/fj_dist2fj.m. The reference reads two scalars out of the NetworkStruct, sn.procid(ist, r) and sn.rates(ist, r); only the first is used (see the reference defects below), and it is passed here as an explicit FjProcType, so this port carries no NetworkStruct dependency.

arrival: (lambda, lambda0 = D0, lambda1 = D1, ma = phases, Ia = I) service: (mu = lambda, ST = D0, St = -D0 e, tau_st = map_pie)

At most two phases are accepted, which is the algorithm's own restriction.

REFERENCE DEFECTS in fj_dist2fj.m:

  1. DEAD READ. mean_rate = sn.rates(ist, r) is computed on line 53 and never used; the rate that is returned is map_lambda of the MAP itself. Not propagated: the port does not take a rate argument at all. This matters because it is the only place the two could disagree, and the MAP is the authority.
  2. mean_time = 1 / lambda is likewise computed and never used, and divides by zero for a disabled class instead of reporting it.
  3. THE SERVICE BRANCH ACCEPTS MAP(2) SILENTLY. Its distribution switch rejects a two-phase MAP with an error, but only AFTER the descriptor has been filled in, and the arrival branch accepts MAP(2) explicitly. The asymmetry is intentional in the algorithm (service must be phase type), so it is reproduced: FjProcType::Map is rejected for a service process.

ARITHMETIC. map_lambda and map_pie need one linear solve each, and the exit vector is a row sum, so the whole conversion stays in the field and is instantiated at T = Rational as well as double and Real.

Definition in file fj_dist2fj.h.