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

Solver-agnostic driver of a model TRANSFORMATION, the sibling of solvers/mva/fj_driver.h. More...

#include <string>
#include <algorithm>
#include <cmath>
#include <vector>
#include "line/api/pfqn/pfqn_bk.h"
#include "line/api/sn/sn_aggregate_chains.h"
#include "line/api/sn/sn_remove_class.h"
#include "line/lang/dist_scale_rate.h"
#include "line/lang/qn/network_struct.h"
#include "line/solvers/mva/sn_chain.h"
#include "line/solvers/mva/solver_mva_runner.h"
Include dependency graph for transform_solve.h:

Go to the source code of this file.

Namespaces

namespace  line
namespace  line::tr

Functions

template<class T, class InnerSolve>
mva::AvgResult< T > line::tr::transform_solve_chains (const qn::NetworkStruct< T > &sn, InnerSolve inner_solve, const std::string &method)
 Chain aggregation: collapse every chain onto a single class, solve, and map the chain metrics back onto the classes.
template<class T, class InnerSolve>
mva::AvgResult< T > line::tr::transform_solve_lc (const qn::NetworkStruct< T > &sn, InnerSolve inner_solve, const std::string &method, std::size_t iter_max=1000)
 LOAD CONCEALMENT (Birman-Kogan Algorithm 2) as a transformation, and the first ITERATED one.

Detailed Description

Solver-agnostic driver of a model TRANSFORMATION, the sibling of solvers/mva/fj_driver.h.

A transformation rewrites the model into one or more subproblems, solves those with a REAL solver, and maps the metrics back onto the original classes and stations:

expand -> solve -> lift

THE INNER SOLVER IS THE OUTER SOLVER. The caller supplies inner_solve as a template parameter, exactly as fj_driver.h takes its InnerSolve, so a transformation written once serves every engine rather than the one it was first written for. solver_ctmc_chain_aggregation used to call solver_ctmc_run_analyzer directly, which is what kept a transform with nothing CTMC-specific in it out of reach of MVA, NC and Fluid.

WHAT "ANY SOLVER" MEANS HERE, AND WHAT IT DOES NOT. The inner solve is a TEMPLATED ANALYZER, not the solvers/solver.h facade, which is a double-only interface whose only accessor is avg_table(). That reaches MVA, NC, CTMC and Fluid; it does NOT reach JMT or LDES, which are subprocess wrappers behind that facade.

NO METHOD NAME TABLE HERE, deliberately. MATLAB, the JAR and python resolve options.config.transform through a method name table because their options carry a string-keyed config map. C++ selects the transform at the call site from a typed option (CtmcOptions::chain_aggregation), so a runtime method name table would add a failure mode without adding reach.

Mirrors MATLAB @NetworkSolver/transformSolve.m with solver_tr_chains_analyzer.m, the JAR jline.solvers.tr.TransformSolve with ChainsStrategy, and python line_solver/solvers/transform_driver.py.

Definition in file transform_solve.h.