![]() |
LINE Solver (C++)
Templated C++ port of the LINE queueing solver
|
The cftp and cftp.approx methods of SolverCTMC: stationary analysis of a closed single-class product-form network by PERFECT SAMPLING rather than state-space enumeration. More...
#include <algorithm>#include <cmath>#include <cstddef>#include <cstdint>#include <map>#include <string>#include <vector>#include "line/api/pfqn/pfqn_cftp.h"#include "line/api/pfqn/pfqn_mc_common.h"#include "line/lang/lang_types.h"#include "line/lang/qn/network_struct.h"#include "line/num/number.h"#include "line/solvers/ctmc/solver_ctmc.h"#include "line/solvers/ctmc/solver_ctmc_analyzer.h"#include "line/solvers/mva/sn_chain.h"#include "line/util/error.h"#include "line/util/matrix.h"Go to the source code of this file.
Classes | |
| struct | line::ctmc::CtmcCftpOptions |
| The knobs of one perfect-sampling run. More... | |
| struct | line::ctmc::CtmcCftpSolution< T > |
| What one cftp solve produces beside the means. More... | |
Namespaces | |
| namespace | line |
| namespace | line::ctmc |
Functions | |
| template<class T> | |
| std::string | line::ctmc::solver_ctmc_cftp_supports (const NetworkStruct< T > &sn) |
| The cftp model-class gate as a public predicate. | |
| template<class T> | |
| CtmcCftpSolution< T > | line::ctmc::solver_ctmc_cftp (const NetworkStruct< T > &sn, const CtmcOptions &opt, const CtmcCftpOptions &cftpopt) |
| Solve with the cftp / cftp.approx method. | |
| template<class T> | |
| mva::AvgResult< T > | line::ctmc::solver_ctmc_cftp_run_analyzer (const NetworkStruct< T > &sn, const CtmcOptions &opt, const CtmcCftpOptions &cftpopt) |
| Solve with cftp and format, for a caller with no use for the sampled states. | |
The cftp and cftp.approx methods of SolverCTMC: stationary analysis of a closed single-class product-form network by PERFECT SAMPLING rather than state-space enumeration.
Port of matlab/src/solvers/CTMC/solver_ctmc_cftp.m. Reference: S. Kijima and T. Matsui, "Approximate/Perfect Samplers for Closed Jackson Networks", Winter Simulation Conference 2005; the sampler itself is pfqn::pfqn_cftp.
WHAT KIND OF NUMBER THIS IS. States are drawn iid from the EXACT stationary distribution, so there is no truncation and no cutoff, but the means are sample averages and carry Monte Carlo error O(samples^(-1/2)). Diffing a cftp row against an exact solver at solver tolerance therefore reads as a defect and is not one – it is the same contract as the SSA row. cftp.approx additionally drops exactness of the DRAW, running the paper's rapidly-mixing sampler M_A for a deterministic number of updates instead of coupling from the past; its running time is bounded where perfect sampling's is not.
WHY THE MODEL CLASS IS GATED SO NARROWLY. The sampler's balance function encodes the closed single-class product form and nothing else, so a model outside that class is REFUSED rather than approximated: the sampler would return states of a different network and the estimator would converge, with shrinking error bars, to the wrong answer.
THE TWO ESTIMATORS ARE NOT INTERCHANGEABLE, and the split is deliberate. Throughput is taken at the REFERENCE station and propagated through the visit ratios, which matches the CTMC convention (XN is the arrival rate at the reference station) and keeps flow balance, Little's law and C = N/X exact in the reported table. Utilization instead keeps its own estimator E[min(n_i,c_i)]/c_i, which is unbiased and confined to [0,1] by construction, whereas deriving it from the reference-station throughput lets Monte Carlo error push a saturated station above one.
Definition in file solver_ctmc_cftp.h.