![]() |
LINE Solver (C++)
Templated C++ port of the LINE queueing solver
|
Fork-join TAG AUGMENTATION: the fold-back half of the transform/lift pair that CTMC and SSA share. More...
#include <cstddef>#include <type_traits>#include <vector>#include "line/lang/qn/network_struct.h"#include "line/num/number.h"#include "line/solvers/mva/solver_mva_runner.h"#include "line/util/matrix.h"Go to the source code of this file.
Namespaces | |
| namespace | line |
| namespace | line::tr |
Functions | |
| template<class T> | |
| bool | line::tr::has_fork_join (const qn::NetworkStruct< T > &sn) |
| Whether the model needs the tag augmentation at all. | |
| template<class T, class Avg> | |
| void | line::tr::fj_foldback (const qn::NetworkStruct< T > &sn, Avg &a, const std::vector< std::size_t > &fjclassmap, std::size_t korig) |
| Reduce the augmented metrics onto the original classes. | |
Fork-join TAG AUGMENTATION: the fold-back half of the transform/lift pair that CTMC and SSA share.
qn::fj_tag is the OTHER fork-join route. Where mmt and ht drive an outer fixed point for MVA, NC and Fluid (solvers/mva/fj_driver.h), the tag augmentation is EXACT and single pass: it rewrites the struct so each sibling branch carries its own auxiliary class, the engine runs unchanged on that struct, and the auxiliary columns are folded back at the end.
This is deliberately NOT built on the fj_driver.h shape. That driver owns a loop and takes the inner solve as a template parameter because MMT re-solves a transformed model repeatedly. fj_tag substitutes the struct and then the caller's own engine runs on it to completion: there is no callback seam and no second pass, so the reusable unit is the fold-back, not a driver.
THE ONE C++-SPECIFIC POINT. CTMC and SSA carry DIFFERENT result containers (ctmc::CtmcAvg<T> over Matrix<T>, ssa::SsaSolution over Matrix<double>), which is why this is templated on the container rather than taking one. It is the same obstacle python meets, where SolverMVA keeps a dict and SolverNC a dataclass.
Mirrors MATLAB matlab/src/solvers/TR/solver_tr_fjtag_analyzer.m, python line_solver/solvers/fjtag_transform.py and the JAR jline.solvers.tr.FJTagTransform.
Definition in file fj_tag_transform.h.