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

Scaffolding shared by the approximate-MVA family. More...

#include <cstddef>
#include <vector>
#include "line/num/number.h"
#include "line/util/error.h"
#include "line/util/matrix.h"
#include "line/util/population.h"
Include dependency graph for pfqn_amva_common.h:

Go to the source code of this file.

Namespaces

namespace  line
namespace  line::pfqn

Enumerations

enum class  line::pfqn::SchedStrategy { line::pfqn::PS , line::pfqn::FCFS , line::pfqn::INF }
 The three scheduling disciplines the AMVA and Schmidt recursions branch on. More...

Functions

std::vector< int > line::pfqn::oner (const std::vector< int > &N, std::size_t r)
 matlab/src/util/oner.m: decrement position r of N, with r given 1-based and r == 0 meaning "leave N alone" (the s == 0 arm of every for s=0:R loop).
template<class T>
line::pfqn::enorm (const Matrix< T > &A)
 matlab/src/util/enorm.m: Frobenius norm of a matrix.
template<class T>
double line::pfqn::enorm_diff (const Matrix< T > &A, const Matrix< T > &B)
 Frobenius norm of the difference of two equally shaped matrices, AS A DOUBLE.
template<class T>
std::vector< T > line::pfqn::sum_rows (const Matrix< T > &Z, std::size_t R)
 Sum the rows of a think-time matrix into a length-R vector, the sum(Z,1) that every AMVA entry point performs on its Z argument.
void line::pfqn::first_composition (std::vector< int > &n, int c)
 matlab/src/util/multichoose.m and sprod.m, as an in-place odometer: the compositions of c into R non-negative parts, i.e.
bool line::pfqn::next_composition (std::vector< int > &n)
template<class T>
line::pfqn::num_multinomial (const std::vector< int > &m)
 Multinomial coefficient sum(m)!

Detailed Description

Scaffolding shared by the approximate-MVA family.

This header is NOT a port of a MATLAB function: it collects the small utilities that matlab/src/util/ provides to every AMVA routine (oner, pprod, sprod, multichoose, enorm) plus the scheduling-discipline tag those routines branch on, so that each pfqn_*.h below stays a 1:1 port of its own MATLAB file.

Scheduling disciplines. The MATLAB routines take sn.sched-valued vectors but only ever compare them against SchedStrategy.PS, SchedStrategy.FCFS and SchedStrategy.INF, so the full enum is not part of the porting surface: the three tags below are what the algorithms actually distinguish. Anything else in a model is handled upstream, in the NetworkStruct layer, which is out of scope here.

Definition in file pfqn_amva_common.h.