![]() |
LINE Solver (C++)
Templated C++ port of the LINE queueing solver
|
model.json with type: "LayeredNetwork" -> LqnStruct, via LqnBuilder. More...
#include <map>#include <string>#include <vector>#include "line/io/network_reader.h"#include <cctype>#include <fstream>#include "line/lang/lqn/lqn_builder.h"#include "line/lang/lqn/lqn_reader.h"#include "line/lang/lqn/lqn_struct.h"#include "line/util/error.h"Go to the source code of this file.
Namespaces | |
| namespace | line |
| namespace | line::io |
Functions | |
| template<class T> | |
| lqn::LqnStruct< T > | line::io::build_lqn_from_json (const detail::json &root) |
| Build an LqnStruct<T> from a parsed model.json envelope carrying a LayeredNetwork. | |
| bool | line::io::is_layered_json (const std::string &path) |
| True when a file is a LayeredNetwork model.json rather than an .lqnx. | |
| template<class T> | |
| lqn::LqnStruct< T > | line::io::read_lqn_json (const std::string &path) |
| Parse a LayeredNetwork model.json file into an LqnStruct<T>. | |
| template<class T> | |
| lqn::LqnStruct< T > | line::io::read_layered_model (const std::string &path) |
| Read a layered model from either interchange: the LINE model.json or the LQNS .lqnx. | |
model.json with type: "LayeredNetwork" -> LqnStruct, via LqnBuilder.
WHY THIS EXISTS BESIDE lqn_reader.h. The .lqnx reader covers the LQNS file format, which is what an external tool writes; this covers the LINE interchange format, which is what linemodel_save.m, save_model and the JAR LineModelIO write for a LayeredNetwork. The two are not interchangeable in either direction: .lqnx cannot carry a non-reference task's think time, a CacheTask, an ItemEntry or a SetupTask, and model.json carries all four. Without this reader a layered model could reach the C++ port only by being re-exported through XML, losing exactly those constructs.
ORDERING IS PART OF THE FORMAT. LqnBuilder assigns indices in call order, and every later array – the layer decomposition, the visit matrix, the result tables – is keyed on them. The document's own order is used throughout (hosts, then tasks, then entries, then activities), which is the order the writers emit and therefore the order MATLAB's own getStruct produced before serialization.
WHAT IS REFUSED. Fan-in and fan-out replication (fanIn/fanOut) and the per-element admission constraints have no LqnBuilder counterpart that the layer decomposition honours, and a call multiplicity silently applied at 1 would understate every visit through the replicated task. They are named rather than dropped, as everywhere else on this boundary.
Definition in file lqn_json_reader.h.