![]() |
LINE Solver (C++)
Templated C++ port of the LINE queueing solver
|
Port of @@JMTIO: a refreshed NetworkStruct written out as a JMT .jsimg simulation model. More...
#include <algorithm>#include <cmath>#include <iostream>#include <limits>#include <map>#include <memory>#include <set>#include <string>#include <vector>#include "line/io/jmt_dist.h"#include "line/lang/qn/network_struct.h"#include "line/util/error.h"#include "line/util/xml.h"Go to the source code of this file.
Classes | |
| struct | line::io::JmtWriteOptions |
| The simulation controls the JSIM header carries, MATLAB's JMTIO properties. More... | |
| struct | line::io::JmtSections< T > |
| The three JMT section class names of a node: input, server, output. More... | |
| class | line::io::JmtWriter< T > |
| The writer itself. More... | |
Namespaces | |
| namespace | line |
| namespace | line::io |
Enumerations | |
| enum class | line::io::JmtMetricKind { line::io::QLen , line::io::Util , line::io::RespT , line::io::Tput , line::io::ArvR , line::io::Tard , line::io::SysTard } |
| The measure kinds saveMetrics requests, in the order it requests them. More... | |
| enum class | line::io::JoinStrategy |
| Join rules, with the values of MATLAB JoinStrategy. More... | |
| enum class | line::io::NodeType |
| Node kinds, with the values of MATLAB NodeType. More... | |
| enum class | line::io::PollingType |
| Polling service disciplines, with the values of MATLAB PollingType. More... | |
| enum class | line::io::RoutingStrategy |
| Routing strategies, with the values of MATLAB RoutingStrategy. More... | |
| enum class | line::io::SchedStrategy |
| Scheduling disciplines, with the values of MATLAB SchedStrategy. More... | |
Functions | |
| template<class T> | |
| std::vector< std::vector< bool > > | line::io::jmt_conn_matrix (const qn::NetworkStruct< T > &sn) |
| sn.connmatrix: which ordered pairs of nodes the model LINKED. | |
| template<class T> | |
| std::vector< bool > | line::io::jmt_exportable_classes (const qn::NetworkStruct< T > &sn) |
| Port of getExportableClasses. | |
| template<class T> | |
| JmtSections< T > | line::io::jmt_sections (const qn::NetworkStruct< T > &sn, std::size_t ind) |
| const char * | line::io::jmt_metric_text (JmtMetricKind k) |
| The JMT type attribute, MATLAB MetricType.toText. | |
| template<class T> | |
| bool | line::io::jmt_metric_enabled (const qn::NetworkStruct< T > &sn, JmtMetricKind kind, std::size_t ist, std::size_t r, const std::vector< bool > &is_cache_class) |
| Port of the disabled rules in getAvgHandles, per (station, class). | |
| template<class T> | |
| std::vector< bool > | line::io::jmt_cache_classes (const qn::NetworkStruct< T > &sn) |
| The classes a Cache switches jobs into; they keep their Tput/ArvR measures. | |
| xml::Element & | line::io::jmt_param (xml::Element §ion, const char *class_path, const char *name, bool array) |
| <parameter array="true" classPath="CP" name="NAME"> | |
| void | line::io::jmt_param_value (xml::Element §ion, const char *class_path, const char *name, const std::string &value) |
| <parameter classPath="CP" name="NAME"><value>V</value></parameter> | |
| void | line::io::jmt_ref_class (xml::Element &parent, const std::string &class_name) |
| <refClass>NAME</refClass>, the per-class marker of an array parameter. | |
| const char * | line::io::jmt_drop_text (DropStrategy d) |
| MATLAB DropStrategy.toText, the strings JMT's dropRule field expects. | |
| bool | line::io::jmt_reads_drop (DropStrategy d) |
| Whether JMT's queue section can read this drop strategy at all. | |
| const char * | line::io::jmt_hetero_text (lang::HeteroSchedPolicy p) |
| MATLAB HeteroSchedPolicy.toJMTText: JMT's long descriptive identifiers. | |
| template<class T> | |
| std::string | line::io::jmt_write_jsim (const qn::NetworkStruct< T > &sn, const JmtWriteOptions &opt) |
| Port of @@JMTIO/writeJSIM.m: serialize sn as a JMT .jsimg document. | |
| template<class T> | |
| std::string | line::io::jmt_buffer_capacity_refusal (const qn::NetworkStruct< T > &sn, bool jmva_engine) |
| JmtWriter::buffer_capacity_refusal without a document: the writer's own binding-buffer verdict, for the gate in jmt::jmt_method_refusal. | |
Port of @@JMTIO: a refreshed NetworkStruct written out as a JMT .jsimg simulation model.
THE REFERENCE WALKS NODE OBJECTS; THIS PORT WALKS THE STRUCT. MATLAB's writeJSIM iterates model.nodes{i} and asks each for its three SECTIONS (input, server, output), which are objects the node's constructor installed. This port has no node objects – network_builder produces a NetworkStruct directly – so jmt_sections re-derives the same triple from the node type and the scheduling strategy, transcribing the constructors of Queue.m, Source.m, Sink.m, Router.m, ClassSwitch.m, Cache.m, Logger.m, Fork.m, Join.m, Place.m and Transition.m. That table is the one place where this port can drift from the reference without a compiler error, so it names its source file for each row.
WHAT IS DELIBERATELY REPRODUCED RATHER THAN CORRECTED. Two places in the reference emit less than they appear to, and all four codebases agree on the result, so this port agrees with them and says so at the site:
Definition in file jmt_writer.h.