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

Port of matlab/src/api/sn/sn_rt_stations.m. More...

#include <cstddef>
#include <vector>
#include "line/api/mc/dtmc_stochcomp.h"
#include "line/lang/qn/network_struct.h"
#include "line/num/number.h"
Include dependency graph for sn_rt_stations.h:

Go to the source code of this file.

Classes

struct  line::api::SnRtStations< T >
 What sn_rt_stations returns: the complemented routing and the station visits. More...

Namespaces

namespace  line
namespace  line::api

Functions

template<class T>
SnRtStations< T > line::api::sn_rt_stations (const qn::NetworkStruct< T > &sn)

Detailed Description

Port of matlab/src/api/sn/sn_rt_stations.m.

sn.rt is over STATEFUL nodes, and a Router or a Cache is stateful without being a station. Callers that need a station-to-station routing matrix must therefore eliminate the non-station stateful rows, not index around them: the reference forms the stochastic complement

rtst = P(A,A) + P(A,B) (I - P(B,B))^-1 P(B,A),

with A the (station, class) rows in STATION order and B the rest. That is exactly dtmc_stochcomp(rt, A), which is what this port calls; the explicit block form is only how the reference spells it.

Vst is cellsum(sn.visits) restricted to the same station rows, in the same order, so the two outputs are index-compatible.

ARITHMETIC: field. dtmc_stochcomp is a linear solve.

Definition in file sn_rt_stations.h.