![]() |
LINE Solver (C++)
Templated C++ port of the LINE queueing solver
|
Namespaces | |
| namespace | smp_infer_detail |
Classes | |
| struct | ConditionEvent |
| struct | EkfOptions |
| MATLAB's OPTIONS struct, with the same defaults infer_lqn_optget supplies. More... | |
| struct | EkfResult |
| MATLAB's [ahat, info] return list. More... | |
| struct | EstimatorOptions |
| struct | GibbsOptions |
| MATLAB's hard-coded budgets, exposed with their MATLAB values as defaults. More... | |
| struct | GibbsSlice |
| The deterministic content of one coordinate update. More... | |
| struct | GibbsStateProbs |
| The empirical state distribution built from the traces. More... | |
| struct | GibbsTrace |
| One class's trace. More... | |
| struct | InferLqnOptions |
| MATLAB's OPTIONS struct for infer_lqn, with the same defaults the infer_lqn_optget calls supply. More... | |
| struct | InferLqnResult |
| MATLAB's INFO struct: the EKF result plus what the driver constructed. More... | |
| struct | JacobianResult |
| Mirrors the [H, h0] return list of the MATLAB function. More... | |
| struct | LqnMetrics |
| Per-element metric vectors, each aligned with the element name list. More... | |
| struct | LqnObsSpec |
| One row of MATLAB's OBSSPEC struct array. More... | |
| struct | LqnParamSpec |
| One row of MATLAB's PARAMSPEC struct array. More... | |
| struct | NhppKsResult |
| Outcome of the KS test. More... | |
| class | ParamEstimator |
| class | SampledMetric |
| struct | SmpArc |
| One fitted transition. More... | |
| struct | SmpEnvOptions |
| Options of infer_smp_env. More... | |
| struct | SmpFit |
| What infer_smp returns. More... | |
| struct | SmpHazard |
| Both hazard functions of one transition, rows aligned with the instants asked for. More... | |
| struct | SmpNelsonAalen |
| One Nelson-Aalen estimate, on the distinct event times of its transition. More... | |
| struct | SmpOptions |
| Options of infer_smp, the reference's name/value pairs. More... | |
| struct | VariationalOptions |
| Options of infer_variational; a negative box means "derive a default". More... | |
| struct | VariationalResult |
| Outcome of infer_variational. More... | |
| struct | VariationalSpec |
| Inference problem handed to infer_variational. More... | |
Enumerations | |
| enum class | LqnMetric { QLen , Util , RespT , Tput } |
| The four per-element metrics of a solved LQN, as in getEnsembleAvg. More... | |
| enum class | LqnParamType { HOSTDEM , THINK } |
| The two parameter kinds MATLAB's paramSpec(i).type names. More... | |
| enum class | NhppKsMethod { Cu , Lewis } |
| Which test to run on the conditional-uniform data. More... | |
| enum class | VariationalSched { INF = 0 , SHARED = 1 , EXTERNAL = 2 } |
| Service discipline of a station, as seen by the load factor Upsilon. More... | |
| enum class | SampledFormat { TIMESERIES , TRACE } |
Functions | |
| template<class T> | |
| Matrix< T > | infer_compute_ql_at_arrival (const std::vector< T > &at, const std::vector< long > &at_jobid, const std::vector< T > &rt, const std::vector< long > &rt_jobid, const std::vector< std::size_t > &cls, std::size_t R) |
| Per-class queue lengths seen by each arriving job, reconstructed from arrival and response time samples. | |
| template<class T> | |
| std::vector< Matrix< T > > | infer_get_qlen_arrival (const std::vector< std::vector< T > > &at_ms, const std::vector< std::vector< T > > &rt) |
| Per-class queue lengths at arrival for the per-class sample format. | |
| template<class T> | |
| GibbsStateProbs< T > | gibbs_analyse_data (const std::vector< GibbsTrace< T > > &data, std::size_t data_needed) |
| Empirical state distribution of the replayed traces (MATLAB's analyseData). | |
| template<class T> | |
| GibbsSlice< T > | gibbs_slice (const std::vector< T > &think_time, const std::vector< T > &theta, const Matrix< long > &testset, std::size_t index, const std::vector< T > &N, const T &logG_init, double interval, const T &range_size) |
| The deterministic half of one coordinate update: the log normalizing constant along the grid and the normalized slice it implies. | |
| template<class T> | |
| std::vector< T > | infer_gibbs (const std::vector< GibbsTrace< T > > &data, const T &nbCores, const GibbsOptions &opts, pfqn::McRng &rng) |
| Estimated per-class mean demands. | |
| template<class T> | |
| std::vector< T > | infer_gibbs (const std::vector< GibbsTrace< T > > &data, const T &nbCores, double tol, pfqn::McRng &rng) |
| MATLAB's three-argument form, with its hard-coded budgets. | |
| template<class T> | |
| InferLqnResult< T > | infer_lqn (lqn::LqnStruct< T > &lsn, const std::vector< LqnParamSpec > &spec, const std::vector< LqnObsSpec > &obs, const Matrix< T > &Z, const std::function< LqnMetrics< T >(const lqn::LqnStruct< T > &)> &solve, const InferLqnOptions< T > &opt=InferLqnOptions< T >()) |
| Identify hidden LQN parameters from measured performance data. | |
| template<class T> | |
| EkfResult< T > | infer_lqn_ekf (const std::function< std::vector< T >(const std::vector< T > &)> &hfun, const std::vector< T > &a0, const Matrix< T > &P0, const Matrix< T > &Z, const Matrix< T > &Q, const Matrix< T > &R, const EkfOptions< T > &opts=EkfOptions< T >()) |
| Extended Kalman Filter for LQN parameter identification. | |
| std::size_t | infer_lqn_findbyname (const std::vector< std::string > &names, const std::string &name) |
| First element of a named LQN container matching a name. | |
| template<class T> | |
| std::vector< T > | infer_lqn_getobs (const std::vector< std::string > &names, const LqnMetrics< T > &metrics, const std::vector< LqnObsSpec > &spec) |
| Observation vector of a solved LQN, z = h(a). | |
| template<class T> | |
| JacobianResult< T > | infer_lqn_jacobian (const std::function< std::vector< T >(const std::vector< T > &)> &hfun, const std::vector< T > &a, double fd_step=1e-3, double fd_floor=1e-6) |
| Forward finite-difference sensitivity matrix of an observation map. | |
| template<class T> | |
| std::vector< T > | infer_lqn_getparams (const lqn::LqnStruct< T > &lsn, const std::vector< LqnParamSpec > &spec) |
| Read the current values of the parameters named in spec. | |
| template<class T> | |
| void | infer_lqn_setparams (lqn::LqnStruct< T > &lsn, const std::vector< LqnParamSpec > &spec, const std::vector< T > &a) |
| Set the parameters named in spec to the values in a, in place. | |
| template<class Tv> | |
| NhppKsResult< Tv > | infer_nhpp_ks (const std::vector< Tv > ×, const Tv &T, const std::function< Tv(const Tv &)> &cumRate=std::function< Tv(const Tv &)>(), NhppKsMethod method=NhppKsMethod::Lewis, const Tv &T0=num_traits< Tv >::from_int(0)) |
| Kolmogorov-Smirnov tests for a non-homogeneous Poisson arrival process. | |
| template<class T> | |
| Matrix< T > | infer_qmle (const Matrix< T > &Q, const std::vector< T > &N, const std::vector< T > &Z) |
| Queue-length-based maximum-likelihood estimator of the service demands of a closed queueing network. | |
| template<class T> | |
| qn::Network< T > | infer_quick_model (bool is_open, const std::vector< lang::SchedStrategy > &stations, const Matrix< T > &demands, const std::vector< double > &servers=std::vector< double >(), const std::vector< double > &jobs=std::vector< double >(), const std::vector< Matrix< T > > &routing=std::vector< Matrix< T > >()) |
| Build a simple open or closed queueing network. | |
| template<class T> | |
| std::vector< T > | infer_rps (const std::vector< T > &rt, const std::vector< std::size_t > &cls, const Matrix< T > &ql, long V) |
| Regression for Processor Sharing (RPS) demand estimator. | |
| std::string | smp_family_name (const std::string &f) |
| Lower-case copy of a family name. | |
| std::size_t | infer_smp_family_npar (const std::string &family) |
| infer_smp_family(F, 'npar'): the number of parameters, validating the name. | |
| void | infer_smp_family_logfs (const std::string &family, const std::vector< double > &th, const std::vector< double > &t, const std::vector< double > &eta, std::vector< double > &logf, std::vector< double > &logS) |
| infer_smp_family(F, 'logfs', THETA, T, ETA): log density and log survival at t under the proportional-hazards factor exp(eta): H = H0 exp(eta), log h = log h0 + eta, log f = log h - H. | |
| std::vector< double > | infer_smp_family_natural (const std::string &family, const std::vector< double > &th) |
| infer_smp_family(F, 'natural', THETA): rate | shape, scale | mu, sigma. | |
| std::vector< double > | infer_smp_family_theta0 (const std::string &family, const std::vector< double > &tev, double texp) |
| infer_smp_family(F, 'theta0', TEV, TEXP): the starting point from the event times tev and the total exposure texp. | |
| lang::Distrib< double > | infer_smp_family_dist (const std::string &family, const std::vector< double > &th, double eta) |
| infer_smp_family(F, 'dist', THETA, ETA): the LINE distribution of the law with hazard h0(t) exp(eta). | |
| SmpFit | infer_smp (const std::vector< std::size_t > &from, const std::vector< std::size_t > &to, const std::vector< double > &dur, const SmpOptions &opt=SmpOptions()) |
| infer_smp(from, to, dur, ...): the fit, under opt.approach. | |
| env::Environment< double > | infer_smp_env (const SmpFit &fit, const std::vector< qn::NetworkStruct< double > > &models, const SmpEnvOptions &opt=SmpEnvOptions()) |
| infer_smp_env(fit, models, ...): the Environment of a fit, models[e] the network of stage e. | |
| std::vector< SmpHazard > | infer_smp_hazard (const SmpFit &fit, const std::vector< double > &t, const std::vector< double > &zin=std::vector< double >()) |
| infer_smp_hazard(fit, t, 'z', z): both hazard functions of every arc of a fit on the ascending instants t > 0 (Asanjarani et al., Eqs. | |
| std::vector< SmpNelsonAalen > | infer_smp_nelson_aalen (const std::vector< std::size_t > &from, const std::vector< std::size_t > &to, const std::vector< double > &dur, std::size_t nstates=0) |
| infer_smp_nelson_aalen(from, to, dur, 'nstates', E): the Nelson-Aalen estimate of the cumulative transition intensity of every observed transition, on the clock reset at each jump. | |
| template<class T> | |
| VariationalResult< T > | infer_variational (VariationalSpec< T > spec, VariationalOptions< T > opt=VariationalOptions< T >()) |
| Run the variational inference procedure. | |
Variables | |
| static const std::size_t | GIBBS_NNODES = 2 |
| The two nodes of the model the estimator assumes: delay, then queue. | |
| static const std::size_t | INFER_LQN_NOT_FOUND = static_cast<std::size_t>(-1) |
| Returned when no element carries the requested name, MATLAB's []. | |
|
strong |
The four per-element metrics of a solved LQN, as in getEnsembleAvg.
| Enumerator | |
|---|---|
| QLen | |
| Util | |
| RespT | |
| Tput | |
Definition at line 47 of file infer_lqn_getobs.h.
|
strong |
The two parameter kinds MATLAB's paramSpec(i).type names.
| Enumerator | |
|---|---|
| HOSTDEM | |
| THINK | |
Definition at line 55 of file infer_lqn_setparams.h.
|
strong |
Which test to run on the conditional-uniform data.
| Enumerator | |
|---|---|
| Cu | |
| Lewis | |
Definition at line 52 of file infer_nhpp_ks.h.
|
strong |
| Enumerator | |
|---|---|
| TIMESERIES | |
| TRACE | |
Definition at line 27 of file sampled_metric.h.
|
strong |
Service discipline of a station, as seen by the load factor Upsilon.
| Enumerator | |
|---|---|
| INF | |
| SHARED | |
| EXTERNAL | |
Definition at line 63 of file infer_variational.h.
| GibbsStateProbs< T > line::infer::gibbs_analyse_data | ( | const std::vector< GibbsTrace< T > > & | data, |
| std::size_t | data_needed ) |
Empirical state distribution of the replayed traces (MATLAB's analyseData).
Each class contributes one event per sample at the arrival time and one at the arrival plus the response time, so the record is a birth-death walk of the population vector between the delay node and the queue. The population of each class is taken as the largest count the walk ever reaches, which is what makes the delay-node counts non-negative once it is added back.
The state is integer by construction, so it is carried as long and only the holding times are in T: the aggregation over repeated states is then exact in every arithmetic instead of accumulating a rounding per event.
| data | per-class traces |
| data_needed | events kept from the END of the record, 0 for all |
Definition at line 162 of file infer_gibbs.h.
References gibbs_analyse_data(), GIBBS_NNODES, line::InputError::InputError(), line::infer::GibbsStateProbs< T >::N, line::infer::GibbsStateProbs< T >::N0, line::NumericError::NumericError(), line::infer::GibbsStateProbs< T >::prob, and line::infer::GibbsStateProbs< T >::states.
Referenced by gibbs_analyse_data(), and infer_gibbs().
| GibbsSlice< T > line::infer::gibbs_slice | ( | const std::vector< T > & | think_time, |
| const std::vector< T > & | theta, | ||
| const Matrix< long > & | testset, | ||
| std::size_t | index, | ||
| const std::vector< T > & | N, | ||
| const T & | logG_init, | ||
| double | interval, | ||
| const T & | range_size ) |
The deterministic half of one coordinate update: the log normalizing constant along the grid and the normalized slice it implies.
| think_time | (K) think times of the delay node |
| theta | (K) current demands; theta[index] must lie ON the grid |
| testset | (nt x K*GIBBS_NNODES) sampled states |
| index | coordinate being updated |
| N | (K) populations |
| logG_init | running log G at the current theta |
| interval | grid step |
| range_size | upper end of the grid |
Definition at line 284 of file infer_gibbs.h.
References line::Matrix< T >::cols(), GIBBS_NNODES, gibbs_slice(), line::infer::GibbsSlice< T >::grid, line::InputError::InputError(), line::infer::GibbsSlice< T >::logG, line::NumericError::NumericError(), line::pfqn::pfqn_bs(), line::infer::GibbsSlice< T >::prob, line::pfqn::AmvaResult< T >::QN, line::infer::GibbsSlice< T >::range_size_dim, and line::Matrix< T >::rows().
Referenced by gibbs_slice(), and infer_gibbs().
| Matrix< T > line::infer::infer_compute_ql_at_arrival | ( | const std::vector< T > & | at, |
| const std::vector< long > & | at_jobid, | ||
| const std::vector< T > & | rt, | ||
| const std::vector< long > & | rt_jobid, | ||
| const std::vector< std::size_t > & | cls, | ||
| std::size_t | R ) |
Per-class queue lengths seen by each arriving job, reconstructed from arrival and response time samples.
| at | (n) arrival times |
| at_jobid | (n) job id of each arrival |
| rt | (m) response times, m >= n |
| rt_jobid | (m) job id of each response time |
| cls | (n) class of each arrival, 0-based in [0,R) |
| R | number of classes |
Definition at line 54 of file infer_compute_ql_at_arrival.h.
References infer_compute_ql_at_arrival(), and line::InputError::InputError().
Referenced by infer_compute_ql_at_arrival(), and infer_get_qlen_arrival().
| std::vector< Matrix< T > > line::infer::infer_get_qlen_arrival | ( | const std::vector< std::vector< T > > & | at_ms, |
| const std::vector< std::vector< T > > & | rt ) |
Per-class queue lengths at arrival for the per-class sample format.
| at_ms | (K) per-class arrival times, in milliseconds |
| rt | (K) per-class response times, in seconds |
Definition at line 50 of file infer_get_qlen_arrival.h.
References infer_compute_ql_at_arrival(), infer_get_qlen_arrival(), and line::InputError::InputError().
Referenced by infer_get_qlen_arrival(), and line::api::infer_minps_setup().
| std::vector< T > line::infer::infer_gibbs | ( | const std::vector< GibbsTrace< T > > & | data, |
| const T & | nbCores, | ||
| const GibbsOptions & | opts, | ||
| pfqn::McRng & | rng ) |
Estimated per-class mean demands.
| data | per-class traces |
| nbCores | number of processors of the queue node |
| opts | sample budgets and tolerance |
| rng | generator, advanced by the call |
Definition at line 403 of file infer_gibbs.h.
References line::infer::GibbsOptions::block, line::infer::GibbsOptions::data_needed, gibbs_analyse_data(), GIBBS_NNODES, gibbs_slice(), line::infer::GibbsSlice< T >::grid, infer_gibbs(), line::InputError::InputError(), line::infer::GibbsOptions::likelihood_sample, line::infer::GibbsSlice< T >::logG, line::pfqn::mc_uniform(), line::infer::GibbsStateProbs< T >::N, line::infer::GibbsStateProbs< T >::N0, line::infer::GibbsOptions::nsamples, line::num_abs(), line::NumericError::NumericError(), line::infer::GibbsSlice< T >::prob, line::infer::GibbsStateProbs< T >::prob, line::infer::GibbsSlice< T >::range_size_dim, line::infer::GibbsStateProbs< T >::states, and line::infer::GibbsOptions::tol.
Referenced by infer_gibbs(), and infer_gibbs().
| std::vector< T > line::infer::infer_gibbs | ( | const std::vector< GibbsTrace< T > > & | data, |
| const T & | nbCores, | ||
| double | tol, | ||
| pfqn::McRng & | rng ) |
MATLAB's three-argument form, with its hard-coded budgets.
Definition at line 568 of file infer_gibbs.h.
References infer_gibbs(), and line::infer::GibbsOptions::tol.
| InferLqnResult< T > line::infer::infer_lqn | ( | lqn::LqnStruct< T > & | lsn, |
| const std::vector< LqnParamSpec > & | spec, | ||
| const std::vector< LqnObsSpec > & | obs, | ||
| const Matrix< T > & | Z, | ||
| const std::function< LqnMetrics< T >(const lqn::LqnStruct< T > &)> & | solve, | ||
| const InferLqnOptions< T > & | opt = InferLqnOptions<T>() ) |
Identify hidden LQN parameters from measured performance data.
| lsn | layered struct, mutated in place to carry the final estimate |
| spec | parameters to identify |
| obs | observations to read at each step, numel(obs) == Z.rows() |
| Z | (no x nsteps) measurements, one column per step |
| solve | observation model: given the struct with candidate parameters injected, return the per-element metric vectors |
| opt | filter and covariance options |
Definition at line 112 of file infer_lqn.h.
References line::infer::InferLqnResult< T >::a0, line::infer::EkfOptions< T >::a_true, line::infer::EkfOptions< T >::clamp_positive, line::Matrix< T >::cols(), line::infer::InferLqnResult< T >::ekf, line::infer::EkfOptions< T >::fd_floor, line::infer::EkfOptions< T >::fd_step, infer_lqn(), infer_lqn_ekf(), infer_lqn_getobs(), infer_lqn_getparams(), infer_lqn_setparams(), line::InputError::InputError(), line::Matrix< T >::Matrix(), line::lqn::LqnStruct< T >::names, line::num_abs(), line::infer::InferLqnResult< T >::P0, line::infer::InferLqnResult< T >::Q, line::infer::InferLqnResult< T >::R, line::Matrix< T >::rows(), and line::solve().
Referenced by infer_lqn().
| EkfResult< T > line::infer::infer_lqn_ekf | ( | const std::function< std::vector< T >(const std::vector< T > &)> & | hfun, |
| const std::vector< T > & | a0, | ||
| const Matrix< T > & | P0, | ||
| const Matrix< T > & | Z, | ||
| const Matrix< T > & | Q, | ||
| const Matrix< T > & | R, | ||
| const EkfOptions< T > & | opts = EkfOptions<T>() ) |
Extended Kalman Filter for LQN parameter identification.
| hfun | observation map, a parameter vector to an observation vector |
| a0 | (np) initial parameter estimate |
| P0 | (np x np) initial estimation-error covariance |
| Z | (no x nsteps) measurements, one column per step |
| Q | (np x np) parameter-drift covariance |
| R | (no x no) measurement-error covariance |
| opts | filter options |
Definition at line 108 of file infer_lqn_ekf.h.
References line::infer::EkfResult< T >::ahat, line::Matrix< T >::cols(), line::infer::EkfResult< T >::e, line::infer::EkfResult< T >::Ea, line::infer::EkfResult< T >::Er, line::infer::JacobianResult< T >::H, line::infer::JacobianResult< T >::h0, line::infer::EkfResult< T >::has_Ea, infer_lqn_ekf(), infer_lqn_jacobian(), line::InputError::InputError(), line::lu_factor(), line::lu_solve(), line::Matrix< T >::Matrix(), line::infer::EkfResult< T >::P, line::infer::EkfResult< T >::Phist, line::Matrix< T >::rows(), and line::infer::EkfResult< T >::zpred.
Referenced by infer_lqn(), and infer_lqn_ekf().
|
inline |
First element of a named LQN container matching a name.
| names | container of element names, in element order |
| name | name to locate |
Definition at line 49 of file infer_lqn_findbyname.h.
References infer_lqn_findbyname(), and INFER_LQN_NOT_FOUND.
Referenced by infer_lqn_findbyname(), and infer_lqn_getobs().
| std::vector< T > line::infer::infer_lqn_getobs | ( | const std::vector< std::string > & | names, |
| const LqnMetrics< T > & | metrics, | ||
| const std::vector< LqnObsSpec > & | spec ) |
Observation vector of a solved LQN, z = h(a).
| names | element names, as in LayeredNetworkStruct.names |
| metrics | per-element metric vectors, indexed like names |
| spec | observations to extract, in order |
Definition at line 76 of file infer_lqn_getobs.h.
References infer_lqn_findbyname(), infer_lqn_getobs(), INFER_LQN_NOT_FOUND, line::InputError::InputError(), QLen, line::infer::LqnMetrics< T >::QLen, RespT, line::infer::LqnMetrics< T >::RespT, Tput, line::infer::LqnMetrics< T >::Tput, Util, and line::infer::LqnMetrics< T >::Util.
Referenced by infer_lqn(), and infer_lqn_getobs().
| std::vector< T > line::infer::infer_lqn_getparams | ( | const lqn::LqnStruct< T > & | lsn, |
| const std::vector< LqnParamSpec > & | spec ) |
Read the current values of the parameters named in spec.
| lsn | layered struct to read |
| spec | parameters to read, in order |
Definition at line 98 of file infer_lqn_setparams.h.
References HOSTDEM, and infer_lqn_getparams().
Referenced by infer_lqn(), and infer_lqn_getparams().
| JacobianResult< T > line::infer::infer_lqn_jacobian | ( | const std::function< std::vector< T >(const std::vector< T > &)> & | hfun, |
| const std::vector< T > & | a, | ||
| double | fd_step = 1e-3, | ||
| double | fd_floor = 1e-6 ) |
Forward finite-difference sensitivity matrix of an observation map.
| hfun | observation map, a parameter vector to an observation vector |
| a | (np) point at which the sensitivity is taken |
| fd_step | relative perturbation, MATLAB's default 1e-3 |
| fd_floor | minimum absolute perturbation scale, MATLAB's default 1e-6 |
Definition at line 63 of file infer_lqn_jacobian.h.
References line::infer::JacobianResult< T >::H, line::infer::JacobianResult< T >::h0, infer_lqn_jacobian(), line::InputError::InputError(), line::Matrix< T >::Matrix(), and line::num_abs().
Referenced by infer_lqn_ekf(), and infer_lqn_jacobian().
| void line::infer::infer_lqn_setparams | ( | lqn::LqnStruct< T > & | lsn, |
| const std::vector< LqnParamSpec > & | spec, | ||
| const std::vector< T > & | a ) |
Set the parameters named in spec to the values in a, in place.
| lsn | layered struct to mutate |
| spec | parameters to set, in order |
| a | (numel(spec)) values, injected as exponential means |
Definition at line 118 of file infer_lqn_setparams.h.
References line::lang::Distrib< T >::exp_mean(), HOSTDEM, infer_lqn_setparams(), and line::InputError::InputError().
Referenced by infer_lqn(), and infer_lqn_setparams().
| NhppKsResult< Tv > line::infer::infer_nhpp_ks | ( | const std::vector< Tv > & | times, |
| const Tv & | T, | ||
| const std::function< Tv(const Tv &)> & | cumRate = std::function<Tv(const Tv&)>(), | ||
| NhppKsMethod | method = NhppKsMethod::Lewis, | ||
| const Tv & | T0 = num_traits<Tv>::from_int(0) ) |
Kolmogorov-Smirnov tests for a non-homogeneous Poisson arrival process.
| times | the arrival times, within [T0,T] |
| T | the right end of the observation interval |
| cumRate | the cumulative rate Lambda(t); a constant rate when empty |
| method | Cu for the plain test, Lewis for the Durbin-transformed one |
| T0 | the left end of the observation interval |
Definition at line 120 of file infer_nhpp_ks.h.
References Cu, infer_nhpp_ks(), line::InputError::InputError(), Lewis, line::infer::NhppKsResult< T >::n, line::infer::NhppKsResult< T >::pvalue, line::infer::NhppKsResult< T >::statistic, line::infer::NhppKsResult< T >::transformed, and line::infer::NhppKsResult< T >::uniforms.
Referenced by line::lang::dist_is_nhpp(), and infer_nhpp_ks().
| Matrix< T > line::infer::infer_qmle | ( | const Matrix< T > & | Q, |
| const std::vector< T > & | N, | ||
| const std::vector< T > & | Z ) |
Queue-length-based maximum-likelihood estimator of the service demands of a closed queueing network.
| Q | (M x R) mean queue lengths |
| N | (R) population per class |
| Z | (R) think time per class |
Definition at line 50 of file infer_qmle.h.
References line::Matrix< T >::cols(), infer_qmle(), line::InputError::InputError(), line::NumericError::NumericError(), and line::Matrix< T >::rows().
Referenced by infer_qmle().
| qn::Network< T > line::infer::infer_quick_model | ( | bool | is_open, |
| const std::vector< lang::SchedStrategy > & | stations, | ||
| const Matrix< T > & | demands, | ||
| const std::vector< double > & | servers = std::vector<double>(), | ||
| const std::vector< double > & | jobs = std::vector<double>(), | ||
| const std::vector< Matrix< T > > & | routing = std::vector<Matrix<T>>() ) |
Build a simple open or closed queueing network.
| is_open | true for an open network, false for a closed one |
| stations | (M) scheduling discipline of each queue |
| demands | (K x M) mean service demand of class c at station i |
| servers | (M) server count per station; empty means one each |
| jobs | (K) population per closed class; empty means one each |
| routing | (K) per-class M x M station routing for a closed model; empty means serial |
Definition at line 59 of file infer_quick_model.h.
References line::qn::Network< T >::add_closed_class(), line::qn::Network< T >::add_open_class(), line::qn::Network< T >::add_queue(), line::qn::Network< T >::add_sink(), line::qn::Network< T >::add_source(), line::Matrix< T >::cols(), line::lang::Distrib< T >::exp_mean(), infer_quick_model(), line::qn::Network< T >::init_routing_matrix(), line::InputError::InputError(), line::qn::Network< T >::link(), line::Matrix< T >::rows(), line::qn::Network< T >::set_capacity(), line::qn::Network< T >::set_number_of_servers(), and line::qn::Network< T >::set_service().
Referenced by infer_quick_model().
| std::vector< T > line::infer::infer_rps | ( | const std::vector< T > & | rt, |
| const std::vector< std::size_t > & | cls, | ||
| const Matrix< T > & | ql, | ||
| long | V ) |
Regression for Processor Sharing (RPS) demand estimator.
| rt | (n) response time samples |
| cls | (n) class of each sample, 0-based |
| ql | (n x R) per-class queue lengths at arrival, excluding the arriving job |
| V | number of servers of the PS station |
Definition at line 57 of file infer_rps.h.
References line::Matrix< T >::cols(), infer_rps(), line::InputError::InputError(), line::NumericError::NumericError(), and line::Matrix< T >::rows().
Referenced by line::api::infer_minps(), and infer_rps().
|
inline |
infer_smp(from, to, dur, ...): the fit, under opt.approach.
from holds states 1..E and to states 1..E or 0 for a censored sojourn; dur the sojourn durations. See the file comment for the two approaches.
Definition at line 671 of file infer_smp.h.
References line::infer::SmpFit::aic, line::infer::SmpFit::approach, line::infer::SmpFit::arcs, line::infer::SmpArc::beta, line::Matrix< T >::cols(), line::infer::SmpArc::family, line::infer::SmpArc::from, infer_smp(), infer_smp_family_dist(), infer_smp_family_natural(), infer_smp_family_npar(), line::InputError::InputError(), line::infer::SmpFit::loglik, line::infer::SmpFit::ncov, line::infer::SmpArc::nevents, line::infer::SmpFit::nparams, line::infer::SmpFit::nstates, line::infer::SmpFit::P, line::mc::SmpStageQuad::P, line::infer::SmpArc::params, line::infer::SmpArc::prob, line::Matrix< T >::rows(), line::infer::SmpArc::se, smp_family_name(), line::mc::smp_stage_quad(), line::infer::SmpArc::theta, and line::infer::SmpArc::to.
Referenced by infer_smp().
|
inline |
infer_smp_env(fit, models, ...): the Environment of a fit, models[e] the network of stage e.
An 'intensity' fit becomes competing arcs (add_transition), each the fitted latent clock; a 'sojourn' fit becomes kernel arcs (add_kernel_transition) with the fitted embedded probability and conditional sojourn law. Either is solved by SolverENV method 'smp'.
Definition at line 833 of file infer_smp.h.
References line::env::Environment< T >::add_kernel_transition(), line::env::Environment< T >::add_transition(), line::infer::SmpFit::approach, line::infer::SmpFit::arcs, line::infer::SmpArc::beta, line::infer::SmpArc::family, line::infer::SmpArc::from, infer_smp_env(), infer_smp_family_dist(), line::InputError::InputError(), line::infer::SmpFit::ncov, line::infer::SmpFit::nstates, line::infer::SmpArc::prob, line::env::Environment< T >::set_stage(), line::infer::SmpArc::theta, and line::infer::SmpArc::to.
Referenced by infer_smp_env().
|
inline |
infer_smp_family(F, 'dist', THETA, ETA): the LINE distribution of the law with hazard h0(t) exp(eta).
Only 'exp' and 'weibull' are closed under a proportional-hazards factor; the other two are refused for eta != 0.
Definition at line 187 of file infer_smp.h.
References line::lang::Distrib< T >::exp_rate(), line::lang::Distrib< T >::gamma_dist(), infer_smp_family_dist(), infer_smp_family_natural(), line::InputError::InputError(), line::lang::Distrib< T >::lognormal(), smp_family_name(), and line::lang::Distrib< T >::weibull().
Referenced by infer_smp(), infer_smp_env(), infer_smp_family_dist(), and infer_smp_hazard().
|
inline |
infer_smp_family(F, 'logfs', THETA, T, ETA): log density and log survival at t under the proportional-hazards factor exp(eta): H = H0 exp(eta), log h = log h0 + eta, log f = log h - H.
eta holds one value per instant, or a single value for all of them, or nothing for the baseline. The survival of 'gamma' and 'lognormal' is floored at 1e-300 before the log.
Definition at line 95 of file infer_smp.h.
References infer_smp_family_logfs(), infer_smp_family_npar(), line::InputError::InputError(), and smp_family_name().
Referenced by line::infer::smp_infer_detail::fit_intensity_arc(), line::infer::smp_infer_detail::fit_sojourn_state(), infer_smp_family_logfs(), and infer_smp_hazard().
|
inline |
infer_smp_family(F, 'natural', THETA): rate | shape, scale | mu, sigma.
Definition at line 140 of file infer_smp.h.
References infer_smp_family_natural(), infer_smp_family_npar(), and smp_family_name().
Referenced by line::infer::smp_infer_detail::fit_sojourn_state(), infer_smp(), infer_smp_family_dist(), and infer_smp_family_natural().
|
inline |
infer_smp_family(F, 'npar'): the number of parameters, validating the name.
Definition at line 80 of file infer_smp.h.
References infer_smp_family_npar(), line::InputError::InputError(), and smp_family_name().
Referenced by line::infer::smp_infer_detail::fit_intensity_arc(), line::infer::smp_infer_detail::fit_sojourn_state(), infer_smp(), infer_smp_family_logfs(), infer_smp_family_natural(), infer_smp_family_npar(), and infer_smp_family_theta0().
|
inline |
infer_smp_family(F, 'theta0', TEV, TEXP): the starting point from the event times tev and the total exposure texp.
Definition at line 154 of file infer_smp.h.
References infer_smp_family_npar(), infer_smp_family_theta0(), and smp_family_name().
Referenced by line::infer::smp_infer_detail::fit_intensity_arc(), line::infer::smp_infer_detail::fit_sojourn_state(), and infer_smp_family_theta0().
|
inline |
infer_smp_hazard(fit, t, 'z', z): both hazard functions of every arc of a fit on the ascending instants t > 0 (Asanjarani et al., Eqs.
11-15), related by a~_ij(t) = p_ij f_ij(t) / S_i(t). An 'intensity' fit has a~ and A~ in closed form and the CIF by mc::smp_stage_cif, so alpha_ij = a~_ij S_i / (p_ij - CIF_ij). A 'sojourn' fit has alpha and the CIF in closed form, a~ from the relation, and A~ as a midpoint sum on the grid [0, logspace(log10(tmax)-8, log10(tmax), 2001)] joined with linspace(0, tmax, 20001) and t. The result is aligned with fit.arcs.
Definition at line 887 of file infer_smp.h.
References line::infer::SmpFit::approach, line::infer::SmpFit::arcs, line::infer::SmpArc::beta, line::mc::SmpStageCif::C, line::infer::SmpHazard::cif, line::infer::SmpHazard::cumulative, line::infer::SmpArc::family, line::infer::SmpArc::from, line::infer::SmpHazard::from, infer_smp_family_dist(), infer_smp_family_logfs(), infer_smp_hazard(), line::InputError::InputError(), line::infer::SmpHazard::intensity, line::mc::smp_detail::linspace(), line::infer::SmpFit::ncov, line::infer::SmpFit::nstates, line::mc::SmpStageQuad::P, line::mc::smp_stage_cif(), line::mc::smp_stage_quad(), line::infer::SmpHazard::sojourn, line::infer::SmpArc::theta, line::infer::SmpArc::to, and line::infer::SmpHazard::to.
Referenced by infer_smp_hazard().
|
inline |
infer_smp_nelson_aalen(from, to, dur, 'nstates', E): the Nelson-Aalen estimate of the cumulative transition intensity of every observed transition, on the clock reset at each jump.
The risk set at t of i -> j is the number of sojourns in i of duration at least t, so this is the nonparametric benchmark of the 'intensity' approach (Asanjarani et al., Sec. 4). nstates 0 means max(from, to).
Definition at line 1028 of file infer_smp.h.
References line::infer::SmpNelsonAalen::A, line::infer::SmpNelsonAalen::from, infer_smp_nelson_aalen(), line::InputError::InputError(), line::infer::SmpNelsonAalen::time, line::infer::SmpNelsonAalen::to, and line::infer::SmpNelsonAalen::var.
Referenced by infer_smp_nelson_aalen().
| VariationalResult< T > line::infer::infer_variational | ( | VariationalSpec< T > | spec, |
| VariationalOptions< T > | opt = VariationalOptions<T>() ) |
Run the variational inference procedure.
| spec | the inference problem |
| opt | solver options; defaults are derived from the specification |
Conditional rate moments of one transition, and its observation jumps. Fills E[Xi | Y^eta=y] and exp(E[log Xi | Y^eta=y]) on the time grid, both under Q with the transition's own contribution removed.
Definition at line 501 of file infer_variational.h.
References line::infer::VariationalResult< T >::alpha, line::infer::VariationalSpec< T >::alpha0, line::infer::VariationalResult< T >::alpha_trace, line::infer::VariationalSpec< T >::arcparam, line::infer::VariationalSpec< T >::arcrate, line::infer::VariationalSpec< T >::arcs, line::infer::VariationalResult< T >::beta, line::infer::VariationalSpec< T >::beta0, line::infer::VariationalResult< T >::beta_trace, line::infer::VariationalResult< T >::bound, line::infer::VariationalSpec< T >::capacity, line::infer::VariationalResult< T >::converged, line::infer::VariationalSpec< T >::epsilon, EXTERNAL, infer_variational(), line::InputError::InputError(), line::infer::VariationalResult< T >::iter, line::Matrix< T >::Matrix(), line::infer::VariationalResult< T >::mean_service_time, line::infer::VariationalSpec< T >::nservers, line::infer::VariationalResult< T >::nu, line::infer::VariationalSpec< T >::obsData, line::infer::VariationalSpec< T >::obsRange, line::infer::VariationalSpec< T >::obsTimes, line::infer::VariationalResult< T >::qlen, line::infer::VariationalResult< T >::rates, line::infer::VariationalSpec< T >::routeprob, line::infer::VariationalSpec< T >::sched, line::infer::VariationalResult< T >::tailmass, line::infer::VariationalResult< T >::tgrid, line::infer::VariationalSpec< T >::unobserved(), line::infer::VariationalSpec< T >::x0, and line::infer::VariationalResult< T >::Y.
Referenced by infer_variational().
|
inline |
Lower-case copy of a family name.
Definition at line 72 of file infer_smp.h.
References smp_family_name().
Referenced by line::infer::smp_infer_detail::fit_intensity_arc(), line::infer::smp_infer_detail::fit_sojourn_state(), infer_smp(), infer_smp_family_dist(), infer_smp_family_logfs(), infer_smp_family_natural(), infer_smp_family_npar(), infer_smp_family_theta0(), and smp_family_name().
|
static |
The two nodes of the model the estimator assumes: delay, then queue.
Definition at line 87 of file infer_gibbs.h.
Referenced by gibbs_analyse_data(), gibbs_slice(), and infer_gibbs().
|
static |
Returned when no element carries the requested name, MATLAB's [].
Definition at line 40 of file infer_lqn_findbyname.h.
Referenced by infer_lqn_findbyname(), and infer_lqn_getobs().