![]() |
LINE Solver (C++)
Templated C++ port of the LINE queueing solver
|
LayeredNetworkStruct, the flattened description of a layered queueing network. More...
#include <cmath>#include <map>#include <string>#include <unordered_map>#include <utility>#include <vector>#include "line/lang/lang_types.h"#include "line/num/number.h"#include "line/util/error.h"#include "line/util/matrix.h"Go to the source code of this file.
Classes | |
| struct | line::lqn::ServerPools< T > |
| Heterogeneous server pools declared on a layer server, the twin of the nservertypes / servertypenames / serverspertype / servercompat / heterorates block a Network carries in sn.nodeparam{i}. More... | |
| struct | line::lqn::SparseGraph< T > |
| A sparse square matrix over element indices, held as a dense vector of rows with an explicit nonzero list per row. More... | |
| struct | line::lqn::BoolGraph |
| A boolean sparse relation over element indices, e.g. More... | |
| struct | line::lqn::LqnPrecedence< T > |
| One activity precedence of a task, with its activities resolved to indices. More... | |
| struct | line::lqn::LqnCallGroup |
| One routed call group: an activity, the strategy that picks among its targets, and the target ENTRIES in declaration order. More... | |
| struct | line::lqn::LqnStruct< T > |
| struct | line::lqn::Distrib< T > |
Namespaces | |
| namespace | line |
| namespace | line::lqn |
Typedefs | |
| template<class T> | |
| using | line::lqn::CdScaling |
| A class-dependent scaling map, sn.cdscaling. | |
Enumerations | |
| enum class | line::lqn::CallType |
| Call kinds, with the values of MATLAB CallType. More... | |
| enum class | line::lqn::LqnElement |
| LQN element kinds, with the values of MATLAB LayeredNetworkElement. More... | |
| enum class | line::lqn::PrecedenceType |
| Activity precedence kinds, with the values of MATLAB ActivityPrecedenceType. More... | |
| enum class | line::lqn::ReplacementStrategy |
| Cache replacement policies, with the values of MATLAB ReplacementStrategy. More... | |
| enum class | line::lqn::SchedStrategy |
| Scheduling disciplines, with the values of MATLAB SchedStrategy. More... | |
LayeredNetworkStruct, the flattened description of a layered queueing network.
Port of matlab/src/lang/layered/LayeredNetworkStruct.m and of the fields that matlab/src/lang/layered/@LayeredNetwork/getStruct.m populates. Only the fields SolverLN and SolverMVA read are carried; the process-descriptor families (hostdem_proc, itemproc, setuptime, delayofftime) exist in MATLAB to serve solvers this port does not have and are omitted rather than filled with placeholders.
INDEXING. Element indices are 1-based and live in one flat space shared by the four element kinds, exactly as in MATLAB:
hosts 1 .. nhosts (hshift = 0) tasks tshift+1 .. tshift+ntasks (tshift = nhosts) entries eshift+1 .. eshift+nentries (eshift = nhosts+ntasks) activities ashift+1 .. ashift+nacts (ashift = eshift+nentries)
with nidx = ashift + nacts and cshift = nidx, so a call index cidx is addressed as nidx+cidx inside the entry-service matrix. Calls are numbered separately, 1..ncalls. Vectors are sized nidx+1 (or ncalls+1) and slot 0 is unused; this keeps every index expression identical to the reference, which is worth more here than the one wasted slot, because the arithmetic on these indices (parent-of-parent to reach a host, aidx-ashift to reach a phase) is dense and a systematic off-by-one would be silent.
ARITHMETIC. Means, think times and call multiplicities are T. Element multiplicities, replication counts and job populations are double, matching MATLAB: they are counts, they can be infinite (an inf-scheduled task), and they enter the solvers as integer populations, so nothing is gained by carrying them in the exact type and the infinity would have to be emulated.
Definition in file lqn_struct.h.