![]() |
LINE Solver (C++)
Templated C++ port of the LINE queueing solver
|
The MMAP[K]/PH[K]/1 priority queue, preemptive resume (mmapph1prpr_*) and non-preemptive (mmapph1nppr_*). More...
#include <cmath>#include <cstddef>#include <vector>#include "line/api/mam/mfq_solve.h"#include "line/api/mam/mmap_lambda.h"#include "line/api/mam/mmapph1fcfs.h"#include "line/api/mam/qbd_r.h"#include "line/api/mc/ctmc_solve.h"#include "line/num/number.h"#include "line/util/error.h"#include "line/util/expm.h"#include "line/util/linalg.h"#include "line/util/matrix.h"#include "line/util/sylvester.h"Go to the source code of this file.
Classes | |
| struct | line::mam::PrioQueueOptions |
| Options shared by both priority analyzers (the BUTools 'erlMaxOrder' and 'prec'). More... | |
Namespaces | |
| namespace | line |
| Conservation laws of a layered queueing network, enumerated from its structure. | |
| namespace | line::mam |
Functions | |
| template<class T> | |
| std::vector< std::vector< T > > | line::mam::mmapph1prpr_ncmoms (const Mmap< T > &arrival, const std::vector< PhService< T > > &svc, std::size_t n, const PrioQueueOptions &opt=PrioQueueOptions()) |
| Per-class moments 1..n of the number of jobs, MMAP[K]/PH[K]/1 preemptive resume priority. | |
| template<class T> | |
| std::vector< std::vector< T > > | line::mam::mmapph1prpr_ncdistr (const Mmap< T > &arrival, const std::vector< PhService< T > > &svc, std::size_t nmax, const PrioQueueOptions &opt=PrioQueueOptions()) |
| Per-class P(number of jobs = 0..nmax-1), preemptive resume priority. | |
| template<class T> | |
| std::vector< std::vector< T > > | line::mam::mmapph1prpr_stmoms (const Mmap< T > &arrival, const std::vector< PhService< T > > &svc, std::size_t n, const PrioQueueOptions &opt=PrioQueueOptions()) |
| Per-class sojourn-time moments 1..n, preemptive resume priority. | |
| template<class T> | |
| std::vector< std::vector< T > > | line::mam::mmapph1prpr_stdistr (const Mmap< T > &arrival, const std::vector< PhService< T > > &svc, const std::vector< T > &points, const PrioQueueOptions &opt=PrioQueueOptions()) |
| Per-class sojourn-time CDF at the (strictly positive) points, preemptive resume priority. | |
| template<class T> | |
| std::vector< std::vector< T > > | line::mam::mmapph1nppr_ncmoms (const Mmap< T > &arrival, const std::vector< PhService< T > > &svc, std::size_t n, const PrioQueueOptions &opt=PrioQueueOptions()) |
| Per-class moments 1..n of the number of jobs, MMAP[K]/PH[K]/1 non-preemptive priority. | |
| template<class T> | |
| std::vector< std::vector< T > > | line::mam::mmapph1nppr_ncdistr (const Mmap< T > &arrival, const std::vector< PhService< T > > &svc, std::size_t nmax, const PrioQueueOptions &opt=PrioQueueOptions()) |
| Per-class P(number of jobs = 0..nmax-1), non-preemptive priority. | |
| template<class T> | |
| std::vector< std::vector< T > > | line::mam::mmapph1nppr_stmoms (const Mmap< T > &arrival, const std::vector< PhService< T > > &svc, std::size_t n, const PrioQueueOptions &opt=PrioQueueOptions()) |
| Per-class sojourn-time moments 1..n, non-preemptive priority. | |
| template<class T> | |
| std::vector< std::vector< T > > | line::mam::mmapph1nppr_stdistr (const Mmap< T > &arrival, const std::vector< PhService< T > > &svc, const std::vector< T > &points, const PrioQueueOptions &opt=PrioQueueOptions()) |
| Per-class sojourn-time CDF at the (strictly positive) points, non-preemptive priority. | |
The MMAP[K]/PH[K]/1 priority queue, preemptive resume (mmapph1prpr_*) and non-preemptive (mmapph1nppr_*).
Port of BUTools' MMAPPH1PRPR.m and MMAPPH1NPPR.m (matlab/lib/thirdparty/ BUTools/queues), which solver_mam_basic.m calls at an FCFSPRPRIO or HOL station with all-distinct class priorities, and solver_mam_passage_time.m tabulates the sojourn CDF from. The algorithm is G. Horvath, "Efficient analysis of the MMAP[K]/PH[K]/1 priority queue", European Journal of Operational Research 246(1), 128-139, 2015: the workload of the classes at or above k is a fluid queue whose first-return matrix Psi (ADDA doubling, mfq_fundamental) yields the boundary vector, and the remaining sojourn time of a class-k job is the first passage time of a second fluid model over the higher classes. Moments come from a chain of Sylvester equations sharing their coefficient matrices; the CDF from an Erlangized Laplace inversion of order erl_max_order.
CLASS ORDER IS BUTools' OWN: class 1 is the LOWEST priority and class K the highest. The caller permutes LINE's classes (lower classprio value = higher priority) into that order and maps the outputs back, as the reference does.
Every entry point returns one row per class, in the order of the input.
ARITHMETIC. The Riccati and QBD roots are tolerance-terminated iterations, so these are {Double, Real} and refuse exact/Rational at compile time, like mmapph1fcfs.
Definition in file mmapph1prio.h.