![]() |
LINE Solver (C++)
Templated C++ port of the LINE queueing solver
|
LqnModel -> .lqnx, a port of matlab/src/lang/layered/@LayeredNetwork/writeXML.m. More...
#include <algorithm>#include <cmath>#include <cstdio>#include <cstdlib>#include <map>#include <set>#include <string>#include <vector>#include "line/lang/lqn/lqn_reader.h"#include "line/util/error.h"#include "line/util/xml.h"Go to the source code of this file.
Classes | |
| struct | line::lqn::LqnWriteReport |
| What the schema could not carry, one human-readable line per loss. More... | |
Namespaces | |
| namespace | line |
| namespace | line::lqn |
Functions | |
| template<class T> | |
| LqnWriteReport | line::lqn::write_lqnx (const LqnModel< T > &m, const std::string &path, const std::string &model_name=std::string("LQN"), bool use_abstract_names=false) |
| Write a layered model as a .lqnx document. | |
LqnModel -> .lqnx, a port of matlab/src/lang/layered/@LayeredNetwork/writeXML.m.
WHY IT WRITES THE INTERMEDIATE MODEL AND NOT THE STRUCT. getStruct flattens a precedence block into edges of graph, so an AND-fork and two independent sequences leave the same trace there, and a POST_LOOP loses its counts to the branch shares. lqns rejects a document whose activity graph does not name its blocks, so a writer working from the struct would have to guess them; the reference writes from the handle graph for the same reason, and LqnModel is this port's stand-in for it (lqn_reader.h).
WHAT THE SCHEMA CANNOT CARRY, and what this does about it:
REPLIES. lqns requires every synchronously-called entry of a non-reference task to name its reply activity. A model built in code, or read from a document that left them implicit, has none declared, so the implicit rule of getStruct.m:641-671 is reproduced here: a leaf activity of the task (no successor within the same task) replies to the entry reached by walking the graph backwards, and an entry that declares any reply keeps its own.
Definition in file lqn_writer.h.