![]() |
LINE Solver (C++)
Templated C++ port of the LINE queueing solver
|
Namespaces | |
| namespace | lqn |
Classes | |
| struct | ArrivalRateFun |
| lambda(t), with whether it actually varies and the cycle length. More... | |
| struct | CacheActualProb |
| The converged cache split, per ORIGINAL class of one Cache node. More... | |
| struct | ChainAggregationDeagg |
| Everything needed to map a chain-level result back onto the classes. More... | |
| struct | ChainAggregationResult |
| What sn_aggregate_chains returns. More... | |
| struct | DiscreteTimeInfo |
| Which laws the model carries, and why it was refused when it was. More... | |
| struct | DiscreteTimeOptions |
| How the caller may override the automatic decision. More... | |
| struct | FjSpnStructure |
| What the auxiliary construction found, for one class. More... | |
| struct | FluidRtLikelihood |
| What the fluid likelihood call reports. More... | |
| struct | MinpsClassTrace |
| One class's raw trace: when its jobs arrived, and how long they took. More... | |
| struct | MinpsSetup |
| The prepared sample set, plus what the preparation had to decide. More... | |
| struct | MlpsSample |
| One observation: a response time, the tagged class, and the arrival state. More... | |
| struct | NonmarkovOptions |
| options.config.nonmkv and friends. More... | |
| struct | OpenProbTerm |
| The log contribution, and whether the state carries any mass at all. More... | |
| struct | PatienceHandles |
| The patience law of one station-class pair, in the forms the solvers consume. More... | |
| struct | SnMapModulation |
| One modulating process: which station and classes it drives, and its blocks. More... | |
| struct | SnPnAvgRates |
| What sn_pn_avg_rates rewrites in place; empty tables are left empty. More... | |
| struct | SnPnFiringRates |
| What sn_pn_firing_rates returns; x empty means "no answer", as in the reference. More... | |
| struct | SnRtOrig |
| What sn_rtnodes_to_rtorig returns: the flat matrix and its per-class-pair blocks. More... | |
| struct | SnRtStations |
| What sn_rt_stations returns: the complemented routing and the station visits. More... | |
Enumerations | |
| enum class | PhFit { Cme , Ph , Hyperexp } |
| Which Markovian surrogate to fit; options.config.phfit. More... | |
| enum class | ValidationLevel { Full , Minimal , None } |
| How much of the struct to check; the reference's ValidationLevel. More... | |
Functions | |
| template<class T> | |
| FluidRtLikelihood | infer_fluid_ps_rt_likelihood (const qn::NetworkStruct< T > &sn, std::size_t ist, std::size_t cls, const std::vector< double > &levels, double rsampled, double marked=1.0) |
| The fluid passage-time density at one observed response time. | |
| template<class T> | |
| std::vector< double > | infer_fmlps (const qn::NetworkStruct< T > &sn, std::size_t ist, const std::vector< MlpsSample > &samples) |
| FMLPS: the fluid analogue of MLPS. | |
| MinpsSetup | infer_minps_setup (const std::vector< MinpsClassTrace > &traces, std::size_t initSample, std::size_t sampleSize) |
| Turn a raw per-class trace into the sample set MINPS estimates from. | |
| std::vector< double > | infer_minps_from_trace (const std::vector< MinpsClassTrace > &traces, std::size_t initSample, std::size_t sampleSize, double nCores) |
| Prepare the trace and run MINPS on it, as the reference's last line does. | |
| std::vector< double > | infer_mlps (const std::vector< double > &muZ, double nCores, const std::vector< MlpsSample > &samples) |
| MLPS demand estimation at a PS queue. | |
| std::vector< double > | infer_minps (const std::vector< double > &muZ, double nCores, const std::vector< MlpsSample > &samples) |
| MINPS: run MLPS and RPS and keep whichever gives the smaller mean demand. | |
| template<class T> | |
| ChainAggregationResult< T > | sn_aggregate_chains (const qn::NetworkStruct< T > &sn, const std::string &suffix=std::string()) |
| Collapse every chain onto one class, port of ModelAdapter.aggregateChains. | |
| template<class T> | |
| ArrivalRateFun< T > | sn_arrival_rate_fun (const qn::NetworkStruct< T > &sn, std::size_t ist, std::size_t r) |
| Build lambda(t) for station ist (0-based), class r. | |
| template<class T> | |
| T | sn_compat_rate (const Matrix< T > &compat, const std::vector< double > &counts, const std::vector< T > &rates, const std::vector< T > &n) |
| Rate cleared by the pools when the operands in n are present. | |
| template<class T> | |
| T | sn_compat_peak (const std::vector< double > &counts, const std::vector< T > &rates) |
| Rate with every pool active: sum_t counts(t)*rates(t). | |
| template<class T> | |
| T | sn_compat_scaling (const Matrix< T > &compat, const std::vector< double > &counts, const std::vector< T > &rates, const std::vector< T > &n) |
| Rate scaling eta(n) a compatibility declaration imposes on its station. | |
| template<class T> | |
| void | sn_fj_nodevisits_mmt (qn::NetworkStruct< T > &sn) |
| Rewrite sn.nodevisits with the MMT correction. | |
| template<class T> | |
| FjSpnStructure | fj_spn_structure (const qn::NetworkStruct< T > &sn, const Matrix< T > &P_r, const std::vector< bool > &visited, std::size_t cls=0) |
| Classify one class's visited subgraph and size the auxiliary net. | |
| template<class T> | |
| std::vector< Matrix< T > > | sn_fj_visits_spn (const qn::NetworkStruct< T > &sn) |
| Per-chain fork-join node visit ratios. | |
| template<class T> | |
| bool | sn_has_bursty_arrival (const qn::NetworkStruct< T > &sn) |
| template<class T> | |
| bool | sn_has_classdep_routing (const qn::NetworkStruct< T > &sn) |
| template<class T> | |
| bool | sn_is_discrete_time (const qn::NetworkStruct< T > &sn, const DiscreteTimeOptions &options, double *slot_length, DiscreteTimeInfo *info) |
| True when every law of sn is lattice-valued on slot_length. | |
| template<class T> | |
| bool | sn_is_phasetype (const std::vector< Matrix< T > > &maps, const std::vector< T > &pie) |
| Whether a (D0, D1, ...) list is a valid phase-type / MAP representation. | |
| template<class T> | |
| bool | sn_is_phasetype (const std::vector< Matrix< T > > &maps) |
| template<class T> | |
| std::vector< SnMapModulation< T > > | sn_map_modulation (const qn::NetworkStruct< T > &sn) |
| template<class T> | |
| Matrix< T > | sn_get_node_arvr_from_tput (const qn::NetworkStruct< T > &sn, const Matrix< T > &TN, const Matrix< T > &AN) |
| Port of sn_get_node_arvr_from_tput. | |
| template<class T> | |
| Matrix< T > | sn_get_node_tput_from_tput (const qn::NetworkStruct< T > &sn, const Matrix< T > &TN, const Matrix< T > &ANn, const std::map< std::size_t, CacheActualProb< T > > &cache_prob=std::map< std::size_t, CacheActualProb< T > >()) |
| Port of sn_get_node_tput_from_tput. | |
| template<class T> | |
| bool | sn_has_nonmarkov (const qn::NetworkStruct< T > &sn, bool preserve_det=false) |
| Whether any law in the struct would be replaced, so a caller can skip copying the struct when there is nothing to convert. | |
| template<class T> | |
| void | sn_nonmarkov_toph (qn::NetworkStruct< T > &sn, const NonmarkovOptions &opts=NonmarkovOptions()) |
| Replace every non-Markovian service and firing law by a Markovian surrogate. | |
| template<class T> | |
| OpenProbTerm< T > | sn_open_prob_terms (const qn::NetworkStruct< T > &sn, const Matrix< T > &Q, const Matrix< T > &U, const Matrix< T > &nir, std::size_t ist) |
| Open-class contribution to an aggregate state probability at one station. | |
| template<class T> | |
| PatienceHandles< T > | sn_patience_handles (const qn::NetworkStruct< T > &sn, std::size_t ist, std::size_t r) |
| Build the patience handles of station ist (0-based), class r. | |
| template<class T> | |
| SnPnFiringRates | sn_pn_firing_rates (const qn::NetworkStruct< T > &sn, const Matrix< T > &TN, bool tput_is_tokens) |
| Ports of matlab/src/api/sn/sn_pn_firing_rates.m and sn_pn_avg_rates.m. | |
| template<class T> | |
| SnPnAvgRates< T > | sn_pn_avg_rates (const qn::NetworkStruct< T > &sn, const Matrix< T > &QN, const Matrix< T > &TN, const Matrix< T > &AN, const Matrix< T > &RN) |
| Port of sn_pn_avg_rates: rewrite the place rows of TN, AN and RN so that they agree with the recovered mode firing rates. | |
| template<class T> | |
| bool | sn_has_dps (const qn::NetworkStruct< T > &sn) |
| template<class T> | |
| bool | sn_has_dps_prio (const qn::NetworkStruct< T > &sn) |
| template<class T> | |
| bool | sn_has_fcfs (const qn::NetworkStruct< T > &sn) |
| template<class T> | |
| bool | sn_has_gps (const qn::NetworkStruct< T > &sn) |
| template<class T> | |
| bool | sn_has_gps_prio (const qn::NetworkStruct< T > &sn) |
| template<class T> | |
| bool | sn_has_hol (const qn::NetworkStruct< T > &sn) |
| template<class T> | |
| bool | sn_has_inf (const qn::NetworkStruct< T > &sn) |
| template<class T> | |
| bool | sn_has_lcfs (const qn::NetworkStruct< T > &sn) |
| template<class T> | |
| bool | sn_has_lcfs_pi (const qn::NetworkStruct< T > &sn) |
| template<class T> | |
| bool | sn_has_lcfs_pr (const qn::NetworkStruct< T > &sn) |
| template<class T> | |
| bool | sn_has_lept (const qn::NetworkStruct< T > &sn) |
| template<class T> | |
| bool | sn_has_ljf (const qn::NetworkStruct< T > &sn) |
| template<class T> | |
| bool | sn_has_lps (const qn::NetworkStruct< T > &sn) |
| template<class T> | |
| bool | sn_has_polling (const qn::NetworkStruct< T > &sn) |
| template<class T> | |
| bool | sn_has_ps (const qn::NetworkStruct< T > &sn) |
| template<class T> | |
| bool | sn_has_ps_prio (const qn::NetworkStruct< T > &sn) |
| template<class T> | |
| bool | sn_has_sept (const qn::NetworkStruct< T > &sn) |
| template<class T> | |
| bool | sn_has_setf (const qn::NetworkStruct< T > &sn) |
| template<class T> | |
| bool | sn_has_siro (const qn::NetworkStruct< T > &sn) |
| template<class T> | |
| bool | sn_has_sjf (const qn::NetworkStruct< T > &sn) |
| template<class T> | |
| bool | sn_has_srpt (const qn::NetworkStruct< T > &sn) |
| template<class T> | |
| bool | sn_has_homogeneous_scheduling (const qn::NetworkStruct< T > &sn, qn::SchedStrategy) |
| Port of sn_has_homogeneous_scheduling. | |
| template<class T> | |
| bool | sn_has_open_classes (const qn::NetworkStruct< T > &sn) |
| template<class T> | |
| bool | sn_has_closed_classes (const qn::NetworkStruct< T > &sn) |
| template<class T> | |
| bool | sn_has_multiple_closed_classes (const qn::NetworkStruct< T > &sn) |
| template<class T> | |
| bool | sn_has_mixed_classes (const qn::NetworkStruct< T > &sn) |
| template<class T> | |
| bool | sn_has_multi_chain (const qn::NetworkStruct< T > &sn) |
| template<class T> | |
| bool | sn_has_single_chain (const qn::NetworkStruct< T > &sn) |
| template<class T> | |
| bool | sn_has_multi_class (const qn::NetworkStruct< T > &sn) |
| template<class T> | |
| bool | sn_has_single_class (const qn::NetworkStruct< T > &sn) |
| template<class T> | |
| bool | sn_has_class_switching (const qn::NetworkStruct< T > &sn) |
| template<class T> | |
| bool | sn_is_open_model (const qn::NetworkStruct< T > &sn) |
| all(isinf(sn.njobs)): EVERY class is open, which a mixed model fails. | |
| template<class T> | |
| bool | sn_is_closed_model (const qn::NetworkStruct< T > &sn) |
| all(isfinite(sn.njobs)): EVERY class is closed. | |
| template<class T> | |
| bool | sn_is_mixed_model (const qn::NetworkStruct< T > &sn) |
| template<class T> | |
| bool | sn_has_priorities (const qn::NetworkStruct< T > &sn) |
| template<class T> | |
| bool | sn_has_multi_server (const qn::NetworkStruct< T > &sn) |
| template<class T> | |
| bool | sn_has_fractional_populations (const qn::NetworkStruct< T > &sn) |
| any(sn.njobs ~= round(sn.njobs)); an infinite population rounds to itself. | |
| template<class T> | |
| bool | sn_has_load_dependence (const qn::NetworkStruct< T > &sn) |
| size(sn.lldscaling,2)>0: some station carries a limited-load scaling row. | |
| template<class T> | |
| bool | sn_has_fork_join (const qn::NetworkStruct< T > &sn) |
| any(sn.fj(:) > 0): the model has a Fork closed by a Join. | |
| template<class T> | |
| bool | sn_has_sd_routing (const qn::NetworkStruct< T > &sn) |
| sn_has_sd_routing: some node dispatches on the STATE of the network. | |
| template<class T> | |
| bool | sn_has_multi_class_fcfs (const qn::NetworkStruct< T > &sn) |
| sum(sn.rates(i,:)>0)>1 at some FCFS station: more than one class is served there. | |
| template<class T> | |
| bool | sn_has_multi_class_heter_fcfs (const qn::NetworkStruct< T > &sn) |
| sn_has_multi_class_heter_fcfs: an FCFS station whose per-class rates differ. | |
| template<class T> | |
| bool | sn_has_multi_class_heter_exp_fcfs (const qn::NetworkStruct< T > &sn) |
| An FCFS station with heterogeneous rates whose SCVs are all one (exponential). | |
| template<class T> | |
| bool | sn_sched_is_product_form (const qn::NetworkStruct< T > &sn) |
| The disciplines the reference admits in sn_has_product_form. | |
| template<class T> | |
| bool | sn_has_blocking (const qn::NetworkStruct< T > &sn) |
| Defined below, after sn_is_mm1k_loss, which it exempts. | |
| template<class T> | |
| bool | sn_has_product_form (const qn::NetworkStruct< T > &sn) |
| Port of sn_has_product_form. | |
| template<class T> | |
| bool | sn_has_product_form_not_het_fcfs (const qn::NetworkStruct< T > &sn, bool check_means=true) |
| Port of sn_has_product_form_not_het_fcfs: LCFS is out, and every enabled FCFS pair with a finite positive SCV must have that SCV equal to one, with the service means agreeing across the classes served there. | |
| template<class T> | |
| bool | sn_is_population_model (const qn::NetworkStruct< T > &sn) |
| sn_is_population_model: every station is population dependent only, which is what lets the fluid and mean-field limits close on the queue lengths. | |
| template<class T> | |
| bool | sn_is_bas_model (const qn::NetworkStruct< T > &sn) |
| sn_is_bas_model: a single-class closed model with blocking-after-service. | |
| template<class T> | |
| bool | sn_is_mm1k_loss (const qn::NetworkStruct< T > &sn) |
| sn_is_mm1k_loss: the three-node Source/Queue/Sink model of an M/M/1/K with loss, the shape MVA answers in closed form instead of iterating. | |
| template<class T> | |
| std::string | sn_print (const qn::NetworkStruct< T > &sn) |
| The full field: value dump of a NetworkStruct, ending with a newline. | |
| template<class T> | |
| std::string | sn_print_routing_matrix (const qn::NetworkStruct< T > &sn, std::size_t onlyclass=0) |
| The human-readable form of sn.rtnodes: one line per positive (node, class) to (node, class) edge. | |
| template<class T> | |
| std::vector< bool > | sn_region_members (const qn::NetworkStruct< T > &sn, std::size_t f) |
| The membership mask of region f (0-based), one entry per station. | |
| template<class T> | |
| std::vector< std::size_t > | sn_region_member_list (const qn::NetworkStruct< T > &sn, std::size_t f) |
| The same membership as 1-based station indices, the form most callers want. | |
| template<class T> | |
| qn::NetworkStruct< T > | sn_remove_class (const qn::NetworkStruct< T > &sn, std::size_t cls) |
| The model without class cls (1-based), leaving sn untouched. | |
| template<class T> | |
| qn::NetworkStruct< T > | sn_remove_class (const qn::NetworkStruct< T > &sn, const std::string &name) |
| The same, naming the class. | |
| template<class T> | |
| SnRtStations< T > | sn_rt_stations (const qn::NetworkStruct< T > &sn) |
| template<class T> | |
| SnRtOrig< T > | sn_rtnodes_to_rtorig (const qn::NetworkStruct< T > &sn) |
| template<class T> | |
| void | sn_refresh_process_fields (qn::NetworkStruct< T > &sn, std::size_t ist, std::size_t r) |
| Port of sn_refresh_process_fields: rebuild sn.service[ist][r] from the (rate, SCV) pair currently in sn.rates and sn.scv. | |
| template<class T> | |
| void | sn_set_service (qn::NetworkStruct< T > &sn, std::size_t ist, std::size_t r, const T &rate, const T &scv, bool auto_refresh=false) |
| Port of sn_set_service: write a (rate, SCV) pair at one (station, class). | |
| template<class T> | |
| void | sn_set_arrival (qn::NetworkStruct< T > &sn, std::size_t r, const T &rate, const T &scv, bool auto_refresh=false) |
| Port of sn_set_arrival: the same, at whichever station is the Source. | |
| template<class T> | |
| void | sn_set_service_batch (qn::NetworkStruct< T > &sn, const Matrix< T > &rates, const Matrix< T > &scvs, const std::vector< std::vector< bool > > &set_rate, const std::vector< std::vector< bool > > &set_scv, bool auto_refresh=false) |
| Port of sn_set_service_batch: write a whole (rate, SCV) table, skipping the entries the caller left undefined. | |
| template<class T> | |
| void | sn_set_population (qn::NetworkStruct< T > &sn, std::size_t r, double njobs, bool auto_refresh=false) |
| Port of sn_set_population: change a class population and the closed total. | |
| template<class T> | |
| void | sn_set_servers (qn::NetworkStruct< T > &sn, std::size_t ist, double nservers) |
| Port of sn_set_servers. | |
| template<class T> | |
| void | sn_set_priority (qn::NetworkStruct< T > &sn, std::size_t r, int priority) |
| Port of sn_set_priority. | |
| template<class T> | |
| void | sn_set_fork_fanout (qn::NetworkStruct< T > &sn, std::size_t fork_node, double fanout) |
| Port of sn_set_fork_fanout. | |
| template<class T> | |
| void | sn_set_routing (qn::NetworkStruct< T > &sn, const Matrix< T > &rt, bool auto_refresh=false) |
| Port of sn_set_routing: replace the class-expanded stateful routing wholesale. | |
| template<class T> | |
| void | sn_set_routing_prob (qn::NetworkStruct< T > &sn, std::size_t from_stateful, std::size_t from_class, std::size_t to_stateful, std::size_t to_class, const T &prob, bool auto_refresh=false) |
| Port of sn_set_routing_prob: one entry of the class-expanded stateful routing. | |
| template<class T> | |
| std::vector< std::pair< T, std::vector< T > > > | sn_get_state_aggr (const qn::NetworkStruct< T > &sn, const std::vector< std::vector< T > > &state) |
| Port of sn_get_state_aggr: the per-class job counts of each stateful node's state row, with the phase and buffer encoding aggregated away. | |
| template<class T> | |
| Matrix< T > | sn_declared_marginal (const qn::NetworkStruct< T > &sn) |
| The (nstations x nclasses) per-class job counts of the model's OWN state. | |
| template<class T> | |
| bool | sn_state_counts_valid (const qn::NetworkStruct< T > &sn, const Matrix< T > &n, const Matrix< T > &s) |
| Port of State.isValid, which is the whole body of sn_is_state_valid once the marginals are formed. | |
| template<class T> | |
| bool | sn_is_state_valid (const qn::NetworkStruct< T > &sn, const std::vector< std::vector< T > > &state) |
| Port of sn_is_state_valid: form the station marginals of state and test them. | |
| template<class T> | |
| std::vector< std::string > | sn_validate_dimensions (const qn::NetworkStruct< T > &sn) |
| The (nstations x nclasses) matrices agree with the declared dimensions. | |
| template<class T> | |
| std::vector< std::string > | sn_validate_rates (const qn::NetworkStruct< T > &sn) |
| Rates and SCVs are non-negative wherever the pair is enabled. | |
| template<class T> | |
| std::vector< std::string > | sn_validate_population (const qn::NetworkStruct< T > &sn) |
| Class populations are neither NaN nor negative; an open class may be Inf. | |
| template<class T> | |
| std::vector< std::string > | sn_validate_routing (const qn::NetworkStruct< T > &sn) |
| Every non-empty row of rt is a probability vector summing to one. | |
| template<class T> | |
| std::vector< std::string > | sn_validate_servers (const qn::NetworkStruct< T > &sn) |
| Server counts are positive, except at a Source or a Sink. | |
| template<class T> | |
| std::vector< std::string > | sn_validate (const qn::NetworkStruct< T > &sn, ValidationLevel level=ValidationLevel::Full) |
| Consistency checks on a NetworkStruct, a port of jar/src/main/java/jline/api/sn/SnValidate.java and ValidationLevel.java. | |
| template<class T> | |
| std::string | sn_validate_station_index (const qn::NetworkStruct< T > &sn, std::size_t ist, const std::string ¶mName="stationIdx") |
| template<class T> | |
| std::string | sn_validate_class_index (const qn::NetworkStruct< T > &sn, std::size_t r, const std::string ¶mName="classIdx") |
| template<class T> | |
| std::string | sn_validate_node_index (const qn::NetworkStruct< T > &sn, std::size_t ind, const std::string ¶mName="nodeIdx") |
| template<class T> | |
| std::string | sn_validate_node_type (const qn::NetworkStruct< T > &sn, std::size_t ind, qn::NodeType expected) |
|
strong |
Which Markovian surrogate to fit; options.config.phfit.
Definition at line 82 of file sn_nonmarkov_toph.h.
|
strong |
How much of the struct to check; the reference's ValidationLevel.
| Enumerator | |
|---|---|
| Full | every check |
| Minimal | dimensions only |
| None | skip everything |
Definition at line 51 of file sn_validate.h.
| FjSpnStructure line::api::fj_spn_structure | ( | const qn::NetworkStruct< T > & | sn, |
| const Matrix< T > & | P_r, | ||
| const std::vector< bool > & | visited, | ||
| std::size_t | cls = 0 ) |
Classify one class's visited subgraph and size the auxiliary net.
Exposed because it is what carries the model content: B and the per-Join leaf counts are the construction, and a test that only checked the ones and zeros of the visit vector would not be testing anything.
Definition at line 143 of file sn_fj_visits_spn.h.
References line::api::FjSpnStructure::B, fj_spn_structure(), line::api::FjSpnStructure::forkNodes, line::InputError::InputError(), line::api::FjSpnStructure::inRegion, line::api::FjSpnStructure::joinLeaves, line::api::FjSpnStructure::joinNodes, and line::api::FjSpnStructure::stationNodes.
Referenced by fj_spn_structure(), and sn_fj_visits_spn().
| FluidRtLikelihood line::api::infer_fluid_ps_rt_likelihood | ( | const qn::NetworkStruct< T > & | sn, |
| std::size_t | ist, | ||
| std::size_t | cls, | ||
| const std::vector< double > & | levels, | ||
| double | rsampled, | ||
| double | marked = 1.0 ) |
The fluid passage-time density at one observed response time.
| sn | the network |
| ist | 1-based reference station where the tagged job sits |
| cls | 1-based tagged class |
| levels | (nstates) initial fluid state of the UNAUGMENTED system |
| rsampled | the observed response time |
| marked | the marked mass, the reference's newFluid; one job |
Definition at line 142 of file infer_fmlps.h.
References line::LsodaOptions::atol, line::fluid::FluidEvent::event_idx, line::fluid::FluidOdeSystem::events, line::fluid::fluid_integrate_grid(), line::fluid::fluid_ode_system(), line::fluid::fluid_rates_closing(), infer_fluid_ps_rt_likelihood(), line::InputError::InputError(), line::fluid::FluidOdeSystem::layout, line::api::FluidRtLikelihood::like, line::api::FluidRtLikelihood::marked0, line::api::FluidRtLikelihood::markedT, line::fluid::FluidEvent::minus, line::api::FluidRtLikelihood::nstates, line::fluid::FluidLayout::nstates, line::fluid::FluidEvent::plus, line::fluid::FluidEvent::rate_base, line::LsodaOptions::rtol, and line::LsodaSolution::y.
Referenced by infer_fluid_ps_rt_likelihood(), and infer_fmlps().
| std::vector< double > line::api::infer_fmlps | ( | const qn::NetworkStruct< T > & | sn, |
| std::size_t | ist, | ||
| const std::vector< MlpsSample > & | samples ) |
FMLPS: the fluid analogue of MLPS.
Same objective as infer_mlps – the negative log-likelihood of the observed response times – with the exact phase-type density replaced by the fluid passage-time density above. The initial fluid state of each observation is the per-class queue length it found, spread over the phases of each block.
| sn | a template network whose station ist carries the demands being estimated; only its service RATES are varied |
| ist | 1-based PS station |
| samples | the observations |
Definition at line 265 of file infer_fmlps.h.
References line::lang::Distrib< T >::exp_rate(), line::fluid::fluid_ode_system(), infer_fluid_ps_rt_likelihood(), infer_fmlps(), line::InputError::InputError(), line::fluid::FluidLayout::kic, line::fluid::FluidOdeSystem::layout, line::api::FluidRtLikelihood::like, line::nelder_mead_box(), line::fluid::FluidLayout::nstates, line::fluid::FluidLayout::qidx, line::qn::NetworkStruct< T >::refresh_rates(), and line::qn::NetworkStruct< T >::set_service().
Referenced by infer_fmlps().
|
inline |
MINPS: run MLPS and RPS and keep whichever gives the smaller mean demand.
The reference's rule verbatim. It is a selection, not a blend: taking the elementwise minimum instead would mix two estimators' class assignments and report a demand vector neither of them produced.
Definition at line 322 of file infer_mlps.h.
References infer_minps(), infer_mlps(), and line::infer::infer_rps().
Referenced by infer_minps(), and infer_minps_from_trace().
|
inline |
Prepare the trace and run MINPS on it, as the reference's last line does.
Definition at line 168 of file infer_minps_setup.h.
References infer_minps(), infer_minps_from_trace(), infer_minps_setup(), line::api::MinpsSetup::lambda, and line::api::MinpsSetup::samples.
Referenced by infer_minps_from_trace().
|
inline |
Turn a raw per-class trace into the sample set MINPS estimates from.
| traces | per-class raw trace, one entry per ORIGINAL class |
| initSample | 1-based index of the first sample of the window |
| sampleSize | window length; 0 means every sample |
Definition at line 73 of file infer_minps_setup.h.
References line::api::MinpsSetup::classMap, line::api::MlpsSample::cls, line::infer::infer_get_qlen_arrival(), infer_minps_setup(), line::InputError::InputError(), line::api::MinpsSetup::lambda, line::api::MlpsSample::ql, line::api::MlpsSample::rt, line::api::MinpsSetup::samples, and line::api::MinpsSetup::threads.
Referenced by infer_minps_from_trace(), and infer_minps_setup().
|
inline |
MLPS demand estimation at a PS queue.
| muZ | (R) think-time rates of the delay station |
| nCores | servers at the PS queue |
| samples | the observations |
Definition at line 117 of file infer_mlps.h.
References line::qn::Network< T >::add_closed_class(), line::qn::Network< T >::add_delay(), line::qn::Network< T >::add_queue(), line::Matrix< T >::cols(), line::ctmc::ctmc_get_generator(), line::ctmc::ctmc_get_state_space_aggr(), line::mam::Map< T >::D0, line::mam::Map< T >::D1, line::lang::DEP, line::lang::Distrib< T >::exp_rate(), line::ctmc::CtmcGenerator< T >::filt, line::qn::Network< T >::get_struct(), infer_mlps(), line::InputError::InputError(), line::qn::Network< T >::link(), line::mam::map_pdf(), line::nelder_mead_box(), line::lang::PS, line::ctmc::CtmcGenerator< T >::Q, line::Matrix< T >::rows(), line::qn::RoutingMatrix< T >::set(), line::qn::Network< T >::set_number_of_servers(), line::qn::Network< T >::set_service(), line::qn::NetworkStruct< T >::stations, line::ctmc::CtmcGenerator< T >::sync, and line::NelderMeadResult< T >::x.
Referenced by infer_minps(), and infer_mlps().
| ChainAggregationResult< T > line::api::sn_aggregate_chains | ( | const qn::NetworkStruct< T > & | sn, |
| const std::string & | suffix = std::string() ) |
Collapse every chain onto one class, port of ModelAdapter.aggregateChains.
| sn | a REFRESHED model (the chains, rt and the rates are read) |
| suffix | appended to each chain class name, as the reference's argument |
Definition at line 148 of file sn_aggregate_chains.h.
References line::qn::Network< T >::add_closed_class(), line::qn::Network< T >::add_delay(), line::qn::Network< T >::add_open_class(), line::qn::Network< T >::add_queue(), line::qn::Network< T >::add_router(), line::qn::Network< T >::add_sink(), line::qn::Network< T >::add_source(), line::api::ChainAggregationResult< T >::alpha, line::mva::ChainDemands< T >::alpha, line::qn::Station< T >::cap, line::api::ChainAggregationResult< T >::chainclass, line::Matrix< T >::cols(), line::api::ChainAggregationResult< T >::deagg, line::lang::Distrib< T >::det(), line::lang::Distrib< T >::disabled_dist(), line::lang::Distrib< T >::erlang(), line::lang::Distrib< T >::exp_mean(), line::lang::Distrib< T >::exp_rate(), line::lang::GlobalConstants::FineTol, line::lang::Distrib< T >::hyperexp(), line::lang::hyperexp_fit_mean_scv(), line::InputError::InputError(), line::mva::ChainDemands< T >::Lchain, line::qn::Network< T >::link(), line::Matrix< T >::Matrix(), line::qn::NodeDef::name, line::mva::ChainDemands< T >::Nchain, line::lang::node_type_to_text(), line::qn::NodeDef::nodetype, line::qn::Station< T >::nservers, line::lang::Distrib< T >::params, line::qn::Network< T >::raw_struct(), line::mva::ChainDemands< T >::refstatchain, line::Matrix< T >::rows(), line::qn::Station< T >::sched, line::mva::ChainDemands< T >::SCVchain, line::qn::RoutingMatrix< T >::set(), line::qn::Network< T >::set_arrival(), line::qn::Network< T >::set_capacity(), line::qn::Network< T >::set_number_of_servers(), line::qn::Network< T >::set_service(), sn_aggregate_chains(), line::mva::sn_get_demands_chain(), line::qn::NodeDef::station, line::api::ChainAggregationResult< T >::stationnode, line::mva::ChainDemands< T >::STchain, line::UnsupportedError::UnsupportedError(), and line::mva::ChainDemands< T >::Vchain.
Referenced by sn_aggregate_chains(), line::tr::transform_solve_chains(), and line::tr::transform_solve_lc().
| ArrivalRateFun< T > line::api::sn_arrival_rate_fun | ( | const qn::NetworkStruct< T > & | sn, |
| std::size_t | ist, | ||
| std::size_t | r ) |
Build lambda(t) for station ist (0-based), class r.
Definition at line 54 of file sn_arrival_rate_fun.h.
References line::Matrix< T >::cols(), line::mam::Map< T >::D0, line::mam::Map< T >::D1, line::lang::Distrib< T >::has_schedule(), line::api::ArrivalRateFun< T >::lambda, line::mam::map_pie(), line::api::ArrivalRateFun< T >::period, line::Matrix< T >::rows(), line::lang::Distrib< T >::sched_bp, line::lang::Distrib< T >::sched_cyclic, line::lang::Distrib< T >::sched_D0, line::lang::Distrib< T >::sched_D1, sn_arrival_rate_fun(), and line::api::ArrivalRateFun< T >::timeVarying.
Referenced by sn_arrival_rate_fun(), and line::fluid::solver_fluid_qsys().
| T line::api::sn_compat_peak | ( | const std::vector< double > & | counts, |
| const std::vector< T > & | rates ) |
Rate with every pool active: sum_t counts(t)*rates(t).
Normalizes U = T*S/peak.
Definition at line 103 of file sn_compat_rate.h.
References line::InputError::InputError(), and sn_compat_peak().
Referenced by sn_compat_peak(), and sn_compat_scaling().
| T line::api::sn_compat_rate | ( | const Matrix< T > & | compat, |
| const std::vector< double > & | counts, | ||
| const std::vector< T > & | rates, | ||
| const std::vector< T > & | n ) |
Rate cleared by the pools when the operands in n are present.
| compat | (npools x noperands), nonzero where the pool may serve |
| counts | (npools) servers held by each pool |
| rates | (npools) per-server rate of each pool |
| n | (noperands) per-operand population, integer or fractional |
Definition at line 77 of file sn_compat_rate.h.
References line::Matrix< T >::cols(), line::InputError::InputError(), line::Matrix< T >::rows(), and sn_compat_rate().
Referenced by sn_compat_rate(), and sn_compat_scaling().
| T line::api::sn_compat_scaling | ( | const Matrix< T > & | compat, |
| const std::vector< double > & | counts, | ||
| const std::vector< T > & | rates, | ||
| const std::vector< T > & | n ) |
Rate scaling eta(n) a compatibility declaration imposes on its station.
This is what SolverLN carries onto the layer station, and it is NOT sn_compat_rate / sn_compat_peak. The denominator is the rate the SAME population would obtain under FULL compatibility,
eta(n) = mu(n) / (peak * min(1, sum_j n(j)))
so eta isolates the effect of the compatibility GRAPH and nothing else. The denominator DAMPS BY OCCUPANCY RELATIVE TO THE SERVER COUNT, min(1, N/S), because that is what the solver's own multiserver term contributes: it applies min(N,S) servers at the average server rate peak/S, so
min(N,S) * (peak/S) * eta(n) = mu(n)
and the station clears the activated-server rate exactly, at every state. Damping by min(1, N) instead – which this did until 2026-08-28 – left the effective law at min(N,S)/S * mu(n) and cancelled the REDUNDANCY SPEED-UP the activated-server law exists to express: a pool of S servers facing one compatible job clears S, not 1, because every one works on it and the first to finish cancels the rest. eta is therefore above one at low occupancy, which is the speed-up of servers that would otherwise be idle.
Definition at line 138 of file sn_compat_rate.h.
References sn_compat_peak(), sn_compat_rate(), and sn_compat_scaling().
Referenced by sn_compat_scaling().
| Matrix< T > line::api::sn_declared_marginal | ( | const qn::NetworkStruct< T > & | sn | ) |
The (nstations x nclasses) per-class job counts of the model's OWN state.
This is what the reference reads as State.toMarginal(sn, ist, state{isf}) inside every getProb* getter, and it is a DECLARED quantity rather than a derived one: setState and initFromMarginal put the jobs where the caller asked, and the probability of "the model's state" is the probability of that placement. The writers emit the row as a one-row stateSpace with a [1] statePrior and the reader stores the pair, so it reaches here.
A STATION THAT DECLARES NOTHING FALLS BACK TO THE DEFAULT MARKING – every closed class's jobs at its reference station – which is what initDefault would have put there, so a model that was never initialized answers exactly as it did before any of this existed. The fallback is per station and not all-or-nothing, matching the reference, where setState on one node leaves the others at whatever they held.
Definition at line 85 of file sn_state.h.
References sn_declared_marginal(), and line::qn::to_marginal_aggr().
Referenced by line::jmt::jmt_prob_aggr(), and sn_declared_marginal().
| void line::api::sn_fj_nodevisits_mmt | ( | qn::NetworkStruct< T > & | sn | ) |
Rewrite sn.nodevisits with the MMT correction.
A no-op on a model with no fork-join pair, on a tag-augmented struct, and whenever the transformation grows no auxiliary class.
Definition at line 65 of file sn_fj_nodevisits_mmt.h.
References line::mva::fj_mmt(), line::qn::NetworkStruct< T >::inchain, line::qn::NetworkStruct< T >::nchains, line::qn::NetworkStruct< T >::nodes, line::qn::NetworkStruct< T >::nodevisits, and sn_fj_nodevisits_mmt().
Referenced by line::qn::Network< double >::get_struct(), and sn_fj_nodevisits_mmt().
| std::vector< Matrix< T > > line::api::sn_fj_visits_spn | ( | const qn::NetworkStruct< T > & | sn | ) |
Per-chain fork-join node visit ratios.
Definition at line 230 of file sn_fj_visits_spn.h.
References line::api::FjSpnStructure::B, fj_spn_structure(), line::api::FjSpnStructure::inRegion, sn_fj_visits_spn(), and line::api::FjSpnStructure::stationNodes.
Referenced by sn_fj_visits_spn().
| Matrix< T > line::api::sn_get_node_arvr_from_tput | ( | const qn::NetworkStruct< T > & | sn, |
| const Matrix< T > & | TN, | ||
| const Matrix< T > & | AN ) |
Port of sn_get_node_arvr_from_tput.
AN is the STATION arrival-rate table (sn_get_arvr_from_tput). Stations copy their own row; every other node takes the chain's reference throughput scaled by its node visits.
Definition at line 152 of file sn_node_metrics.h.
References line::Matrix< T >::rows(), and sn_get_node_arvr_from_tput().
Referenced by line::solvers::node_metrics(), and sn_get_node_arvr_from_tput().
| Matrix< T > line::api::sn_get_node_tput_from_tput | ( | const qn::NetworkStruct< T > & | sn, |
| const Matrix< T > & | TN, | ||
| const Matrix< T > & | ANn, | ||
| const std::map< std::size_t, CacheActualProb< T > > & | cache_prob = std::map<std::size_t, CacheActualProb<T>>() ) |
Port of sn_get_node_tput_from_tput.
Three passes, in the reference's order. A Cache node first splits the arriving flow into its hit and miss classes; every station then overwrites its own node row with its station throughput; finally every non-station node that is not a Sink accumulates what sn.rtnodes carries out of it.
cache_prob maps a 1-based Cache NODE index to its converged split; an absent or empty entry selects the visit-ratio branch.
Definition at line 203 of file sn_node_metrics.h.
References line::Matrix< T >::rows(), and sn_get_node_tput_from_tput().
Referenced by line::solvers::node_metrics(), and sn_get_node_tput_from_tput().
| std::vector< std::pair< T, std::vector< T > > > line::api::sn_get_state_aggr | ( | const qn::NetworkStruct< T > & | sn, |
| const std::vector< std::vector< T > > & | state ) |
Port of sn_get_state_aggr: the per-class job counts of each stateful node's state row, with the phase and buffer encoding aggregated away.
| state | state[isf] is the row of the (isf+1)-th stateful node |
Definition at line 56 of file sn_state.h.
References sn_get_state_aggr(), and line::qn::to_marginal_aggr().
Referenced by sn_get_state_aggr().
| bool line::api::sn_has_blocking | ( | const qn::NetworkStruct< T > & | sn | ) |
Defined below, after sn_is_mm1k_loss, which it exempts.
Port of sn_has_blocking: some station can REFUSE a job.
Either its own buffer binds – Kendall's K below the population that can reach it, whatever the drop rule (WAITQ, DROP, BAS, BBS, RSRD) – or a finite capacity region caps a set of stations jointly. Such a network is not product form: the truncation couples the station occupancies, so no BCMP factorization of the equilibrium distribution exists.
Only a buffer that can actually BIND counts, which is what sn_get_buffer_size decides; refresh_capacity derives a finite classcap (the chain population) at every station of every closed model, so a plain finiteness test would call every closed model blocking.
A Cache is exempt: it builds its own capped retrieval queues (classcap 1), which the cache analyzers solve rather than treat as a buffer constraint. So is the single-station M/M/1/K loss system, whose truncated geometric distribution is a product form over its one station.
Definition at line 562 of file sn_predicates.h.
References sn_has_blocking().
Referenced by line::ba::ba_bounds(), line::ba::blocking_default(), line::ba::list_valid_methods(), sn_has_blocking(), sn_has_product_form(), and line::ba::solver_ba_run_analyzer().
| bool line::api::sn_has_bursty_arrival | ( | const qn::NetworkStruct< T > & | sn | ) |
Definition at line 35 of file sn_has_bursty_arrival.h.
References line::lang::Distrib< T >::D0, line::mam::Map< T >::D0, line::lang::Distrib< T >::D1, line::mam::Map< T >::D1, line::lang::Distrib< T >::disabled, line::lang::Distrib< T >::has_map(), line::mam::map_pie(), and sn_has_bursty_arrival().
Referenced by line::mva::mva_dispatch(), line::mva::resolve_method(), and sn_has_bursty_arrival().
| bool line::api::sn_has_class_switching | ( | const qn::NetworkStruct< T > & | sn | ) |
Definition at line 204 of file sn_predicates.h.
References sn_has_class_switching().
Referenced by sn_has_class_switching().
| bool line::api::sn_has_classdep_routing | ( | const qn::NetworkStruct< T > & | sn | ) |
Definition at line 39 of file sn_has_classdep_routing.h.
References line::qn::GlobalConstants::FineTol, and sn_has_classdep_routing().
Referenced by sn_has_classdep_routing().
| bool line::api::sn_has_closed_classes | ( | const qn::NetworkStruct< T > & | sn | ) |
Definition at line 168 of file sn_predicates.h.
References sn_has_closed_classes().
Referenced by sn_has_closed_classes(), and sn_has_mixed_classes().
| bool line::api::sn_has_dps | ( | const qn::NetworkStruct< T > & | sn | ) |
| bool line::api::sn_has_dps_prio | ( | const qn::NetworkStruct< T > & | sn | ) |
Definition at line 64 of file sn_predicates.h.
References sn_has_dps_prio().
Referenced by sn_has_dps_prio().
| bool line::api::sn_has_fcfs | ( | const qn::NetworkStruct< T > & | sn | ) |
Definition at line 68 of file sn_predicates.h.
References sn_has_fcfs().
Referenced by sn_has_fcfs().
| bool line::api::sn_has_fork_join | ( | const qn::NetworkStruct< T > & | sn | ) |
any(sn.fj(:) > 0): the model has a Fork closed by a Join.
sn.fj is the (fork, join) pair list here, so non-empty is the predicate. It is populated on the UN-augmented struct too, exactly as MATLAB's fj matrix is, so this agrees with the reference before and after fj_tag.
Definition at line 271 of file sn_predicates.h.
References sn_has_fork_join().
Referenced by sn_has_fork_join(), sn_has_product_form(), sn_has_product_form_not_het_fcfs(), and sn_is_population_model().
| bool line::api::sn_has_fractional_populations | ( | const qn::NetworkStruct< T > & | sn | ) |
any(sn.njobs ~= round(sn.njobs)); an infinite population rounds to itself.
Definition at line 247 of file sn_predicates.h.
References sn_has_fractional_populations().
Referenced by sn_has_fractional_populations().
| bool line::api::sn_has_gps | ( | const qn::NetworkStruct< T > & | sn | ) |
| bool line::api::sn_has_gps_prio | ( | const qn::NetworkStruct< T > & | sn | ) |
Definition at line 76 of file sn_predicates.h.
References sn_has_gps_prio().
Referenced by sn_has_gps_prio().
| bool line::api::sn_has_hol | ( | const qn::NetworkStruct< T > & | sn | ) |
| bool line::api::sn_has_homogeneous_scheduling | ( | const qn::NetworkStruct< T > & | sn, |
| qn::SchedStrategy | ) |
Port of sn_has_homogeneous_scheduling.
The reference is length(findstring(sn.sched, strategy)) == sn.nstations, and findstring compares STRINGS: against the numeric sched vector its strcmp is false everywhere, so it returns the sentinel -1, whose length is 1. The predicate therefore reduces to nstations == 1 whatever the disciplines are. Reproduced and not corrected: this is the branch every codebase takes.
Definition at line 154 of file sn_predicates.h.
References sn_has_homogeneous_scheduling().
Referenced by sn_has_homogeneous_scheduling().
| bool line::api::sn_has_inf | ( | const qn::NetworkStruct< T > & | sn | ) |
| bool line::api::sn_has_lcfs | ( | const qn::NetworkStruct< T > & | sn | ) |
Definition at line 88 of file sn_predicates.h.
References sn_has_lcfs().
Referenced by sn_has_lcfs().
| bool line::api::sn_has_lcfs_pi | ( | const qn::NetworkStruct< T > & | sn | ) |
Definition at line 92 of file sn_predicates.h.
References sn_has_lcfs_pi().
Referenced by sn_has_lcfs_pi().
| bool line::api::sn_has_lcfs_pr | ( | const qn::NetworkStruct< T > & | sn | ) |
Definition at line 96 of file sn_predicates.h.
References sn_has_lcfs_pr().
Referenced by sn_has_lcfs_pr().
| bool line::api::sn_has_lept | ( | const qn::NetworkStruct< T > & | sn | ) |
Definition at line 100 of file sn_predicates.h.
References sn_has_lept().
Referenced by sn_has_lept().
| bool line::api::sn_has_ljf | ( | const qn::NetworkStruct< T > & | sn | ) |
Definition at line 104 of file sn_predicates.h.
References sn_has_ljf().
Referenced by sn_has_ljf().
| bool line::api::sn_has_load_dependence | ( | const qn::NetworkStruct< T > & | sn | ) |
size(sn.lldscaling,2)>0: some station carries a limited-load scaling row.
Definition at line 257 of file sn_predicates.h.
References sn_has_load_dependence().
Referenced by sn_has_load_dependence().
| bool line::api::sn_has_lps | ( | const qn::NetworkStruct< T > & | sn | ) |
Definition at line 108 of file sn_predicates.h.
References sn_has_lps().
Referenced by sn_has_lps().
| bool line::api::sn_has_mixed_classes | ( | const qn::NetworkStruct< T > & | sn | ) |
Definition at line 183 of file sn_predicates.h.
References sn_has_closed_classes(), sn_has_mixed_classes(), and sn_has_open_classes().
Referenced by sn_has_mixed_classes(), and sn_is_mixed_model().
| bool line::api::sn_has_multi_chain | ( | const qn::NetworkStruct< T > & | sn | ) |
Definition at line 188 of file sn_predicates.h.
References sn_has_multi_chain().
Referenced by sn_has_multi_chain().
| bool line::api::sn_has_multi_class | ( | const qn::NetworkStruct< T > & | sn | ) |
Definition at line 196 of file sn_predicates.h.
References sn_has_multi_class().
Referenced by sn_has_multi_class().
| bool line::api::sn_has_multi_class_fcfs | ( | const qn::NetworkStruct< T > & | sn | ) |
sum(sn.rates(i,:)>0)>1 at some FCFS station: more than one class is served there.
Definition at line 298 of file sn_predicates.h.
References sn_has_multi_class_fcfs().
Referenced by sn_has_multi_class_fcfs().
| bool line::api::sn_has_multi_class_heter_exp_fcfs | ( | const qn::NetworkStruct< T > & | sn | ) |
An FCFS station with heterogeneous rates whose SCVs are all one (exponential).
Definition at line 346 of file sn_predicates.h.
References line::qn::GlobalConstants::FineTol, and sn_has_multi_class_heter_exp_fcfs().
Referenced by sn_has_multi_class_heter_exp_fcfs().
| bool line::api::sn_has_multi_class_heter_fcfs | ( | const qn::NetworkStruct< T > & | sn | ) |
sn_has_multi_class_heter_fcfs: an FCFS station whose per-class rates differ.
MATLAB filters the row with isfinite(rates) & ~isnan(rates), which drops BOTH the NaN of a disabled pair and the Inf of an Immediate service. The disabled flag covers the first; the isfinite test below covers the second, without which an Immediate-served class would make every FCFS station look heterogeneous and take product form away from the model.
Definition at line 322 of file sn_predicates.h.
References sn_has_multi_class_heter_fcfs().
Referenced by sn_has_multi_class_heter_fcfs(), and sn_has_product_form().
| bool line::api::sn_has_multi_server | ( | const qn::NetworkStruct< T > & | sn | ) |
Definition at line 239 of file sn_predicates.h.
References sn_has_multi_server().
Referenced by sn_has_multi_server().
| bool line::api::sn_has_multiple_closed_classes | ( | const qn::NetworkStruct< T > & | sn | ) |
Definition at line 175 of file sn_predicates.h.
References sn_has_multiple_closed_classes().
Referenced by sn_has_multiple_closed_classes().
| bool line::api::sn_has_nonmarkov | ( | const qn::NetworkStruct< T > & | sn, |
| bool | preserve_det = false ) |
Whether any law in the struct would be replaced, so a caller can skip copying the struct when there is nothing to convert.
| sn | the struct to inspect |
| preserve_det | leave Det alone, as the MAM analyzer does |
Definition at line 334 of file sn_nonmarkov_toph.h.
References line::lang::Distrib< T >::disabled, line::qn::TransitionParam< T >::firingproc, line::lang::Distrib< T >::is_prior(), sn_has_nonmarkov(), and line::lang::Distrib< T >::type.
Referenced by sn_has_nonmarkov(), line::ag::solver_ag_solve(), line::ctmc::solver_ctmc_analyzer(), line::fluid::solver_fluid(), line::mam::solver_mam_get_cdf_respt(), and line::mam::solver_mam_solve().
| bool line::api::sn_has_open_classes | ( | const qn::NetworkStruct< T > & | sn | ) |
Definition at line 161 of file sn_predicates.h.
References sn_has_open_classes().
Referenced by sn_has_mixed_classes(), and sn_has_open_classes().
| bool line::api::sn_has_polling | ( | const qn::NetworkStruct< T > & | sn | ) |
Definition at line 112 of file sn_predicates.h.
References sn_has_polling().
Referenced by sn_has_polling().
| bool line::api::sn_has_priorities | ( | const qn::NetworkStruct< T > & | sn | ) |
Definition at line 232 of file sn_predicates.h.
References sn_has_priorities().
Referenced by sn_has_priorities(), sn_has_product_form(), sn_has_product_form_not_het_fcfs(), and sn_is_population_model().
| bool line::api::sn_has_product_form | ( | const qn::NetworkStruct< T > & | sn | ) |
Port of sn_has_product_form.
NOTE. NetworkStruct::has_product_form omits the fork-join and the state-dependent-routing conjuncts the reference carries, so it answers TRUE on a model with a surviving Fork or a round-robin dispatcher. That is not a cosmetic difference: the predicate gates exact MVA, the NC convolution and the AUTO solver tree, so the omission silently hands a non-product-form model to an exact algorithm. This free function is the reference-faithful one and callers in the api layer must use it.
Definition at line 413 of file sn_predicates.h.
References sn_has_blocking(), sn_has_fork_join(), sn_has_multi_class_heter_fcfs(), sn_has_priorities(), sn_has_product_form(), sn_has_sd_routing(), and sn_sched_is_product_form().
Referenced by sn_has_product_form().
| bool line::api::sn_has_product_form_not_het_fcfs | ( | const qn::NetworkStruct< T > & | sn, |
| bool | check_means = true ) |
Port of sn_has_product_form_not_het_fcfs: LCFS is out, and every enabled FCFS pair with a finite positive SCV must have that SCV equal to one, with the service means agreeing across the classes served there.
CHECK_MEANS drops that second half; pass false only for an algorithm that models class-dependent FCFS itself (ab, schmidt, schmidt-ext).
Definition at line 432 of file sn_predicates.h.
References line::qn::GlobalConstants::CoarseTol, line::qn::GlobalConstants::FineTol, sn_has_fork_join(), sn_has_priorities(), sn_has_product_form_not_het_fcfs(), sn_has_sd_routing(), and line::qn::GlobalConstants::Zero.
Referenced by sn_has_product_form_not_het_fcfs().
| bool line::api::sn_has_ps | ( | const qn::NetworkStruct< T > & | sn | ) |
| bool line::api::sn_has_ps_prio | ( | const qn::NetworkStruct< T > & | sn | ) |
Definition at line 120 of file sn_predicates.h.
References sn_has_ps_prio().
Referenced by sn_has_ps_prio().
| bool line::api::sn_has_sd_routing | ( | const qn::NetworkStruct< T > & | sn | ) |
sn_has_sd_routing: some node dispatches on the STATE of the network.
RROBIN, WRROBIN, JSQ and SQ. RROBIN matters even though the refresh spreads its probabilities uniformly: the uniform matrix is the right MEAN and the wrong higher moments, so a round-robin model is not product form and must not be handed to exact MVA or to the convolution algorithm.
Definition at line 284 of file sn_predicates.h.
References sn_has_sd_routing().
Referenced by sn_has_product_form(), sn_has_product_form_not_het_fcfs(), and sn_has_sd_routing().
| bool line::api::sn_has_sept | ( | const qn::NetworkStruct< T > & | sn | ) |
Definition at line 124 of file sn_predicates.h.
References sn_has_sept().
Referenced by sn_has_sept().
| bool line::api::sn_has_setf | ( | const qn::NetworkStruct< T > & | sn | ) |
Definition at line 128 of file sn_predicates.h.
References sn_has_setf().
Referenced by sn_has_setf().
| bool line::api::sn_has_single_chain | ( | const qn::NetworkStruct< T > & | sn | ) |
Definition at line 192 of file sn_predicates.h.
References sn_has_single_chain().
Referenced by sn_has_single_chain().
| bool line::api::sn_has_single_class | ( | const qn::NetworkStruct< T > & | sn | ) |
Definition at line 200 of file sn_predicates.h.
References sn_has_single_class().
Referenced by sn_has_single_class().
| bool line::api::sn_has_siro | ( | const qn::NetworkStruct< T > & | sn | ) |
Definition at line 132 of file sn_predicates.h.
References sn_has_siro().
Referenced by sn_has_siro().
| bool line::api::sn_has_sjf | ( | const qn::NetworkStruct< T > & | sn | ) |
Definition at line 136 of file sn_predicates.h.
References sn_has_sjf().
Referenced by sn_has_sjf().
| bool line::api::sn_has_srpt | ( | const qn::NetworkStruct< T > & | sn | ) |
Definition at line 140 of file sn_predicates.h.
References sn_has_srpt().
Referenced by sn_has_srpt().
| bool line::api::sn_is_bas_model | ( | const qn::NetworkStruct< T > & | sn | ) |
sn_is_bas_model: a single-class closed model with blocking-after-service.
Definition at line 515 of file sn_predicates.h.
References sn_is_bas_model().
Referenced by sn_is_bas_model().
| bool line::api::sn_is_closed_model | ( | const qn::NetworkStruct< T > & | sn | ) |
all(isfinite(sn.njobs)): EVERY class is closed.
Definition at line 218 of file sn_predicates.h.
References sn_is_closed_model().
Referenced by sn_is_closed_model().
| bool line::api::sn_is_discrete_time | ( | const qn::NetworkStruct< T > & | sn, |
| const DiscreteTimeOptions & | options, | ||
| double * | slot_length, | ||
| DiscreteTimeInfo * | info ) |
True when every law of sn is lattice-valued on slot_length.
slot_length receives the slot in model time units and info the diagnosis. A DMAP mixed with continuous laws is an ERROR rather than a false: its (D0,D1) are probability matrices, so the continuous machinery would form inv(-D0) where the law needs inv(I-D0) and return a wrong number in silence.
Definition at line 83 of file sn_is_discrete_time.h.
References line::api::DiscreteTimeInfo::has_continuous, line::api::DiscreteTimeInfo::has_dmap, line::api::DiscreteTimeInfo::has_lattice, line::InputError::InputError(), line::api::DiscreteTimeInfo::mixed, line::api::DiscreteTimeInfo::reason, line::api::DiscreteTimeOptions::slotlength, sn_is_discrete_time(), and line::api::DiscreteTimeOptions::timescale.
Referenced by line::mam::mam_dispatch(), sn_is_discrete_time(), and line::mam::solver_mam_solve().
| bool line::api::sn_is_mixed_model | ( | const qn::NetworkStruct< T > & | sn | ) |
Definition at line 225 of file sn_predicates.h.
References sn_has_mixed_classes(), and sn_is_mixed_model().
Referenced by sn_is_mixed_model().
| bool line::api::sn_is_mm1k_loss | ( | const qn::NetworkStruct< T > & | sn | ) |
sn_is_mm1k_loss: the three-node Source/Queue/Sink model of an M/M/1/K with loss, the shape MVA answers in closed form instead of iterating.
Definition at line 538 of file sn_predicates.h.
References sn_is_mm1k_loss().
Referenced by sn_is_mm1k_loss().
| bool line::api::sn_is_open_model | ( | const qn::NetworkStruct< T > & | sn | ) |
all(isinf(sn.njobs)): EVERY class is open, which a mixed model fails.
Definition at line 210 of file sn_predicates.h.
References sn_is_open_model().
Referenced by line::fes::fes_validate(), and sn_is_open_model().
| bool line::api::sn_is_phasetype | ( | const std::vector< Matrix< T > > & | maps | ) |
Definition at line 86 of file sn_is_phasetype.h.
References sn_is_phasetype().
| bool line::api::sn_is_phasetype | ( | const std::vector< Matrix< T > > & | maps, |
| const std::vector< T > & | pie ) |
Whether a (D0, D1, ...) list is a valid phase-type / MAP representation.
| maps | the (D0, D1, ...) blocks |
| pie | the entry vector, empty when there is none to check |
Definition at line 47 of file sn_is_phasetype.h.
References line::Matrix< T >::cols(), line::Matrix< T >::rows(), sn_is_phasetype(), and line::lang::GlobalConstants::Zero.
Referenced by sn_is_phasetype(), and sn_is_phasetype().
| bool line::api::sn_is_population_model | ( | const qn::NetworkStruct< T > & | sn | ) |
sn_is_population_model: every station is population dependent only, which is what lets the fluid and mean-field limits close on the queue lengths.
Definition at line 499 of file sn_predicates.h.
References sn_has_fork_join(), sn_has_priorities(), and sn_is_population_model().
Referenced by sn_is_population_model().
| bool line::api::sn_is_state_valid | ( | const qn::NetworkStruct< T > & | sn, |
| const std::vector< std::vector< T > > & | state ) |
Port of sn_is_state_valid: form the station marginals of state and test them.
A station whose row carries several candidate states is answered on its FIRST row, which is what the reference does after warning: a validity question about a set of states has no single answer.
Definition at line 196 of file sn_state.h.
References line::qn::RowLayout< T >::K, line::qn::RowLayout< T >::Ks, line::qn::Marginal< T >::nir, line::qn::RowLayout< T >::nvar, line::qn::row_layout(), line::qn::Marginal< T >::sir, sn_is_state_valid(), sn_state_counts_valid(), and line::qn::to_marginal().
Referenced by sn_is_state_valid().
| std::vector< SnMapModulation< T > > line::api::sn_map_modulation | ( | const qn::NetworkStruct< T > & | sn | ) |
Definition at line 73 of file sn_map_modulation.h.
References line::api::SnMapModulation< T >::arrival, line::api::SnMapModulation< T >::classes, line::api::SnMapModulation< T >::D0, line::lang::Distrib< T >::D0, line::api::SnMapModulation< T >::D1, line::lang::Distrib< T >::D1, line::lang::Distrib< T >::disabled, line::lang::Distrib< T >::Dmark, line::InputError::InputError(), line::api::SnMapModulation< T >::is_mmpp, line::api::SnMapModulation< T >::ist, line::lang::MAP, line::lang::MMAP, line::lang::MMPP2, line::api::SnMapModulation< T >::node, line::api::SnMapModulation< T >::order, and sn_map_modulation().
Referenced by line::io::map2renv(), and sn_map_modulation().
| void line::api::sn_nonmarkov_toph | ( | qn::NetworkStruct< T > & | sn, |
| const NonmarkovOptions & | opts = NonmarkovOptions() ) |
Replace every non-Markovian service and firing law by a Markovian surrogate.
| sn | the struct to convert IN PLACE; callers pass their own copy |
| opts | the conversion method, order and fit family |
Definition at line 372 of file sn_nonmarkov_toph.h.
References Cme, line::lang::Distrib< T >::disabled, line::qn::TransitionParam< T >::firingphases, line::qn::TransitionParam< T >::firingproc, Hyperexp, line::InputError::InputError(), line::lang::Distrib< T >::is_prior(), line::mam::map_bernstein(), line::mam::map_erlang(), line::mam::map_scale(), line::lang::Distrib< T >::mean, line::mam::Map< T >::order(), line::lang::Distrib< T >::scv, sn_nonmarkov_toph(), and line::lang::Distrib< T >::type.
Referenced by sn_nonmarkov_toph(), line::ag::solver_ag_solve(), line::ctmc::solver_ctmc_analyzer(), line::fluid::solver_fluid(), line::mam::solver_mam_get_cdf_respt(), and line::mam::solver_mam_solve().
| OpenProbTerm< T > line::api::sn_open_prob_terms | ( | const qn::NetworkStruct< T > & | sn, |
| const Matrix< T > & | Q, | ||
| const Matrix< T > & | U, | ||
| const Matrix< T > & | nir, | ||
| std::size_t | ist ) |
Open-class contribution to an aggregate state probability at one station.
| sn | the network struct |
| Q | mean queue lengths, stations by classes |
| U | utilizations, stations by classes |
| nir | per-class job counts, stations by classes (row ist is read) |
| ist | 0-based station index |
Definition at line 67 of file sn_open_prob_terms.h.
References line::api::OpenProbTerm< T >::feasible, line::InputError::InputError(), line::api::OpenProbTerm< T >::logp, and sn_open_prob_terms().
Referenced by sn_open_prob_terms(), line::mva::solver_mva_get_prob_aggr(), and line::mva::solver_mva_get_prob_sys_aggr().
| PatienceHandles< T > line::api::sn_patience_handles | ( | const qn::NetworkStruct< T > & | sn, |
| std::size_t | ist, | ||
| std::size_t | r ) |
Build the patience handles of station ist (0-based), class r.
Returns a handle set with present == false when the pair declares no reneging patience.
Definition at line 73 of file sn_patience_handles.h.
References line::api::PatienceHandles< T >::ccdf, line::lang::dist_to_map(), line::lang::EXP, line::api::PatienceHandles< T >::hazard, line::qn::Station< T >::impatience, line::api::PatienceHandles< T >::isExponential, line::mam::map_cdf(), line::mam::map_pdf(), line::api::PatienceHandles< T >::mean, line::lang::Distrib< T >::mean, line::qn::Station< T >::patience, line::api::PatienceHandles< T >::pdf, line::api::PatienceHandles< T >::present, line::api::PatienceHandles< T >::rate, line::lang::RENEGING, sn_patience_handles(), and line::lang::Distrib< T >::type.
Referenced by line::mva::list_valid_methods(), line::mva::resolve_method(), sn_patience_handles(), line::fluid::solver_fluid_qsys(), and line::mva::solver_mva_qsys_analyzer().
| SnPnAvgRates< T > line::api::sn_pn_avg_rates | ( | const qn::NetworkStruct< T > & | sn, |
| const Matrix< T > & | QN, | ||
| const Matrix< T > & | TN, | ||
| const Matrix< T > & | AN, | ||
| const Matrix< T > & | RN ) |
Port of sn_pn_avg_rates: rewrite the place rows of TN, AN and RN so that they agree with the recovered mode firing rates.
A place's throughput becomes the rate its tokens are CONSUMED at, its arrival rate the rate they are PRODUCED at, and its response time the quotient the queue length and that throughput define. A model with no Place node, or one whose firing rates could not be recovered, is returned untouched.
Definition at line 225 of file sn_pn_firing_rates.h.
References line::api::SnPnAvgRates< T >::AN, line::api::SnPnFiringRates::consumed, line::api::SnPnFiringRates::place_nodes, line::api::SnPnFiringRates::produced, line::api::SnPnAvgRates< T >::RN, line::Matrix< T >::rows(), sn_pn_avg_rates(), sn_pn_firing_rates(), line::api::SnPnAvgRates< T >::TN, and line::api::SnPnFiringRates::x.
Referenced by sn_pn_avg_rates().
| SnPnFiringRates line::api::sn_pn_firing_rates | ( | const qn::NetworkStruct< T > & | sn, |
| const Matrix< T > & | TN, | ||
| bool | tput_is_tokens ) |
Ports of matlab/src/api/sn/sn_pn_firing_rates.m and sn_pn_avg_rates.m.
| TN | station throughput table, (nstations x nclasses) |
| tput_is_tokens | whether TN counts tokens (true) or firings (false) |
Definition at line 82 of file sn_pn_firing_rates.h.
References line::Matrix< T >::cols(), line::api::SnPnFiringRates::consumed, line::qn::TransitionParam< T >::enabling, line::qn::TransitionParam< T >::firing, line::lang::IMMEDIATE, line::api::SnPnFiringRates::nclasses, line::pinv(), line::api::SnPnFiringRates::place_nodes, line::api::SnPnFiringRates::produced, line::Matrix< T >::rows(), sn_pn_firing_rates(), and line::api::SnPnFiringRates::x.
Referenced by sn_pn_avg_rates(), and sn_pn_firing_rates().
| std::string line::api::sn_print | ( | const qn::NetworkStruct< T > & | sn | ) |
The full field: value dump of a NetworkStruct, ending with a newline.
Definition at line 102 of file sn_print.h.
References line::lang::Distrib< T >::disabled, line::lang::Distrib< T >::mean, line::lang::node_type_to_text(), line::lang::process_to_text(), line::lang::sched_to_text(), line::lang::Distrib< T >::scv, sn_print(), and line::lang::Distrib< T >::type.
Referenced by sn_print().
| std::string line::api::sn_print_routing_matrix | ( | const qn::NetworkStruct< T > & | sn, |
| std::size_t | onlyclass = 0 ) |
The human-readable form of sn.rtnodes: one line per positive (node, class) to (node, class) edge.
| onlyclass | 1-based class index to restrict to, 0 for every class. The reference matches on the class NAME and keeps an edge when EITHER end names it, which is what the index test below reproduces. |
Definition at line 47 of file sn_print_routing_matrix.h.
References sn_print_routing_matrix().
Referenced by sn_print_routing_matrix().
| void line::api::sn_refresh_process_fields | ( | qn::NetworkStruct< T > & | sn, |
| std::size_t | ist, | ||
| std::size_t | r ) |
Port of sn_refresh_process_fields: rebuild sn.service[ist][r] from the (rate, SCV) pair currently in sn.rates and sn.scv.
Indices are 1-based, as everywhere in this api layer.
Definition at line 58 of file sn_setters.h.
References line::lang::Distrib< T >::D0, line::mam::Map< T >::D0, line::lang::Distrib< T >::D1, line::mam::Map< T >::D1, line::lang::Distrib< T >::disabled, line::lang::ERLANG, line::lang::EXP, line::lang::HYPEREXP, line::mam::map_erlang(), line::mam::map_exponential(), line::mam::map_hyperexp(), line::lang::Distrib< T >::mean, line::lang::Distrib< T >::scv, sn_refresh_process_fields(), and line::lang::Distrib< T >::type.
Referenced by sn_refresh_process_fields(), sn_set_service(), and sn_set_service_batch().
| std::vector< std::size_t > line::api::sn_region_member_list | ( | const qn::NetworkStruct< T > & | sn, |
| std::size_t | f ) |
The same membership as 1-based station indices, the form most callers want.
Definition at line 66 of file sn_region_members.h.
References sn_region_member_list(), and sn_region_members().
Referenced by sn_region_member_list().
| std::vector< bool > line::api::sn_region_members | ( | const qn::NetworkStruct< T > & | sn, |
| std::size_t | f ) |
The membership mask of region f (0-based), one entry per station.
Returns an empty mask when the model declares no such region, which is the reference's behaviour of leaving mask empty rather than raising.
Definition at line 41 of file sn_region_members.h.
References line::qn::NetworkStruct< T >::Region::cap, line::qn::NetworkStruct< T >::Region::maxmem, line::qn::NetworkStruct< T >::Region::members, and sn_region_members().
Referenced by sn_region_member_list(), and sn_region_members().
| qn::NetworkStruct< T > line::api::sn_remove_class | ( | const qn::NetworkStruct< T > & | sn, |
| const std::string & | name ) |
The same, naming the class.
THE LOOKUP BY NAME IS NOT A CONVENIENCE. ModelAdapter.removeClass works on a COPY of the model, whose class objects are distinct from the caller's, and the JAR's identity-only lookup therefore returned the model unchanged and silently: a defect found the first time the two entry points were exercised together. A caller here holding a class of a struct that has since been copied, tagged or transformed is in exactly that position, and the name is the one handle that survives those.
Definition at line 327 of file sn_remove_class.h.
References line::InputError::InputError(), and sn_remove_class().
| qn::NetworkStruct< T > line::api::sn_remove_class | ( | const qn::NetworkStruct< T > & | sn, |
| std::size_t | cls ) |
The model without class cls (1-based), leaving sn untouched.
| sn | a model; it need not be refreshed, since the result is refreshed here |
| cls | the 1-based class to remove |
Definition at line 210 of file sn_remove_class.h.
References line::qn::Station< T >::arrival_batch, line::qn::Station< T >::balking, line::qn::Station< T >::batch_reject, line::qn::Station< T >::cdscalingpeak, line::qn::Station< T >::classcap, line::qn::NetworkStruct< T >::classes, line::qn::NetworkStruct< T >::csmatrix, line::qn::Station< T >::departure_discipline, line::qn::Station< T >::droprule, line::qn::Station< T >::immfeed, line::qn::Station< T >::impatience, line::InputError::InputError(), line::qn::Station< T >::jdscalingpeak, line::qn::Station< T >::marked_classes, line::qn::NetworkStruct< T >::nodes, line::qn::Station< T >::orbit_impatience, line::qn::NetworkStruct< T >::P, line::qn::Station< T >::patience, line::qn::NetworkStruct< T >::Peff, line::qn::NetworkStruct< T >::refresh_struct(), line::qn::NodeDef::routing, line::qn::NodeDef::routing_param, line::qn::NodeDef::routing_weights, line::qn::Station< T >::schedparam, line::qn::Station< T >::server_parallelism, line::qn::Station< T >::server_types, line::qn::NetworkStruct< T >::service, sn_remove_class(), and line::qn::NetworkStruct< T >::stations.
Referenced by sn_remove_class(), sn_remove_class(), and line::tr::transform_solve_lc().
| SnRtStations< T > line::api::sn_rt_stations | ( | const qn::NetworkStruct< T > & | sn | ) |
Definition at line 48 of file sn_rt_stations.h.
References line::mc::dtmc_stochcomp(), line::Matrix< T >::Matrix(), line::api::SnRtStations< T >::rtst, sn_rt_stations(), and line::api::SnRtStations< T >::Vst.
Referenced by sn_rt_stations(), line::ba::solver_ba_bgt(), line::ba::solver_ba_bpt(), line::ba::solver_ba_snc_envelopes(), line::mam::solver_mam_bgchain(), and line::nc::solver_nc_busyp().
| SnRtOrig< T > line::api::sn_rtnodes_to_rtorig | ( | const qn::NetworkStruct< T > & | sn | ) |
Definition at line 46 of file sn_rtnodes_to_rtorig.h.
References line::api::SnRtOrig< T >::cells, line::mc::dtmc_stochcomp(), line::Matrix< T >::Matrix(), line::api::SnRtOrig< T >::norig, line::api::SnRtOrig< T >::rtorig, and sn_rtnodes_to_rtorig().
Referenced by sn_rtnodes_to_rtorig().
| bool line::api::sn_sched_is_product_form | ( | const qn::NetworkStruct< T > & | sn | ) |
The disciplines the reference admits in sn_has_product_form.
Definition at line 386 of file sn_predicates.h.
References sn_sched_is_product_form().
Referenced by sn_has_product_form(), and sn_sched_is_product_form().
| void line::api::sn_set_arrival | ( | qn::NetworkStruct< T > & | sn, |
| std::size_t | r, | ||
| const T & | rate, | ||
| const T & | scv, | ||
| bool | auto_refresh = false ) |
Port of sn_set_arrival: the same, at whichever station is the Source.
Definition at line 106 of file sn_setters.h.
References line::InputError::InputError(), sn_set_arrival(), and sn_set_service().
Referenced by sn_set_arrival().
| void line::api::sn_set_fork_fanout | ( | qn::NetworkStruct< T > & | sn, |
| std::size_t | fork_node, | ||
| double | fanout ) |
Port of sn_set_fork_fanout.
The reference writes sn.nodeparam{f}.fanOut, a field no MATLAB solver reads back; the quantity this struct carries and the fork-join machinery does read is the per-branch multiplicity tasks_per_link, so that is what is written.
Definition at line 176 of file sn_setters.h.
References line::InputError::InputError(), and sn_set_fork_fanout().
Referenced by sn_set_fork_fanout().
| void line::api::sn_set_population | ( | qn::NetworkStruct< T > & | sn, |
| std::size_t | r, | ||
| double | njobs, | ||
| bool | auto_refresh = false ) |
Port of sn_set_population: change a class population and the closed total.
auto_refresh re-solves the visit ratios, which the reference does because a class that becomes open (or closed) changes which chains are closed and therefore how the visits are normalised.
Definition at line 150 of file sn_setters.h.
References sn_set_population().
Referenced by sn_set_population().
| void line::api::sn_set_priority | ( | qn::NetworkStruct< T > & | sn, |
| std::size_t | r, | ||
| int | priority ) |
Port of sn_set_priority.
Definition at line 164 of file sn_setters.h.
References sn_set_priority().
Referenced by sn_set_priority().
| void line::api::sn_set_routing | ( | qn::NetworkStruct< T > & | sn, |
| const Matrix< T > & | rt, | ||
| bool | auto_refresh = false ) |
Port of sn_set_routing: replace the class-expanded stateful routing wholesale.
Definition at line 186 of file sn_setters.h.
References sn_set_routing().
Referenced by sn_set_routing().
| void line::api::sn_set_routing_prob | ( | qn::NetworkStruct< T > & | sn, |
| std::size_t | from_stateful, | ||
| std::size_t | from_class, | ||
| std::size_t | to_stateful, | ||
| std::size_t | to_class, | ||
| const T & | prob, | ||
| bool | auto_refresh = false ) |
Port of sn_set_routing_prob: one entry of the class-expanded stateful routing.
Definition at line 193 of file sn_setters.h.
References sn_set_routing_prob().
Referenced by sn_set_routing_prob().
| void line::api::sn_set_servers | ( | qn::NetworkStruct< T > & | sn, |
| std::size_t | ist, | ||
| double | nservers ) |
Port of sn_set_servers.
Definition at line 158 of file sn_setters.h.
References sn_set_servers().
Referenced by sn_set_servers().
| void line::api::sn_set_service | ( | qn::NetworkStruct< T > & | sn, |
| std::size_t | ist, | ||
| std::size_t | r, | ||
| const T & | rate, | ||
| const T & | scv, | ||
| bool | auto_refresh = false ) |
Port of sn_set_service: write a (rate, SCV) pair at one (station, class).
Definition at line 97 of file sn_setters.h.
References sn_refresh_process_fields(), and sn_set_service().
Referenced by sn_set_arrival(), and sn_set_service().
| void line::api::sn_set_service_batch | ( | qn::NetworkStruct< T > & | sn, |
| const Matrix< T > & | rates, | ||
| const Matrix< T > & | scvs, | ||
| const std::vector< std::vector< bool > > & | set_rate, | ||
| const std::vector< std::vector< bool > > & | set_scv, | ||
| bool | auto_refresh = false ) |
Port of sn_set_service_batch: write a whole (rate, SCV) table, skipping the entries the caller left undefined.
MATLAB marks "leave this one alone" with NaN; this port takes an explicit mask, because a struct instantiated at Rational has no NaN to mark it with.
Definition at line 123 of file sn_setters.h.
References sn_refresh_process_fields(), and sn_set_service_batch().
Referenced by sn_set_service_batch().
| bool line::api::sn_state_counts_valid | ( | const qn::NetworkStruct< T > & | sn, |
| const Matrix< T > & | n, | ||
| const Matrix< T > & | s ) |
Port of State.isValid, which is the whole body of sn_is_state_valid once the marginals are formed.
| n | (nstations x nclasses) jobs present |
| s | (nstations x nclasses) jobs in service |
Definition at line 126 of file sn_state.h.
References line::Matrix< T >::rows(), and sn_state_counts_valid().
Referenced by sn_is_state_valid(), and sn_state_counts_valid().
| std::vector< std::string > line::api::sn_validate | ( | const qn::NetworkStruct< T > & | sn, |
| ValidationLevel | level = ValidationLevel::Full ) |
Consistency checks on a NetworkStruct, a port of jar/src/main/java/jline/api/sn/SnValidate.java and ValidationLevel.java.
| sn | the struct to check |
| level | how much of it to check |
Definition at line 191 of file sn_validate.h.
References Full, None, sn_validate(), sn_validate_dimensions(), sn_validate_population(), sn_validate_rates(), sn_validate_routing(), and sn_validate_servers().
Referenced by sn_validate().
| std::string line::api::sn_validate_class_index | ( | const qn::NetworkStruct< T > & | sn, |
| std::size_t | r, | ||
| const std::string & | paramName = "classIdx" ) |
Definition at line 221 of file sn_validate.h.
References sn_validate_class_index().
Referenced by sn_validate_class_index().
| std::vector< std::string > line::api::sn_validate_dimensions | ( | const qn::NetworkStruct< T > & | sn | ) |
The (nstations x nclasses) matrices agree with the declared dimensions.
Definition at line 67 of file sn_validate.h.
References sn_validate_dimensions().
Referenced by sn_validate(), and sn_validate_dimensions().
| std::string line::api::sn_validate_node_index | ( | const qn::NetworkStruct< T > & | sn, |
| std::size_t | ind, | ||
| const std::string & | paramName = "nodeIdx" ) |
Definition at line 230 of file sn_validate.h.
References sn_validate_node_index().
Referenced by sn_validate_node_index().
| std::string line::api::sn_validate_node_type | ( | const qn::NetworkStruct< T > & | sn, |
| std::size_t | ind, | ||
| qn::NodeType | expected ) |
Definition at line 240 of file sn_validate.h.
References line::lang::node_type_to_text(), and sn_validate_node_type().
Referenced by sn_validate_node_type().
| std::vector< std::string > line::api::sn_validate_population | ( | const qn::NetworkStruct< T > & | sn | ) |
Class populations are neither NaN nor negative; an open class may be Inf.
Definition at line 125 of file sn_validate.h.
References sn_validate_population().
Referenced by sn_validate(), and sn_validate_population().
| std::vector< std::string > line::api::sn_validate_rates | ( | const qn::NetworkStruct< T > & | sn | ) |
Rates and SCVs are non-negative wherever the pair is enabled.
Definition at line 101 of file sn_validate.h.
References sn_validate_rates().
Referenced by sn_validate(), and sn_validate_rates().
| std::vector< std::string > line::api::sn_validate_routing | ( | const qn::NetworkStruct< T > & | sn | ) |
Every non-empty row of rt is a probability vector summing to one.
Definition at line 140 of file sn_validate.h.
References sn_validate_routing().
Referenced by sn_validate(), and sn_validate_routing().
| std::vector< std::string > line::api::sn_validate_servers | ( | const qn::NetworkStruct< T > & | sn | ) |
Server counts are positive, except at a Source or a Sink.
Definition at line 165 of file sn_validate.h.
References sn_validate_servers().
Referenced by sn_validate(), and sn_validate_servers().
| std::string line::api::sn_validate_station_index | ( | const qn::NetworkStruct< T > & | sn, |
| std::size_t | ist, | ||
| const std::string & | paramName = "stationIdx" ) |
Definition at line 212 of file sn_validate.h.
References sn_validate_station_index().
Referenced by sn_validate_station_index().