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

Open-class contribution to an aggregate state probability at one station. More...

#include <cmath>
#include <cstddef>
#include "line/api/pfqn/pfqn_asympt_common.h"
#include "line/lang/lang_types.h"
#include "line/lang/qn/network_struct.h"
#include "line/num/number.h"
#include "line/util/error.h"
#include "line/util/matrix.h"
Include dependency graph for sn_open_prob_terms.h:

Go to the source code of this file.

Classes

struct  line::api::OpenProbTerm< T >
 The log contribution, and whether the state carries any mass at all. More...

Namespaces

namespace  line
namespace  line::api

Functions

template<class T>
OpenProbTerm< T > line::api::sn_open_prob_terms (const qn::NetworkStruct< T > &sn, const Matrix< T > &Q, const Matrix< T > &U, const Matrix< T > &nir, std::size_t ist)
 Open-class contribution to an aggregate state probability at one station.

Detailed Description

Open-class contribution to an aggregate state probability at one station.

Templated port of jar/src/main/java/jline/api/sn/SnOpenProbTerms.java, which factors the mixed branch shared by @@SolverMVA/getProbAggr.m and @@SolverMVA/getProbSysAggr.m (and the native Python _open_prob_aggr_terms) out of both getters. The three station shapes are:

  • EXT (a Source): no contribution, its population belongs to the environment;
  • INF (a Delay): an independent Poisson per open class, mean Q(i,r);
  • anything else: the multinomial-geometric BCMP form (1 - sum_r rho_r) (sum_r n_r)! prod_r rho_r^n_r / n_r!.

The whole term is returned in logs, since the callers accumulate a log probability and only exponentiate at the end.

INFEASIBILITY IS A FLAG, NOT -Inf. The reference returns negative infinity for a state the law gives zero mass to (a class present where its utilization is zero, or a saturated station). Rational has no infinity, so the verdict rides in feasible and the caller decides what sentinel to emit; every caller in this port short-circuits, so the log value is never read when it is false.

ARITHMETIC: transcendental. Needs log and lgamma, so it does not instantiate under Rational.

Definition in file sn_open_prob_terms.h.