![]() |
LINE Solver (C++)
Templated C++ port of the LINE queueing solver
|
A random qn::Network<T> source, configured once and then drawn from. More...
#include <line/gen/network_generator.h>
Public Member Functions | |
| NetworkGenerator () | |
| NetworkGenerator (long long seed) | |
| void | set_seed (long long seed) |
| Reseed the single stream every draw comes from. | |
| void | set_model_name (const std::string &nm) |
| The name given to the generated model. | |
| const std::string & | model_name () const |
| void | set_sched_strat (const std::string &strat) |
| fcfs, ps, inf, lcfs, lcfspr, siro, sjf, ljf, sept, lept, or randomize. | |
| const std::string & | sched_strat () const |
| void | set_routing_strat (const std::string &strat) |
| Probabilities, Random, or randomize. | |
| const std::string & | routing_strat () const |
| void | set_distribution (const std::string &d) |
| Exp, Erlang, HyperExp, or randomize. | |
| const std::string & | distribution () const |
| void | set_cclass_job_load (const std::string &load) |
| high, medium, low, or randomize: the population band of a closed class. | |
| const std::string & | cclass_job_load () const |
| void | set_varying_service_rates (bool v) |
| Service means spread over 2^-6 . | |
| bool | varying_service_rates () const |
| void | set_multi_server_queues (bool v) |
| Queues get 1..40 servers instead of exactly one. | |
| bool | multi_server_queues () const |
| void | set_random_cs_nodes (bool v) |
| Each link gets a ClassSwitch node inserted on a coin flip. | |
| bool | random_cs_nodes () const |
| void | set_multi_chain_cs (bool v) |
| Classes are partitioned into random chains and switching is confined to a chain, instead of the default "all open classes switch among themselves
and all closed classes among themselves". | |
| bool | multi_chain_cs () const |
| void | set_topology (TopologyKind kind) |
| Pick one of the two shipped topology generators. | |
| void | set_topology_fcn (const std::function< Matrix< double >(std::size_t, rng::JavaRandom &)> &fcn) |
| A custom topology: any function from a vertex count (and the generator's own stream, so a custom topology stays reproducible too) to a square 0/1 adjacency matrix. | |
| qn::Network< T > | generate (int num_queues, int num_delays, int num_oclass, int num_cclass) |
| The full form. | |
| qn::Network< T > | generate (int num_queues, int num_delays, int num_oclass) |
| generate(numQueues, numDelays, numOClass), closed-class count drawn 1..4. | |
| qn::Network< T > | generate (int num_queues, int num_delays) |
| generate(numQueues, numDelays), no open classes. | |
| qn::Network< T > | generate (int num_queues) |
| generate(numQueues), delays decided by the rule above. | |
| qn::Network< T > | generate () |
| Everything drawn: 1..8 queues, 1..4 closed classes, no open classes. | |
Static Public Member Functions | |
| static std::size_t | max_generate_attempts () |
| Resampling budget before an unsatisfiable configuration is reported. | |
A random qn::Network<T> source, configured once and then drawn from.
Every setter validates its argument against the same vocabulary the reference accepts, so a typo is an error at configuration time rather than a silently different model.
Definition at line 276 of file network_generator.h.
|
inline |
Definition at line 278 of file network_generator.h.
|
inlineexplicit |
Definition at line 279 of file network_generator.h.
|
inline |
Definition at line 323 of file network_generator.h.
|
inline |
Definition at line 313 of file network_generator.h.
|
inline |
Everything drawn: 1..8 queues, 1..4 closed classes, no open classes.
Definition at line 420 of file network_generator.h.
References generate().
|
inline |
generate(numQueues), delays decided by the rule above.
Definition at line 416 of file network_generator.h.
References generate().
|
inline |
generate(numQueues, numDelays), no open classes.
Definition at line 412 of file network_generator.h.
References generate().
|
inline |
generate(numQueues, numDelays, numOClass), closed-class count drawn 1..4.
Definition at line 408 of file network_generator.h.
References generate().
|
inline |
The full form.
num_delays < 0 means "decide for me", which is the reference's null: one delay when there is a single queue, otherwise a coin flip between none and one.
Definition at line 380 of file network_generator.h.
References line::qn::Network< T >::get_struct(), line::InputError::InputError(), and max_generate_attempts().
Referenced by generate(), generate(), generate(), generate(), and run_generate().
|
inlinestatic |
Resampling budget before an unsatisfiable configuration is reported.
Definition at line 369 of file network_generator.h.
Referenced by generate().
|
inline |
Definition at line 286 of file network_generator.h.
|
inline |
Definition at line 343 of file network_generator.h.
|
inline |
Definition at line 331 of file network_generator.h.
|
inline |
Definition at line 335 of file network_generator.h.
|
inline |
Definition at line 304 of file network_generator.h.
|
inline |
Definition at line 295 of file network_generator.h.
|
inline |
high, medium, low, or randomize: the population band of a closed class.
Definition at line 316 of file network_generator.h.
References line::InputError::InputError().
Referenced by run_generate().
|
inline |
Exp, Erlang, HyperExp, or randomize.
Definition at line 307 of file network_generator.h.
References line::InputError::InputError().
Referenced by run_generate().
|
inline |
The name given to the generated model.
nw is the reference's.
Definition at line 285 of file network_generator.h.
Referenced by run_generate().
|
inline |
Classes are partitioned into random chains and switching is confined to a chain, instead of the default "all open classes switch among themselves and all closed classes among themselves".
Definition at line 342 of file network_generator.h.
Referenced by run_generate().
|
inline |
Queues get 1..40 servers instead of exactly one.
Definition at line 330 of file network_generator.h.
Referenced by run_generate().
|
inline |
Each link gets a ClassSwitch node inserted on a coin flip.
Definition at line 334 of file network_generator.h.
Referenced by run_generate().
|
inline |
Probabilities, Random, or randomize.
Definition at line 298 of file network_generator.h.
References line::InputError::InputError().
Referenced by run_generate().
|
inline |
fcfs, ps, inf, lcfs, lcfspr, siro, sjf, ljf, sept, lept, or randomize.
Definition at line 289 of file network_generator.h.
References line::InputError::InputError().
Referenced by run_generate().
|
inline |
Reseed the single stream every draw comes from.
Definition at line 282 of file network_generator.h.
Referenced by run_generate().
|
inline |
Pick one of the two shipped topology generators.
Definition at line 346 of file network_generator.h.
References line::gen::Cyclic, line::gen::cyclic_graph(), and line::gen::rand_graph().
Referenced by run_generate().
|
inline |
A custom topology: any function from a vertex count (and the generator's own stream, so a custom topology stays reproducible too) to a square 0/1 adjacency matrix.
Validated on a two-vertex call, as the reference does.
Definition at line 358 of file network_generator.h.
References line::Matrix< T >::cols(), line::InputError::InputError(), and line::Matrix< T >::rows().
|
inline |
Service means spread over 2^-6 .
. 2^6 instead of all being 1.
Definition at line 326 of file network_generator.h.
Referenced by run_generate().
|
inline |
Definition at line 327 of file network_generator.h.