![]() |
LINE Solver (C++)
Templated C++ port of the LINE queueing solver
|
Port of fluid_moment_terms.m: the event representation of the fluid population process, plus the drift, rate and Jacobian handles the covariance equation needs. More...
#include <line/solvers/fluid/fluid_moments.h>
Public Attributes | |
| FluidOdeSystem | sys |
| Matrix< double > | D |
| (nstate x nevents) | |
| std::size_t | nstate = 0 |
| std::vector< bool > | ev_is_departure |
| the leading n_departures events | |
| std::vector< std::size_t > | ev_station |
| std::vector< std::size_t > | ev_class |
| 0-based, from the event's coordinate | |
| Matrix< double > | emap |
| emap(e, o): expected firings of the ORIGINAL event o per firing of the reduced event e; the identity when no immediate coordinate was eliminated. | |
| Matrix< double > | absorb |
| Projector taking an initial condition onto the surviving coordinates. | |
| std::vector< std::vector< std::size_t > > | station_block |
| std::vector< std::vector< std::vector< std::size_t > > > | class_block |
| std::vector< std::size_t > | cov_idx |
| coordinates carrying a real population | |
| std::vector< double > | S |
| servers, INF substituted, lld peak folded | |
| std::vector< bool > | is_ext |
| std::vector< bool > | min_exact |
| stations whose occupancy cannot reach their server count, where min(n,c) is the identity and the closure must stay first order | |
Port of fluid_moment_terms.m: the event representation of the fluid population process, plus the drift, rate and Jacobian handles the covariance equation needs.
The state layout, the events and the rate factors are already fluid_ode_system's; what this adds is the dense jump matrix, the event classification the throughput is read from, the per-station and per-class index blocks, and the projection that makes an OPEN model solvable.
OPEN AND MIXED MODELS: THE COVARIANCE LIVES ON THE QUEUE COORDINATES ONLY. The closing representation models a Source as an EXT pseudo-station holding unit mass, so its coordinate is a normalisation constant and not a job count; building D diag(r) D' over it would invent noise for a direction that carries no population. Projecting those coordinates away leaves exactly the right open event set, because the closing form already emits the correct events: with a single-phase source the EXT rate factor is 1 - sum(of nothing) = 1 identically, so an arrival is a CONSTANT-rate event whose jump, once the source row is dropped, is a lone +1 into the destination queue – the canonical exogenous Poisson arrival with diffusion intensity lambda – and the return leg LINE routes Sink -> Source becomes a lone -1. The EXT row of the Jacobian is identically zero for a single-phase source, so A restricted to the kept coordinates IS the Jacobian of the projected drift.
A MULTI-PHASE SOURCE IS REFUSED: those coordinates track the phase of ONE arrival process, a single Markov chain rather than a population, so their fluctuations are O(1) and no linear noise approximation applies to them at any scale.
Definition at line 249 of file fluid_moments.h.
| Matrix<double> line::fluid::FluidMomentTerms::absorb |
Projector taking an initial condition onto the surviving coordinates.
Definition at line 263 of file fluid_moments.h.
Referenced by line::fluid::fluid_coord_eliminated(), and line::fluid::fluid_moment_terms().
| std::vector<std::vector<std::vector<std::size_t> > > line::fluid::FluidMomentTerms::class_block |
Definition at line 265 of file fluid_moments.h.
Referenced by line::fluid::fluid_dae_conservation(), line::fluid::fluid_dae_constraints(), line::fluid::fluid_dae_metrics(), line::fluid::fluid_dae_staging(), line::fluid::fluid_drift_jacobian(), line::fluid::fluid_moment_terms(), line::fluid::solver_fluid_dae(), line::fluid::solver_fluid_dae_transient(), and line::fluid::solver_fluid_moments().
| std::vector<std::size_t> line::fluid::FluidMomentTerms::cov_idx |
coordinates carrying a real population
Definition at line 266 of file fluid_moments.h.
Referenced by line::fluid::fluid_dae_clamp_tangent(), line::fluid::fluid_dae_integrate(), line::fluid::fluid_dae_integrate_hybrid(), line::fluid::fluid_moment_lyapunov(), line::fluid::fluid_moment_terms(), and line::fluid::solver_fluid_dae_transient().
| Matrix<double> line::fluid::FluidMomentTerms::D |
(nstate x nevents)
Definition at line 251 of file fluid_moments.h.
Referenced by line::fluid::fluid_dae_extend(), line::fluid::fluid_dae_gates(), line::fluid::fluid_dae_integrate_hybrid(), line::fluid::fluid_dae_residual(), line::fluid::fluid_dae_staging(), line::fluid::fluid_moment_lyapunov(), line::fluid::fluid_moment_terms(), line::fluid::fluid_refine_meanfield(), and line::fluid::solver_fluid_dae().
| Matrix<double> line::fluid::FluidMomentTerms::emap |
emap(e, o): expected firings of the ORIGINAL event o per firing of the reduced event e; the identity when no immediate coordinate was eliminated.
The classification above is indexed by ORIGINAL event, so a throughput is read as r' * (emap * indicator_over_original_events).
Definition at line 261 of file fluid_moments.h.
Referenced by line::fluid::fluid_moment_terms(), and line::fluid::solver_fluid_moments().
| std::vector<std::size_t> line::fluid::FluidMomentTerms::ev_class |
0-based, from the event's coordinate
Definition at line 254 of file fluid_moments.h.
Referenced by line::fluid::fluid_dae_metrics(), line::fluid::fluid_moment_terms(), and line::fluid::solver_fluid_moments().
| std::vector<bool> line::fluid::FluidMomentTerms::ev_is_departure |
the leading n_departures events
Definition at line 253 of file fluid_moments.h.
Referenced by line::fluid::fluid_dae_metrics(), line::fluid::fluid_moment_terms(), and line::fluid::solver_fluid_moments().
| std::vector<std::size_t> line::fluid::FluidMomentTerms::ev_station |
Definition at line 254 of file fluid_moments.h.
Referenced by line::fluid::fluid_dae_metrics(), line::fluid::fluid_moment_terms(), and line::fluid::solver_fluid_moments().
| std::vector<bool> line::fluid::FluidMomentTerms::is_ext |
Definition at line 268 of file fluid_moments.h.
Referenced by line::fluid::fluid_dae_closable(), line::fluid::fluid_dae_conservation(), line::fluid::fluid_dae_constraints(), line::fluid::fluid_dae_gates(), line::fluid::fluid_moment_terms(), and line::fluid::solver_fluid_dae().
| std::vector<bool> line::fluid::FluidMomentTerms::min_exact |
stations whose occupancy cannot reach their server count, where min(n,c) is the identity and the closure must stay first order
Definition at line 271 of file fluid_moments.h.
Referenced by line::fluid::fluid_dae_closable(), line::fluid::fluid_moment_terms(), and line::fluid::solver_fluid_moments().
| std::size_t line::fluid::FluidMomentTerms::nstate = 0 |
Definition at line 252 of file fluid_moments.h.
Referenced by line::fluid::fluid_dae_conservation(), line::fluid::fluid_dae_constraints(), line::fluid::fluid_dae_extend(), line::fluid::fluid_dae_gates(), line::fluid::fluid_dae_hold_multipliers(), line::fluid::fluid_dae_integrate(), line::fluid::fluid_dae_integrate_hybrid(), line::fluid::fluid_dae_staging(), line::fluid::fluid_drift_jacobian(), line::fluid::fluid_moment_drift(), line::fluid::fluid_moment_lyapunov(), line::fluid::fluid_moment_terms(), line::fluid::solver_fluid_dae(), line::fluid::solver_fluid_dae_transient(), and line::fluid::solver_fluid_moments().
| std::vector<double> line::fluid::FluidMomentTerms::S |
servers, INF substituted, lld peak folded
Definition at line 267 of file fluid_moments.h.
Referenced by line::fluid::fluid_dae_closable(), line::fluid::fluid_dae_metrics(), line::fluid::fluid_drift_jacobian(), line::fluid::fluid_kink_stations(), line::fluid::fluid_moment_terms(), line::fluid::fluid_nudge_off_kink(), line::fluid::solver_fluid_dae(), and line::fluid::solver_fluid_moments().
| std::vector<std::vector<std::size_t> > line::fluid::FluidMomentTerms::station_block |
Definition at line 264 of file fluid_moments.h.
Referenced by line::fluid::fluid_dae_closable(), line::fluid::fluid_dae_gates(), line::fluid::fluid_dae_metrics(), line::fluid::fluid_dae_residual(), line::fluid::fluid_dae_sigma_from(), line::fluid::fluid_drift_jacobian(), line::fluid::fluid_kink_stations(), line::fluid::fluid_moment_terms(), line::fluid::fluid_nudge_off_kink(), line::fluid::solver_fluid_dae(), line::fluid::solver_fluid_dae_transient(), and line::fluid::solver_fluid_moments().
| FluidOdeSystem line::fluid::FluidMomentTerms::sys |
Definition at line 250 of file fluid_moments.h.
Referenced by line::fluid::fluid_dae_closable(), line::fluid::fluid_dae_metrics(), line::fluid::fluid_drift_jacobian(), line::fluid::fluid_kink_stations(), line::fluid::fluid_moment_drift(), line::fluid::fluid_moment_factors(), line::fluid::fluid_moment_rates(), line::fluid::fluid_moment_terms(), line::fluid::solver_fluid_dae(), and line::fluid::solver_fluid_moments().