![]() |
LINE Solver (C++)
Templated C++ port of the LINE queueing solver
|
Random layered-queueing-network generation: the C++ twin of MATLAB @LayeredNetworkGenerator, the JAR jline.gen.LayeredNetworkGenerator and the native Python line_solver.gen.layered_network_generator. More...
#include <algorithm>#include <cmath>#include <cstddef>#include <limits>#include <string>#include <vector>#include "line/lang/lang_types.h"#include "line/lang/lqn/lqn_builder.h"#include "line/util/error.h"#include "line/util/rng_ssj.h"Go to the source code of this file.
Classes | |
| struct | line::gen::Range |
| A closed interval the generator samples from. More... | |
| class | line::gen::LayeredNetworkGenerator< T > |
| A random lqn::LqnBuilder<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 |
Random layered-queueing-network generation: the C++ twin of MATLAB @LayeredNetworkGenerator, the JAR jline.gen.LayeredNetworkGenerator and the native Python line_solver.gen.layered_network_generator.
WHAT IT PRODUCES. A layered model of numClients reference tasks calling down through numLevels layers of numTasks server tasks, hosted on numProcessors processors. Every client is a REF task on its own infinite-server processor with a think-time activity; every server task has one entry and one activity that replies to it; the layers are wired top-down so a task of level l is called by a task of level l-1, and the tasks are spread over the processors in contiguous blocks.
THIS ONE IS SAMPLE-PATH IDENTICAL TO THE JAR, unlike its flat twin NetworkGenerator. Every draw the reference makes goes through the ONE java.util.Random that setSeed replaces – there is no randGraph and no Collections.shuffle on a separate source here – and rng::JavaRandom is a bit-exact reproduction of that generator. The draw ORDER is preserved too: the builder needs a processor before the task that sits on it, and a task before its entry, where the reference creates the objects first and wires them afterwards, so the PARAMETERS are drawn in the reference's order into vectors and the builder calls are issued from those. Nothing reorders a draw.
RANGES. Each *_range is a closed interval, sampled as the reference samples it: an INTEGER range rounds its bounds inwards (ceil of the lower, floor of the upper) and draws uniformly over the integers between, a REAL range draws lo + (hi - lo) * U. The defaults are all {1, 1} with both infinity probabilities zero, which generates the deterministic skeleton – one job per client, unit think times, unit demands, single-server tasks and processors.
MEANS BECOME DISTRIBUTIONS the way setHostDemand does: a mean at or below FineTol is an Immediate, anything else an Exp of that mean.
Definition in file layered_network_generator.h.