LINE Solver (C++)
Templated C++ port of the LINE queueing solver
Loading...
Searching...
No Matches
line::fluid::FluidOptions Struct Reference

Controls, defaulting to SolverOptions('Fluid') in the reference. More...

#include <line/solvers/fluid/solver_fluid.h>

Collaboration diagram for line::fluid::FluidOptions:

Classes

struct  RateSched
 options.config.rate_sched: explicit per-(station, class) rate trajectories, the third source solver_fluid_ratemult composes. More...

Public Attributes

std::string method = "default"
double tol = 1e-4
 absolute and relative tolerance handed to the integrator
double iter_tol = 0.0
 >0 stops early when the moved-mass ratio falls below it; 0 runs to iter_max, as the reference does
bool earlystop = true
 options.config.fluid_earlystop: stop on the geometric tail of the window iteration
std::size_t iter_max = 200
 cap on outer integrations
std::size_t nonmkv_order = 20
 options.config.nonmkvorder: the phase budget sn_nonmarkov_toph spends on a non-Markovian service law.
double timespan_end = std::numeric_limits<double>::infinity()
std::vector< double > init_sol
 initial state; empty selects the default below
std::vector< std::vector< std::size_t > > tbi_cells
 options.config.tbi_cells: an explicit partition for method tbi, as disjoint 0-BASED station index sets covering every station once.
std::size_t tbi_cellsize = 5
std::vector< double > kp_init_sol
 options.config.kp_init_sol: the kp method's initial state, in the KO-PENDER layout – one offset counter walking the stations in order, an arrival-phase block at each EXT station-class and a service-phase block at every other, with no mass returning to the source.
Matrix< double > init_cov
 options.config.init_cov: the kp method's initial covariance Sigma(0), dim-by-dim in the same layout as kp_init_sol.
Matrix< double > init_qlen
 options.config.init_qlen: the kp method's initial state over (station, class) PAIRS, M-by-K, rather than over its own phase layout.
Matrix< double > init_qcov
 options.config.init_qcov: the companion covariance of init_qlen, over the station-class pairs, (M*K)-by-(M*K) and indexed ir = r*M + i.
double softmin_alpha = 20.0
 sharpness of the 'softmin' smoothing
double pstar = 20.0
 exponent of the 'pnorm' smoothing
bool pstar_set = false
 Opt in to the p-norm under matrix/default too, which is what options.config.pstar does in MATLAB, the JAR and native Python.
std::string fork_join = "default"
 options.config.fork_join: which fork-join arm the fixed point takes, 'default'/'mmt'/'fjt' or 'ht'.
double timestep = 0.01
 'diffusion' Euler-Maruyama step
unsigned long seed = 23000
 'diffusion' RNG seed
bool stiff = false
 options.stiff: integrate the closing family with the explicit stiff arm of fluid_stiff.h rather than with LSODA.
bool hide_immediate = true
 options.config.hide_immediate: fold the Immediate-rate transitions into the timed ones by stochastic complementation before integrating.
double aoi_preemption = -1.0
 options.config.aoi_preemption: the preemption (bufferless) or replacement (single buffer) probability of the AoI branch of mfq.
FluidClosure closure
 options.config.moment_sigma2 and options.config.moment_cov: the second moment the drift's non-linear terms are closed with.
std::size_t moment_maxstate = 200
 options.config.moment_maxstate: the largest phase-resolved state the moment-closure methods will build a covariance over.
std::size_t dae_maxstate = 0
 options.config.dae_maxstate and options.config.dae_maxcov: the DAE route's own two refusal thresholds, on the simultaneous solve and on the covariance it integrates alongside the mean.
std::size_t dae_maxcov = 0
std::string highvar = "default"
 options.config.highvar: which non-exponential FCFS correction the analyzer's outer refit loop applies, interp (the WSC 2020 diffusion interpolation) or default/none/hvmva (no rescaling, so the loop converges after one sweep).
