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

Station consolidation and its inverse: merge identical demand rows into one station with a multiplicity, and expand per-station results back. More...

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

Go to the source code of this file.

Classes

struct  line::pfqn::UniqueResult< T >

Namespaces

namespace  line
namespace  line::pfqn

Functions

template<class T>
UniqueResult< T > line::pfqn::pfqn_unique (const Matrix< T > &L, const Matrix< T > &mu, const Matrix< T > &gamma)
 Merge stations whose (L, mu, gamma) rows are exactly equal.
template<class T>
UniqueResult< T > line::pfqn::pfqn_unique (const Matrix< T > &L)
std::vector< int > line::pfqn::pfqn_combine_mi (const std::vector< int > &mi, const std::vector< std::size_t > &mapping, std::size_t M_unique)
 Fold a caller-supplied multiplicity vector along a consolidation mapping.

Detailed Description

Station consolidation and its inverse: merge identical demand rows into one station with a multiplicity, and expand per-station results back.

Templated port of matlab/src/api/pfqn/pfqn_unique.m and pfqn_expand.m, plus the load-dependent rate shift pfqn_mushift.m.

One deliberate divergence from MATLAB, the same one already taken in pfqn_recal: MATLAB compares rows within GlobalConstants.Zero() (1e-14), so it merges stations whose demands only nearly agree. A tolerance-based merge perturbs the normalizing constant, which is unacceptable for an exact-capable algorithm and has no meaning at all in the rational field. The port merges on exact equality. Callers that want tolerant merging should round their demands before calling, where the rounding is visible.

Definition in file pfqn_unique.h.