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

Chain aggregation and de-aggregation. More...

#include <algorithm>
#include <cmath>
#include <vector>
#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_chain.h:

Go to the source code of this file.

Classes

struct  line::mva::ChainDemands< T >
 The chain-level view of a layer, as sn_get_demands_chain returns it. More...
struct  line::mva::ClassResults< T >
 Class-level results, as sn_deaggregate_chain_results returns them. More...
struct  line::mva::PfChainParams< T >
 Product-form chain parameters, the split into queueing and delay stations. More...

Namespaces

namespace  line
namespace  line::mva

Enumerations

enum class  line::mva::SchedStrategy
 Scheduling disciplines, with the values of MATLAB SchedStrategy. More...

Functions

template<class T>
ChainDemands< T > line::mva::sn_get_demands_chain (const qn::NetworkStruct< T > &L)
 Port of sn_get_demands_chain.
template<class T>
ClassResults< T > line::mva::sn_deaggregate_chain_results (const qn::NetworkStruct< T > &L, const ChainDemands< T > &d, const Matrix< T > &Qchain, const Matrix< T > &Uchain, const Matrix< T > &Rchain, const Matrix< T > &Tchain, const std::vector< T > &Xchain)
 Port of sn_deaggregate_chain_results.
template<class T>
PfChainParams< T > line::mva::sn_get_product_form_chain_params (const qn::NetworkStruct< T > &L, const ChainDemands< T > &d)
 Port of sn_get_product_form_chain_params.
template<class T>
Matrix< T > line::mva::sn_interlock_chain (const qn::NetworkStruct< T > &L, const std::vector< std::vector< double > > &ILclass)
 Aggregate a class-indexed interlock matrix to the chain basis the MVA analyzers work in.

Detailed Description

Chain aggregation and de-aggregation.

Ports of matlab/src/api/sn/sn_get_demands_chain.m, sn_get_product_form_chain_params.m and sn_deaggregate_chain_results.m. These are the bridge between the class-level layer struct and the chain-level product-form solvers: a chain is a set of classes a job moves between while circulating, so the solvers work on chains and the results are pushed back to classes with the visit-share weights alpha.

NON-FINITE VALUES. MATLAB reaches this code with NaN and Inf in sn.rates (NaN for a station-class pair the class never visits, Inf for an immediate service) and clears them afterwards with X(~isfinite(X)) = 0. The exact backend has neither value, so the two are carried as explicit flags – the layer's disabled mask, and a local st_inf mask for a zero rate – and the same entries end up zero. Every place a MATLAB isfinite guard fires, the corresponding flag test fires here.

Definition in file sn_chain.h.