FluidRateMult rate_traj
 options.config.rate_traj = {tgrid, Mmat}: a caller-supplied per-EVENT multiplier, which is what the coupled LN layer transient injects.
std::vector< std::pair< std::size_t, std::size_t > > nhpp_sched
 options.config.nhpp_sched: the (station, class) pairs whose SOURCE carries a non-homogeneous intensity, which the drift is to follow exactly rather than at its time average.
std::vector< RateSched > rate_sched

Detailed Description

Controls, defaulting to SolverOptions('Fluid') in the reference.

Definition at line 88 of file solver_fluid.h.

Member Data Documentation

◆ aoi_preemption

double line::fluid::FluidOptions::aoi_preemption = -1.0

options.config.aoi_preemption: the preemption (bufferless) or replacement (single buffer) probability of the AoI branch of mfq.

Negative selects the value the scheduling policy implies.

Definition at line 207 of file solver_fluid.h.

◆ closure

FluidClosure line::fluid::FluidOptions::closure

options.config.moment_sigma2 and options.config.moment_cov: the second moment the drift's non-linear terms are closed with.

A CALLER DOES NOT SET THIS. solver_fluid_moments does, once per sweep of its outer fixed point, and it is on the options because the mean solve is the ORDINARY closing integration – the closure has to reach the drift without a second entry point that could drift from the first.

Definition at line 217 of file solver_fluid.h.

Referenced by line::fluid::solver_fluid_dae(), and line::fluid::solver_fluid_moments().

◆ dae_maxcov

std::size_t line::fluid::FluidOptions::dae_maxcov = 0

Definition at line 238 of file solver_fluid.h.

◆ dae_maxstate

std::size_t line::fluid::FluidOptions::dae_maxstate = 0

options.config.dae_maxstate and options.config.dae_maxcov: the DAE route's own two refusal thresholds, on the simultaneous solve and on the covariance it integrates alongside the mean.

ZERO MEANS NOT SET, and that is what makes them options rather than a second copy of the defaults: the route reads them off FluidDaeOptions, whose own values a caller may pin directly, and fluid_dae_options lets an explicit pin stand wherever the options are silent. A user reaching for the knob writes the option, as in the other three codebases; a test pinning one writes the struct.

Definition at line 237 of file solver_fluid.h.

◆ earlystop

bool line::fluid::FluidOptions::earlystop = true

options.config.fluid_earlystop: stop on the geometric tail of the window iteration

Definition at line 92 of file solver_fluid.h.

◆ fork_join

std::string line::fluid::FluidOptions::fork_join = "default"

options.config.fork_join: which fork-join arm the fixed point takes, 'default'/'mmt'/'fjt' or 'ht'.

Carried here so that a fluid solve of a fork-join model selects the same transform an MVA or NC solve of it would; see the has_fork branch of fluid_runner.h.

Definition at line 179 of file solver_fluid.h.

◆ hide_immediate

bool line::fluid::FluidOptions::hide_immediate = true

options.config.hide_immediate: fold the Immediate-rate transitions into the timed ones by stochastic complementation before integrating.

Off in the reference too, which reaches ode_eliminate_immediate only when the caller asks for it.

Definition at line 201 of file solver_fluid.h.

◆ highvar

std::string line::fluid::FluidOptions::highvar = "default"

options.config.highvar: which non-exponential FCFS correction the analyzer's outer refit loop applies, interp (the WSC 2020 diffusion interpolation) or default/none/hvmva (no rescaling, so the loop converges after one sweep).

THE DEFAULT IS default, i.e. NO rescaling, because that is what SolverOptions.m:127 sets for FLD – NC is the solver that defaults to interp. The refit loop still runs: with no rescaling it refits each FCFS station to a Coxian at its own mean and SCV, which is an identity on a declared Coxian and a two-moment reduction on anything else, and it converges in two sweeps because eta is constant. See fluid_nonexp.h.

Definition at line 252 of file solver_fluid.h.

