![]() |
LINE Solver (C++)
Templated C++ port of the LINE queueing solver
|
Random queueing-network generation: the C++ twin of MATLAB @NetworkGenerator, the JAR jline.gen.NetworkGenerator and the native Python line_solver.gen.network_generator. More...
#include <algorithm>#include <cctype>#include <cmath>#include <cstddef>#include <functional>#include <string>#include <vector>#include "line/lang/dist_fitters.h"#include "line/lang/lang_types.h"#include "line/lang/qn/network_builder.h"#include "line/lang/qn/network_struct.h"#include "line/util/error.h"#include "line/util/matrix.h"#include "line/util/rng_ssj.h"Go to the source code of this file.
Classes | |
| class | line::gen::NetworkGenerator< T > |
| A random qn::Network<T> source, configured once and then drawn from. More... | |
Namespaces | |
| namespace | line |
| Conservation laws of a layered queueing network, enumerated from its structure. | |
| namespace | line::gen |
Enumerations | |
| enum class | line::gen::TopologyKind { line::gen::Rand , line::gen::Cyclic } |
| The two topology generators the reference ships, randGraph and cyclicGraph. More... | |
Functions | |
| Matrix< double > | line::gen::rand_spanning_tree (std::size_t num_vertices, rng::JavaRandom &r) |
| randSpanningTree(n): vertex i (i >= 1) is attached to a uniformly chosen earlier vertex, which is a uniform draw over the labelled rooted trees this construction reaches, and always a tree rooted at 0. | |
| Matrix< double > | line::gen::rand_graph (std::size_t num_vertices, rng::JavaRandom &r) |
| randGraph(n): a random strongly connected digraph on n vertices, as a random spanning tree closed up by strongConnect and then relabelled by a random permutation (without which vertex 0 would always be the DFS root). | |
| Matrix< double > | line::gen::cyclic_graph (std::size_t num_vertices) |
| cyclicGraph(n): the single cycle 0 -> 1 -> ... -> n-1 -> 0. | |
| std::vector< double > | line::gen::randfixedsumone (std::size_t num_elems, rng::JavaRandom &r) |
| randfixedsumone(n): n probabilities summing to exactly 1. | |
| std::vector< int > | line::gen::randintfixedsum (int s, int n, rng::JavaRandom &r) |
| randintfixedsum(s, n): n STRICTLY POSITIVE integers summing to s. | |
Random queueing-network generation: the C++ twin of MATLAB @NetworkGenerator, the JAR jline.gen.NetworkGenerator and the native Python line_solver.gen.network_generator.
WHAT IT PRODUCES. A qn::Network<T> with numQueues queues, numDelays delay stations, numOClass open classes and numCClass closed classes, wired over a random strongly connected topology, with random service laws, random scheduling, random routing and (optionally) random ClassSwitch nodes on the links. It is the model source the test suites, the benchmark sweeps and the solver-comparison harnesses draw from, so the shapes it can emit matter more than any single draw: every arm of the reference is reproduced, including the multi-chain class-switch masks and the load bands.
HOW IT DIFFERS FROM THE REFERENCES, and this is deliberate:
ARITHMETIC. Every random quantity is drawn as a double (the reference draws are nextDouble/nextInt) and lifted into T, so the generator instantiates at exact arithmetic as well. The one transcendental step is the HyperExp moment fit, which is done in double and its three parameters lifted, the same bargain sn_aggregate_chains strikes for the same reason.
Definition in file network_generator.h.