![]() |
LINE Solver (C++)
Templated C++ port of the LINE queueing solver
|
.lqnx -> LqnStruct, a port of matlab/src/lang/layered/@LayeredNetwork/parseXML.m followed by .../getStruct.m. More...
#include <algorithm>#include <cctype>#include <cmath>#include <cstdio>#include <limits>#include <map>#include <string>#include <unordered_map>#include <vector>#include "line/api/lqn/lsn_max_multiplicity.h"#include "line/lang/dist_fitters.h"#include "line/lang/lqn/lqn_struct.h"#include "line/util/decimal.h"#include "line/util/error.h"#include "line/util/xml.h"Go to the source code of this file.
Classes | |
| struct | line::lqn::LqnModel< T > |
| The intermediate model, and the second stage that flattens it. More... | |
Namespaces | |
| namespace | line |
| namespace | line::lqn |
Functions | |
| template<class T> | |
| LqnStruct< T > | line::lqn::lqn_finalize (const LqnModel< T > &m) |
| Port of @LayeredNetwork/getStruct.m: flatten the model into its struct. | |
| template<class T> | |
| LqnModel< T > | line::lqn::read_lqnx_model (const std::string &path) |
| template<class T> | |
| LqnStruct< T > | line::lqn::read_lqnx (const std::string &path) |
| Read a .lqnx model. | |
.lqnx -> LqnStruct, a port of matlab/src/lang/layered/@LayeredNetwork/parseXML.m followed by .../getStruct.m.
The two MATLAB stages are fused here because the intermediate object graph (Processor / Task / Entry / Activity handles) exists in MATLAB only to be flattened by getStruct, and nothing in this port holds a model object. The ORDER in which the stages walk the document is load-bearing and is preserved exactly, because it fixes the index assignment that every later array is keyed on:
hosts document order of <processor> tasks for each processor, document order of its <task> descendants entries for each task, document order of its <entry> descendants activities for each task: the <entry-phase-activities> activities of each of its entries, in entry order, THEN its <task-activities> activities
That last ordering is not the document order of <activity> elements: MATLAB processes all entries of a task before its task-activities block, so an entry-phase activity declared after a task-activities block still receives the lower index. Reproducing it is what makes an index-by-index comparison against a MATLAB dump meaningful.
WHAT IS REFUSED. The reader implements the subset of the .lqnx grammar that a layered model needs to reach SolverLN: processors, tasks, entries with phase activities or an activity graph, synchronous and asynchronous calls, forwarding, sequence / AND / OR / loop precedences, replies and open arrivals. Constructs outside it (fan-in and fan-out replication, cache tasks, setup tasks with setup times, service-time distributions declared by histogram) are rejected by name where they would change the answer, and ignored where MATLAB also ignores them.
Definition in file lqn_reader.h.