◆ init_cov

Matrix<double> line::fluid::FluidOptions::init_cov

options.config.init_cov: the kp method's initial covariance Sigma(0), dim-by-dim in the same layout as kp_init_sol.

A caller that carries a DISTRIBUTION across a handoff supplies the second moment beside the mean, so the next stage does not restart from a point mass it never had. Empty keeps the default diag(theta) - theta theta' of the initial arrival phase.

Definition at line 133 of file solver_fluid.h.

◆ init_qcov

Matrix<double> line::fluid::FluidOptions::init_qcov

options.config.init_qcov: the companion covariance of init_qlen, over the station-class pairs, (M*K)-by-(M*K) and indexed ir = r*M + i.

Lifted to the phase layout beside the mean: the diagonal block carries C(ir,ir) pie pie' plus the MULTINOMIAL term m_ir (diag(pie) - pie pie'), which is the variance of splitting a known total over the phases. Dropping that term asserts every job's phase is known once the total is.

READ BY kp AND BY dae. dae takes it WITHOUT init_qlen: its mean already arrives through init_sol and the seed trajectory, so only the second moment is missing, and fluid_dae_lift_qcov takes the block masses and phase split from the stage's own initial state. Above FluidDaeOptions::maxcov, and under a finite-capacity cap, the variance is held and a seed cannot be used, which is REFUSED rather than dropped.

Definition at line 163 of file solver_fluid.h.

◆ init_qlen

Matrix<double> line::fluid::FluidOptions::init_qlen

options.config.init_qlen: the kp method's initial state over (station, class) PAIRS, M-by-K, rather than over its own phase layout.

The layout-free spelling of kp_init_sol, for a caller that has a mean queue length per station and class and does not know how this method numbers phases – SolverENV's meancov coupling is the case it exists for. The lift is the multinomial one: a block's mass is split over its phases by the service entry vector pie. Mutually exclusive with kp_init_sol/init_cov, which are the same initial condition in the other spelling.

Definition at line 146 of file solver_fluid.h.

◆ init_sol

std::vector<double> line::fluid::FluidOptions::init_sol

◆ iter_max

std::size_t line::fluid::FluidOptions::iter_max = 200

cap on outer integrations

Definition at line 93 of file solver_fluid.h.

◆ iter_tol

double line::fluid::FluidOptions::iter_tol = 0.0

>0 stops early when the moved-mass ratio falls below it; 0 runs to iter_max, as the reference does

Definition at line 91 of file solver_fluid.h.

◆ kp_init_sol

std::vector<double> line::fluid::FluidOptions::kp_init_sol

options.config.kp_init_sol: the kp method's initial state, in the KO-PENDER layout – one offset counter walking the stations in order, an arrival-phase block at each EXT station-class and a service-phase block at every other, with no mass returning to the source.

NOT init_sol, which is laid out for the CLOSING state vector: the two can have the same length on the same model, so sharing one field lets a closing-layout seed be consumed here, silently zeroing the source phase mass and with it the whole network. Empty selects the stationary arrival phase; a wrong-sized seed is refused rather than ignored.

Definition at line 123 of file solver_fluid.h.

◆ method

◆ moment_maxstate

std::size_t line::fluid::FluidOptions::moment_maxstate = 200

options.config.moment_maxstate: the largest phase-resolved state the moment-closure methods will build a covariance over.

The Lyapunov solve is cubic in it, so this is a refusal threshold and not a tuning knob; it also decides whether default resolves to minnormal at all.

Definition at line 224 of file solver_fluid.h.

◆ nhpp_sched

std::vector<std::pair<std::size_t, std::size_t> > line::fluid::FluidOptions::nhpp_sched

options.config.nhpp_sched: the (station, class) pairs whose SOURCE carries a non-homogeneous intensity, which the drift is to follow exactly rather than at its time average.

