5#ifndef LINE_SOLVERS_SOLVER_H
6#define LINE_SOLVERS_SOLVER_H
104#define LINE_DECLARE_SOLVER(Cls, tag) \
105 class Cls : public NetworkSolver { \
107 explicit Cls(Network& m, const SolverOptions& o = SolverOptions()) \
108 : NetworkSolver(m, tag, o) {} \
109 Cls(Network& m, const std::string& method) \
110 : NetworkSolver(m, tag, SolverOptions().set_method(method)) {} \
121#undef LINE_DECLARE_SOLVER
136 double prob_aggr(std::size_t node,
const std::vector<double>& state);
138 std::vector<double>
marg_aggr(std::size_t node);
140 std::vector<std::vector<CdfCurve> >
cdf_respt();
157 std::vector<std::vector<CdfCurve> >
cdf_respt();
The result tables a solver returns.
const AvgTable & avg_sys_table()
getAvgSysTable(): the per-class system columns of the same solve.
const SolverOptions & options() const
The options this solver was built with.
const std::string & get_name() const
getName(): the solver's own name, e.g.
std::string method_used()
getMethodUsed(): the method the solve actually resolved to.
const AvgTable & run_analyzer()
runAnalyzer(): force the solve, returning the table it produced.
std::vector< std::string > list_valid_methods() const
listValidMethods(): the methods this solver advertises on this model.
const AvgTable & avg_table()
getAvgTable(): the average table, solving on first demand.
bool is_solved() const
isSolved() / hasResults(): whether a solve has been performed.
Network & model() const
The model this solver was built on.
void reset()
reset(): discard the cached solve.
NetworkSolver(Network &m, const std::string &name, const SolverOptions &o)
SolverBA: the bounding solver, whose result is a bounds table.
BoundsTable bounds_table()
getBoundsTable(): the per-class queue-length and throughput bounds.
SolverBA(Network &m, const std::string &method)
SolverBA(Network &m, const SolverOptions &o=SolverOptions())
SolverCTMC: the average table plus the chain it was computed from.
static void print_inf_gen(const Matrix< double > &Q, const Matrix< double > &space)
CTMC.printInfGen(Q, SS): the generator beside the state it belongs to.
Matrix< double > generator()
getGenerator(): the infinitesimal generator over that space.
double prob_aggr(std::size_t node, const std::vector< double > &state)
getProbAggr(node, state): the aggregate marginal of one state.
Matrix< double > state_space()
getStateSpace(): the aggregate state space, one row per state.
SolverCTMC(Network &m, const SolverOptions &o=SolverOptions())
std::vector< double > marg_aggr(std::size_t node)
getProbStateAggr(node): the marginal over every state of one station.
std::vector< std::vector< CdfCurve > > cdf_respt()
getCdfRespT(): the response-time CDF per (station, class).
SolverCTMC(Network &m, const std::string &method)
SolverFLD: the fluid solver, which also answers a transient.
SolverFLD(Network &m, const std::string &method)
std::vector< std::vector< CdfCurve > > cdf_respt()
getCdfRespT(): the response-time CDF per (station, class).
TranAvg tran_avg()
getTranAvg(): the transient mean queue length per station.
SolverFLD(Network &m, const SolverOptions &o=SolverOptions())
A queueing network under construction.
The routing matrix a model script fills in, MATLAB's P cell array.
Dense matrix and non-owning view.
qn::RoutingMatrix< double > RoutingMatrix
model.init_routing_matrix()'s type, Python's RoutingMatrix.
qn::Network< double > Network
Network as a user names it: the double model, Python's Network.
LINE_DECLARE_SOLVER(SolverMVA, "MVA")
The Network constructor API: Queue, Delay, Source, Sink, Router, ClassSwitch, Cache,...
The keyword arguments a solver takes, as one struct.
getAvgTable, one row per (station, class) that carries a metric.
SolverBA(model, method).getBoundsTable().
The knobs a solver reads; a negative or empty field keeps the engine default.
getTranAvg: the transient mean queue length per (station, class).