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

Port of @NetworkSolver/mapEnvApprox.m: the solver-agnostic random-environment approximation of a network whose arrival or service processes are non-renewal. More...

#include <cmath>
#include <cstddef>
#include <limits>
#include <string>
#include <type_traits>
#include <vector>
#include "line/api/mam/map_moment.h"
#include "line/io/map2renv.h"
#include "line/lang/qn/network_struct.h"
#include "line/solvers/env/env_dispatch.h"
#include "line/solvers/map_env_gate.h"
#include "line/solvers/mva/solver_mva_runner.h"
#include "line/util/error.h"
Include dependency graph for map_env.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::solvers
namespace  line::solvers::map_env_detail

Functions

template<class T>
const char * line::solvers::map_env_detail::image_kind (const io::Map2RenvInfo< T > &info)
 mapImageKind: an MMPP image preserves the modulating chain exactly; a general MAP image aggregates the event-epoch phase jumps into the phase generator, and the correlation between the jumps and the event stream is lost.
template<class T>
double line::solvers::map_env_detail::max_hold_time (const env::Environment< T > &e)
 Longest mean stage sojourn of the environment, the mean-field horizon's scale.
template<class T>
std::string line::solvers::map_env_detail::select_env_limit (const qn::NetworkStruct< T > &sn, const env::Environment< T > &e)
 selectEnvLimit: the timescale test between the two closed-form limits.
template<class T>
void line::solvers::map_env_detail::assert_stage_correspondence (const qn::NetworkStruct< T > &sn, const env::Environment< T > &e)
 The base-to-stage index correspondence map_env_approx relies on, asserted rather than assumed.
template<class T, class StageFn>
mva::AvgResult< T > line::solvers::map_env_approx (const qn::NetworkStruct< T > &sn, const std::string &solver, const MapEnvConfig &cfg, StageFn stage_fn, const std::string &requested_method="default")
 mapEnvApprox: solve the model through the random-environment image of its non-renewal processes.
template<class T, class Run, class StageFn>
mva::AvgResult< T > line::solvers::run_avg (const qn::NetworkStruct< T > &sn, const std::string &solver, const qn::FeatureSet &declared, const MapEnvConfig &cfg, Run run, StageFn stage_fn, const std::string &requested_method="default")
 The getAvg funnel: run the model, or its environment image when the ONLY thing in the way is a non-renewal process.

Detailed Description

Port of @NetworkSolver/mapEnvApprox.m: the solver-agnostic random-environment approximation of a network whose arrival or service processes are non-renewal.

map2renv turns each modulated process into a set of environment stages in which that process is exponential with the phase-conditional intensity, and SolverENV recombines the stages. The stage models are exponential and carry the base model's structure unchanged, so THE STAGE SOLVER IS THE CALLER ITSELF: nothing here reads a solver internal, and any runner that can answer getAvg on a struct can be driven through it.

WHERE IT SITS. The reference's runAnalyzer still REFUSES a MAP model; only getAvg falls back (@NetworkSolver/getAvg.m lines 150-151). That placement is forced here as well as faithful: env/solver_env.h includes ln/solver_ln.h, which includes the MVA and NC runners, so the gate cannot live where the feature gate lives and has to stand in front of the runners instead. C++ has no getAvg, so the three ladders that play its part – the facade's avg_table, the CLI's run_avg_engine, and the CLI's per-solver -a avg arms – each wrap their runner in run_avg below. All three, or line-cli -a avg and -a cache would accept different models for one command line.

WHAT IS DOUBLE-ONLY, and why the refusal stays. SolverEnvLimit::init and SolverEnv::init both refuse T != double – a fluid stage integrates its drift with LSODA and a mean-field sojourn is a double quadrature – while the MVA and NC runners this wraps are multiprecision. So --arith rational on a MAP model keeps the PLAIN rejection rather than falling back, and says so by name. See _kb/14-cpp-multiprecision.md.

Definition in file map_env.h.