IT IS A LIST AND NOT A FLAG, and that is the reference's design. A model can declare an NHPP and still be solved at the nominal – that is what solver_fluid.m does for a steady-state request – so the schedule enters the drift only when a caller asks for it, which in the reference is @@SolverFLD/getTranAvg through local_detect_nhpp. fluid_detect_nhpp below is that detector; a caller that wants the nominal simply does not call it. 1-based (station, class)

Definition at line 272 of file solver_fluid.h.

Referenced by line::fluid::solver_fluid_transient().

◆ nonmkv_order

std::size_t line::fluid::FluidOptions::nonmkv_order = 20

options.config.nonmkvorder: the phase budget sn_nonmarkov_toph spends on a non-Markovian service law.

The fluid path always takes the PH fit, so this is the Bernstein order.

Definition at line 99 of file solver_fluid.h.

◆ pstar

double line::fluid::FluidOptions::pstar = 20.0

exponent of the 'pnorm' smoothing

Definition at line 165 of file solver_fluid.h.

◆ pstar_set

bool line::fluid::FluidOptions::pstar_set = false

Opt in to the p-norm under matrix/default too, which is what options.config.pstar does in MATLAB, the JAR and native Python.

The exponent above is a default, not a request, so it cannot serve as the flag: leaving it at 20 must keep the hard min() under matrix.

Definition at line 172 of file solver_fluid.h.

◆ rate_sched

std::vector<RateSched> line::fluid::FluidOptions::rate_sched

Definition at line 287 of file solver_fluid.h.

◆ rate_traj

FluidRateMult line::fluid::FluidOptions::rate_traj

options.config.rate_traj = {tgrid, Mmat}: a caller-supplied per-EVENT multiplier, which is what the coupled LN layer transient injects.

Mmat must have one row per event of the closing ODE.

Definition at line 258 of file solver_fluid.h.

◆ seed

unsigned long line::fluid::FluidOptions::seed = 23000

'diffusion' RNG seed

Definition at line 181 of file solver_fluid.h.

◆ softmin_alpha

double line::fluid::FluidOptions::softmin_alpha = 20.0

sharpness of the 'softmin' smoothing

Definition at line 164 of file solver_fluid.h.

◆ stiff

bool line::fluid::FluidOptions::stiff = false

options.stiff: integrate the closing family with the explicit stiff arm of fluid_stiff.h rather than with LSODA.

THE DEFAULT IS FALSE WHERE THE REFERENCE'S IS TRUE, and that is not a downgrade. options.stiff = true selects ode15s, a variable-order BDF code; LSODA is a variable-order Adams/BDF code that switches to BDF on its own stiffness detector, so the reference's default arm is the one already taken here. Setting this selects the four-stage Rosenbrock method, which is the family ode23s belongs to – the reference's OTHER arm – so the flag names the integrator that is actually different.

Definition at line 194 of file solver_fluid.h.

◆ tbi_cells

std::vector<std::vector<std::size_t> > line::fluid::FluidOptions::tbi_cells

options.config.tbi_cells: an explicit partition for method tbi, as disjoint 0-BASED station index sets covering every station once.

Empty leaves the grouping to tbi_partition, which agglomerates on routing coupling towards tbi_cellsize stations per cell (options.config.tbi_cellsize).

Definition at line 109 of file solver_fluid.h.

◆ tbi_cellsize

std::size_t line::fluid::FluidOptions::tbi_cellsize = 5

Definition at line 110 of file solver_fluid.h.

◆ timespan_end

double line::fluid::FluidOptions::timespan_end = std::numeric_limits<double>::infinity()

◆ timestep

double line::fluid::FluidOptions::timestep = 0.01

'diffusion' Euler-Maruyama step

Definition at line 180 of file solver_fluid.h.

◆ tol

double line::fluid::FluidOptions::tol = 1e-4

absolute and relative tolerance handed to the integrator

Definition at line 90 of file solver_fluid.h.

Referenced by line::fluid::solver_fluid_transient().


The documentation for this struct was generated from the following file: