![]() |
LINE Solver (C++)
Templated C++ port of the LINE queueing solver
|
Convert a layered queueing network into a single queueing network in which synchronous call blocking is carried by REPLY signals. More...
#include <algorithm>#include <cmath>#include <cstddef>#include <iostream>#include <limits>#include <map>#include <set>#include <string>#include <utility>#include <vector>#include "line/lang/lqn/lqn_reader.h"#include "line/lang/lqn/lqn_struct.h"#include "line/lang/lqn/lqn_writer.h"#include "line/lang/qn/network_builder.h"#include "line/num/number.h"#include "line/util/error.h"#include "line/util/matrix.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::io |
Functions | |
| template<class T> | |
| qn::Network< T > | line::io::lqn2qn (const lqn::LqnModel< T > &lqn, const std::string &replication="auto", const std::string &name="model", std::vector< std::string > *warnings=nullptr) |
| Port of MATLAB LQN2QN(lqn, replication): flatten a layered network into a queueing network whose synchronous calls block through REPLY signals. | |
| template<class T> | |
| qn::Network< T > | line::io::lqn2qn (const lqn::LqnStruct< T > &lsn, const std::string &replication="auto", const std::string &name="model", std::vector< std::string > *warnings=nullptr) |
| LQN2QN over an already flattened LqnStruct. | |
Convert a layered queueing network into a single queueing network in which synchronous call blocking is carried by REPLY signals.
Port of matlab/src/io/LQN2QN.m (the reference), mirrored by jar/src/main/java/jline/io/LQN2QN.java and python/line_solver/io/__init__.py. The construction is the reference's, step for step, and so is the order in which nodes and classes are created, so that a model converted here and one converted by MATLAB or Python have the same node and class tables:
REPLIES. The reference reads which activity replies to which entry from lsn.replygraph, which holds the EXPLICIT replies plus the implicit ones getStruct.m infers for leaf activities. The C++ LqnStruct keeps no replygraph, so the LqnModel overload recovers it with lqn::detail::reply_activities, the port of that same pass. The LqnStruct overload can only infer the implicit replies: an entry whose reply is declared on a non-leaf activity, which is what a phase-2 activity is, needs the LqnModel overload.
Construction choices that are the reference's own and not yet represented there either (retrieval on a cache read with phase-2 successors, the thread pool of a task with an internal AND-fork, and the others listed in LQN2QN.m) are reported as warnings, exactly where the reference calls line_warning.
Definition in file lqn2qn.h.