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

Port of matlab/src/api/sn/sn_print.m, jline.api.sn.SnPrint and the python sn_print in api/sn/utils.py: the full debug dump of a NetworkStruct, one field: value line per field, matrices in the compact [a b; c d] form, integer-valued entries printed as integers. More...

#include <cmath>
#include <cstddef>
#include <cstdio>
#include <exception>
#include <limits>
#include <map>
#include <string>
#include <vector>
#include "line/api/mam/map_moment.h"
#include "line/lang/lang_types.h"
#include "line/lang/qn/network_struct.h"
#include "line/num/number.h"
#include "line/util/matrix.h"
Include dependency graph for sn_print.h:

Go to the source code of this file.

Namespaces

namespace  line
 Conservation laws of a layered queueing network, enumerated from its structure.
namespace  line::api

Functions

template<class T>
std::string line::api::sn_print (const qn::NetworkStruct< T > &sn)
 The full field: value dump of a NetworkStruct, ending with a newline.

Detailed Description

Port of matlab/src/api/sn/sn_print.m, jline.api.sn.SnPrint and the python sn_print in api/sn/utils.py: the full debug dump of a NetworkStruct, one field: value line per field, matrices in the compact [a b; c d] form, integer-valued entries printed as integers.

The field list follows the reference's, in its order and naming: the C++ NetworkStruct is object-shaped (per-station and per-class records instead of MATLAB's flat matrices), so every MATLAB field is DERIVED from the records here (the index maps, isstation / isstateful / isstatedep, phasessz and phaseshift, csmask, mu / phi / pie from the (D0, D1) pairs, connmatrix from rtnodes). The few fields this struct does not carry at all – rtorig, space, sync, gsync, which the refresh folds away or the CTMC analyzer builds on the fly – are the only ones not printed; network_struct.h documents why each is absent. One port-only extra, csmatrix, follows the reference's fields.

Returned as a string rather than printed, so a caller can route it to a log, a CLI or a test, following sn_print_routing_matrix.

ARITHMETIC: field, but the rendering is in double.

Definition in file sn_print.h.