LINE Solver (C++)
Templated C++ port of the LINE queueing solver
Loading...
Searching...
No Matches
network_generators.h File Reference

The static model factories of MATLAB's Network: tandem* and cyclic*. More...

#include <cmath>
#include <limits>
#include <string>
#include <vector>
#include "line/lang/qn/network_builder.h"
#include "line/util/error.h"
#include "line/util/matrix.h"
Include dependency graph for network_generators.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::qn
namespace  line::qn::gen_detail

Functions

template<class T>
Matrix< T > line::qn::gen_detail::stack_rows (const Matrix< T > &Z, const Matrix< T > &D)
 [Z; D]: the rows of Z stacked on top of the rows of D.
std::vector< SchedStrategy > line::qn::gen_detail::inf_then (std::size_t Mz, std::size_t M, SchedStrategy sched)
 Mz INF strategies, then M of sched.
template<class T>
Network< T > line::qn::tandem (const std::vector< T > &lambda, const Matrix< T > &D, const std::vector< SchedStrategy > &strategy)
 Network.tandem(lambda, D, strategy): an open tandem line.
template<class T>
Network< T > line::qn::tandem_ps_inf (const std::vector< T > &lambda, const Matrix< T > &D, const Matrix< T > &Z)
 Network.tandemPsInf(lambda, D, Z): delays for the rows of Z, then PS queues for D.
template<class T>
Network< T > line::qn::tandem_ps (const std::vector< T > &lambda, const Matrix< T > &D)
 Network.tandemPs(lambda, D): PS queues only.
template<class T>
Network< T > line::qn::tandem_fcfs_inf (const std::vector< T > &lambda, const Matrix< T > &D, const Matrix< T > &Z)
 Network.tandemFcfsInf(lambda, D, Z): delays for the rows of Z, then FCFS queues for D.
template<class T>
Network< T > line::qn::tandem_fcfs (const std::vector< T > &lambda, const Matrix< T > &D)
 Network.tandemFcfs(lambda, D): FCFS queues only.
template<class T>
Network< T > line::qn::cyclic (const std::vector< double > &N, const Matrix< T > &D, const std::vector< SchedStrategy > &strategy, const std::vector< double > &S)
 Network.cyclic(N, D, strategy, S): a closed cyclic network.
template<class T>
Network< T > line::qn::cyclic_ps_inf (const std::vector< double > &N, const Matrix< T > &D, const Matrix< T > &Z, std::vector< double > S=std::vector< double >())
 Network.cyclicPsInf(N, D, Z, S): delays for the rows of Z, then PS queues for the rows of D with S servers each (one server each when S is empty).
template<class T>
Network< T > line::qn::cyclic_ps (const std::vector< double > &N, const Matrix< T > &D, const std::vector< double > &S=std::vector< double >())
 Network.cyclicPs(N, D, S): PS queues only.
template<class T>
Network< T > line::qn::cyclic_fcfs_inf (const std::vector< double > &N, const Matrix< T > &D, const Matrix< T > &Z, std::vector< double > S=std::vector< double >())
 Network.cyclicFcfsInf(N, D, Z, S): delays for Z, then FCFS queues for D.
template<class T>
Network< T > line::qn::cyclic_fcfs (const std::vector< double > &N, const Matrix< T > &D, const std::vector< double > &S=std::vector< double >())
 Network.cyclicFcfs(N, D, S): FCFS queues only.

Detailed Description

The static model factories of MATLAB's Network: tandem* and cyclic*.

Ports of MNetwork.m's tandem, tandemPs, tandemPsInf, tandemFcfs, tandemFcfsInf, cyclic, cyclicPs, cyclicPsInf, cyclicFcfs and cyclicFcfsInf. They build the SAME model the reference builds, node names and class names included, so a table keyed by name lines up across codebases:

tandem Source, Station1..StationM, Sink, serial routing; class r is an open class Class<r> arriving at rate lambda[r] (an exponential of mean 1/lambda[r]) and served with mean D(i,r) at station i. An INF station is a Delay, any other a Queue under its strategy. cyclic Delay<k> / Queue<k> numbered within their kind, cyclic routing 1 -> 2 -> ... -> M -> 1; class r is a closed class Class<r> of N[r] jobs referencing the FIRST station, served with mean D(i,r); a Queue gets S[i] servers.

The *Inf variants put the rows of Z FIRST as delays and the rows of D after them, which is the reference's [Z; D]; the delays of a cyclic model carry an infinite server count in the stacked S vector, as [Inf*ones(Mz,1); S].

Definition in file network_generators.h.