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

Port of solver_mam_passage_time.m: the response-time (sojourn-time) distribution of a single open queue, which is what getCdfRespT, getSjrnT / sjrnT and the CDF path of getPerctRespT return. More...

#include <cmath>
#include <cstddef>
#include <string>
#include <vector>
#include "line/api/mam/map_cdf.h"
#include "line/api/mam/map_m1ps.h"
#include "line/api/mam/map_moment.h"
#include "line/api/mam/map_transform.h"
#include "line/api/mam/mmap_assemble.h"
#include "line/api/mam/mmapph1fcfs.h"
#include "line/lang/distribution.h"
#include "line/lang/qn/network_struct.h"
#include "line/solvers/mam/mam_types.h"
#include "line/util/error.h"
#include "line/util/matrix.h"
Include dependency graph for solver_mam_passage_time.h:

Go to the source code of this file.

Classes

struct  line::mam::RespTCdf< T >
 One class's response-time CDF, the reference's RD{station, class} = [F, X]. More...

Namespaces

namespace  line
namespace  line::mam

Functions

template<class T>
std::vector< RespTCdf< T > > line::mam::solver_mam_passage_time (const qn::NetworkStruct< T > &L, const MamOptions &opt)
 Port of solver_mam_passage_time.m.
template<class T>
std::vector< T > line::mam::mam_percentiles_from_cdf (const RespTCdf< T > &cdf, const std::vector< double > &pcts)
 Port of the CDF path of @@SolverMAM/getPerctRespT.m: linear interpolation of the response-time CDF at the requested percentile levels.

Detailed Description

Port of solver_mam_passage_time.m: the response-time (sojourn-time) distribution of a single open queue, which is what getCdfRespT, getSjrnT / sjrnT and the CDF path of getPerctRespT return.

THE REGIME IS NARROW AND THE REFERENCE SAYS SO. The whole analyzer is inside if M == 2 && all(isinf(N)): exactly two stations, a Source and one queue, every class open. Anything else makes MATLAB warn and return with NO result at all – an empty RD that then surfaces as a confusing failure further up. The port refuses by name instead, which is the same information delivered where it can be acted on.

TWO ENGINES, chosen by the queue's discipline:

  • FCFS / HOL: the sojourn time is a phase-type law read straight out of the age process (mmapph1fcfs_stdistr_ph). The evaluation grid is the reference's: start at mean + 5 sigma and widen until the CDF is within FineTol of one, then lay down num_cdf_pts points from zero.
  • PS: the MAP/M/1-PS sojourn law of map_m1ps_cdfrespt, which returns the COMPLEMENTARY CDF, so the port takes 1 - W_bar as the reference does. The grid there is 10x the M/M/1-PS mean, and the reference requires exponential service (order-1 subgenerator) and, for several classes, identical service rates – both refused by name here.

WHAT IS NOT PORTED, and refuses: the priority branch. Distinct priorities under HOL reach BUTools' MMAPPH1NPPR (MMAPPH1PRPR when preemptive), whose sojourn law MATLAB, the JAR and python tabulate through 'stMoms' + 'stDistr' since 2026-08-27 (no vendored analyzer exports a PH form); neither analyzer is ported to C++, exactly as in solver_mam_basic, so this arm is the one member of the family still refusing it.

Definition in file solver_mam_passage_time.h.