![]() |
LINE Solver (C++)
Templated C++ port of the LINE queueing solver
|
One station of the network. More...
#include <line/lang/qn/network_struct.h>
Classes | |
| struct | BalkingThreshold |
| One balking threshold: with min_jobs <= n <= max_jobs at the station, an arriving job of the class refuses to join with probability. More... | |
| struct | BalkingParam |
| Per class; strategy == NONE is a class that declares no balking. More... | |
| struct | ServerType |
| A heterogeneous server pool: count servers that serve only compatible classes, each with its own service law. More... | |
Public Attributes | |
| std::string | name |
| NodeType | nodetype = NodeType::Queue |
| SchedStrategy | sched = SchedStrategy::FCFS |
| double | nservers = 1.0 |
| may be infinite (a Delay, or an inf-scheduled task) | |
| bool | attr_ishost = false |
| std::size_t | attr_idx = 0 |
| LQN element this station stands for. | |
| std::vector< T > | schedparam |
| sn.schedparam, per class: the DPS / GPS weight, or the SEPT / LEPT rank. | |
| double | cap = std::numeric_limits<double>::infinity() |
| Station capacity in Kendall's K, as setCapacity sets it. | |
| std::vector< double > | classcap |
| Per-class buffer from setChainCapacity; infinite where unset. | |
| std::vector< bool > | immfeed |
| Node-level immediate feedback, per class; empty when the station sets none. | |
| std::vector< int > | droprule |
| Per-class blocking rule as an INT, with 0 meaning "not set". | |
| std::vector< T > | lldscaling |
| sn.lldscaling for this station: the multiplier at population 1, 2, ... Empty when the station is not load dependent. | |
| CdScaling< T > | cdscaling |
| sn.cdscaling for this station: the class-dependence map, empty when unset. | |
| std::vector< T > | cdscalingpeak |
| sn.cdscalingpeak for this station: the DECLARED peak rate scaling per class, empty when the station is not class dependent. | |
| CdScaling< T > | jdscaling |
| sn.jdscaling for this station: MATLAB's Station.ljdScaling, the JOINT dependence map eta_i(n), empty when unset. | |
| std::vector< T > | jdscalingpeak |
| sn.jdscalingpeak for this station: the declared peak joint-dependent scaling per class. | |
| std::function< T(const std::vector< std::size_t > &)> | svc_rate_fun |
| sn.nodeparam{ind}.svcRateFun for a PAS / OI station: the TOTAL service rate as a function of the ordered microstate, a 1-based list of class indices in queue order. | |
| std::vector< lang::PollingType > | polling_type |
| Polling parameters for a POLLING station, MATLAB's pollingType, switchoverTime and pollingPar on the Queue. | |
| std::vector< Distrib< T > > | switchover |
| int | polling_par = 0 |
| Matrix< T > | swap_graph |
| sn.nodeparam{ind}.swapGraph: which class a departing job promotes the jobs behind it into. | |
| std::vector< Distrib< T > > | patience |
| Queue.setPatience(class, dist): the abandonment timer of a WAITING job, with impatience[r] naming which rule it is. | |
| std::vector< lang::ImpatienceType > | impatience |
| std::vector< Distrib< T > > | orbit_impatience |
| Queue.setOrbitImpatience(class, dist): abandonment from the RETRIAL ORBIT, which is a different population from the waiting line above – a job that gave up retrying never occupied a buffer slot. | |
| std::vector< T > | batch_reject |
| Queue.setBatchRejectProbability: per-class rejection of a whole batch. | |
| std::vector< BalkingParam > | balking |
| std::vector< ServerType > | server_types |
| lang::HeteroSchedPolicy | hetero_policy = lang::HeteroSchedPolicy::ORDER |
| std::vector< std::size_t > | server_parallelism |
| Queue.setServerParallelism(class, n): the servers a job seizes for the whole of its service, JMT's job parallelism. | |
| std::vector< Distrib< T > > | arrival_batch |
| Source.setArrivalBatch(class, dist): the batch-size law released at each arrival epoch. | |
| std::vector< std::size_t > | marked_classes |
| Source.markedClasses: the 1-based class of each mark of an MMAP arrival. | |
| std::vector< lang::DepartureDiscipline > | departure_discipline |
| Place.departureDiscipline, per class. | |
One station of the network.
Definition at line 586 of file network_struct.h.
| std::vector<Distrib<T> > line::qn::Station< T >::arrival_batch |
Source.setArrivalBatch(class, dist): the batch-size law released at each arrival epoch.
It does NOT space the epochs – the arrival process in service does – so the two are separate and both are needed.
Definition at line 766 of file network_struct.h.
Referenced by line::io::network_to_json(), line::qn::Network< double >::set_arrival_batch(), and line::api::sn_remove_class().
| std::size_t line::qn::Station< T >::attr_idx = 0 |
LQN element this station stands for.
Definition at line 592 of file network_struct.h.
| bool line::qn::Station< T >::attr_ishost = false |
Definition at line 591 of file network_struct.h.
| std::vector<BalkingParam> line::qn::Station< T >::balking |
Definition at line 735 of file network_struct.h.
Referenced by line::io::network_to_json(), line::qn::Network< double >::set_balking(), line::api::sn_remove_class(), and line::qn::used_lang_features().
| std::vector<T> line::qn::Station< T >::batch_reject |
Queue.setBatchRejectProbability: per-class rejection of a whole batch.
Definition at line 718 of file network_struct.h.
Referenced by line::io::network_to_json(), line::qn::Network< double >::set_batch_reject(), and line::api::sn_remove_class().
| double line::qn::Station< T >::cap = std::numeric_limits<double>::infinity() |
Station capacity in Kendall's K, as setCapacity sets it.
Infinite means unbounded; sn.cap is derived from it and from the class capacities.
Definition at line 604 of file network_struct.h.
Referenced by line::qn::binding_capacity_reason(), line::fes::fes_aggregate(), line::io::network_to_json(), line::qn::NetworkStruct< T >::refresh_capacity(), and line::api::sn_aggregate_chains().
| CdScaling<T> line::qn::Station< T >::cdscaling |
sn.cdscaling for this station: the class-dependence map, empty when unset.
Definition at line 629 of file network_struct.h.
Referenced by line::qn::cd_factor(), line::io::network_to_json(), line::qn::Network< double >::set_class_dependence(), line::ctmc::solver_ctmc_avg_from_pi(), and line::qn::used_lang_features().
| std::vector<T> line::qn::Station< T >::cdscalingpeak |
sn.cdscalingpeak for this station: the DECLARED peak rate scaling per class, empty when the station is not class dependent.
It is not derivable from cdscaling: finding max_n beta_r(n) would mean sweeping the whole population lattice, and the reference does not. It is what utilization at a class-dependent station is normalized by, so that U = T*S/peak keeps the T*S/c convention of an ordinary multiserver station; without it a beta emulating two servers reports twice the true utilization. MATLAB's setClassDependence requires it.
Definition at line 641 of file network_struct.h.
Referenced by line::qn::fj_tag(), line::io::network_to_json(), line::qn::Network< double >::set_class_dependence(), line::api::sn_remove_class(), line::ctmc::solver_ctmc_avg_from_pi(), and line::qn::tag_chain().
| std::vector<double> line::qn::Station< T >::classcap |
Per-class buffer from setChainCapacity; infinite where unset.
Definition at line 606 of file network_struct.h.
Referenced by line::qn::binding_capacity_reason(), line::qn::fj_tag(), line::io::network_to_json(), line::qn::NetworkStruct< T >::refresh_capacity(), line::qn::Network< double >::set_class_capacity(), line::api::sn_remove_class(), and line::qn::tag_chain().
| std::vector<lang::DepartureDiscipline> line::qn::Station< T >::departure_discipline |
Place.departureDiscipline, per class.
Definition at line 770 of file network_struct.h.
Referenced by line::io::network_to_json(), line::qn::Network< double >::set_departure_discipline(), line::api::sn_remove_class(), and line::qn::used_lang_features().
| std::vector<int> line::qn::Station< T >::droprule |
Per-class blocking rule as an INT, with 0 meaning "not set".
The sentinel is MATLAB's: DropStrategy has no member with value 0, so a zero entry is what an unset rule looks like there, and the refresh derives those from the capacity. It matters that the two are distinguishable, because an EXPLICIT WAITQ for an open class at a finite buffer is rejected while the derived one is not.
Definition at line 622 of file network_struct.h.
Referenced by line::qn::fj_tag(), line::mva::list_valid_methods(), line::io::network_to_json(), line::qn::NetworkStruct< T >::refresh_capacity(), line::qn::Network< double >::set_drop_rule(), line::api::sn_remove_class(), and line::qn::tag_chain().
| lang::HeteroSchedPolicy line::qn::Station< T >::hetero_policy = lang::HeteroSchedPolicy::ORDER |
Definition at line 752 of file network_struct.h.
Referenced by line::io::network_to_json().
| std::vector<bool> line::qn::Station< T >::immfeed |
Node-level immediate feedback, per class; empty when the station sets none.
Only a Queue carries it in the reference, which is also the only node the JSON writer emits it for.
Definition at line 612 of file network_struct.h.
Referenced by line::io::network_to_json(), line::qn::Network< double >::set_immediate_feedback(), and line::api::sn_remove_class().
| std::vector<lang::ImpatienceType> line::qn::Station< T >::impatience |
Definition at line 710 of file network_struct.h.
Referenced by line::io::network_to_json(), line::qn::Network< double >::set_class_patience(), line::qn::Network< double >::set_patience(), line::api::sn_patience_handles(), line::api::sn_remove_class(), and line::qn::used_lang_features().
| CdScaling<T> line::qn::Station< T >::jdscaling |
sn.jdscaling for this station: MATLAB's Station.ljdScaling, the JOINT dependence map eta_i(n), empty when unset.
It has the same signature as cdscaling and is folded into it multiplicatively wherever a rate is scaled, exactly as State.afterEventInit does. It is kept as a SEPARATE field rather than pre-multiplied into cdscaling because the two carry different modelling claims: a cdscaling beta_r(n) keeps the product form (it is the class-dependent rate lattice pfqn_cdfun evaluates), while an eta_i(n) does not, and pfqn_mvajd / pfqn_ncjd are selected on that distinction.
Definition at line 654 of file network_struct.h.
Referenced by line::qn::cd_factor(), line::io::network_to_json(), line::qn::Network< double >::set_joint_dependence(), line::ctmc::solver_ctmc_avg_from_pi(), and line::qn::used_lang_features().
| std::vector<T> line::qn::Station< T >::jdscalingpeak |
sn.jdscalingpeak for this station: the declared peak joint-dependent scaling per class.
setJointDependence makes it mandatory for the same reason setClassDependence does – utilization is reported as T*S/peak.
Definition at line 660 of file network_struct.h.
Referenced by line::qn::fj_tag(), line::io::network_to_json(), line::qn::Network< double >::set_joint_dependence(), line::api::sn_remove_class(), and line::ctmc::solver_ctmc_avg_from_pi().
| std::vector<T> line::qn::Station< T >::lldscaling |
sn.lldscaling for this station: the multiplier at population 1, 2, ... Empty when the station is not load dependent.
Definition at line 627 of file network_struct.h.
Referenced by line::io::network_to_json(), line::nc::solver_nc_solve(), and line::qn::used_lang_features().
| std::vector<std::size_t> line::qn::Station< T >::marked_classes |
Source.markedClasses: the 1-based class of each mark of an MMAP arrival.
Definition at line 768 of file network_struct.h.
Referenced by line::io::network_to_json(), and line::api::sn_remove_class().
| std::string line::qn::Station< T >::name |
Definition at line 587 of file network_struct.h.
Referenced by line::qn::Network< double >::add_delay(), line::qn::Network< double >::add_join_unbound(), line::qn::Network< double >::add_place(), line::qn::Network< double >::add_queue(), line::qn::Network< double >::add_source(), line::qn::NetworkStruct< T >::add_station(), line::qn::binding_capacity_reason(), line::fes::fes_aggregate(), line::mva::fj_ht(), line::mva::fj_mmt(), line::opt::open_sensitivities(), and line::qn::NetworkStruct< T >::refresh_capacity().
| NodeType line::qn::Station< T >::nodetype = NodeType::Queue |
Definition at line 588 of file network_struct.h.
Referenced by line::qn::Network< double >::add_delay(), line::qn::Network< double >::add_join_unbound(), line::qn::Network< double >::add_place(), line::qn::Network< double >::add_queue(), line::qn::Network< double >::add_source(), line::qn::NetworkStruct< T >::add_station(), line::autosolver::auto_find_solver(), line::qn::binding_capacity_reason(), line::fes::fes_aggregate(), line::mva::fj_ht(), line::mva::fj_mmt(), line::qn::from_marginal_and_started_core(), line::qn::from_marginal_core(), and line::qn::NetworkStruct< T >::refresh_capacity().
| double line::qn::Station< T >::nservers = 1.0 |
may be infinite (a Delay, or an inf-scheduled task)
Definition at line 590 of file network_struct.h.
Referenced by line::qn::Network< double >::add_delay(), line::qn::Network< double >::add_join_unbound(), line::qn::Network< double >::add_place(), line::qn::Network< double >::add_queue(), line::qn::Network< double >::add_source(), line::fes::fes_aggregate(), line::mva::fj_ht(), line::mva::fj_mmt(), line::qn::from_marginal_and_started_core(), line::qn::from_marginal_core(), line::mva::mva_mvac_reason(), line::io::network_to_json(), line::opt::open_sensitivities(), line::qn::Network< double >::set_server_parallelism(), line::api::sn_aggregate_chains(), line::mva::solver_mva_polling_analyzer(), line::nc::solver_nc_analyzer(), and line::nc::solver_nc_solve().
| std::vector<Distrib<T> > line::qn::Station< T >::orbit_impatience |
Queue.setOrbitImpatience(class, dist): abandonment from the RETRIAL ORBIT, which is a different population from the waiting line above – a job that gave up retrying never occupied a buffer slot.
Definition at line 716 of file network_struct.h.
Referenced by line::io::network_to_json(), line::qn::Network< double >::set_orbit_impatience(), line::api::sn_remove_class(), and line::qn::used_lang_features().
| std::vector<Distrib<T> > line::qn::Station< T >::patience |
Queue.setPatience(class, dist): the abandonment timer of a WAITING job, with impatience[r] naming which rule it is.
A disabled entry is a class that declares none.
Definition at line 709 of file network_struct.h.
Referenced by line::io::network_to_json(), line::qn::Network< double >::set_class_patience(), line::qn::Network< double >::set_patience(), line::api::sn_patience_handles(), and line::api::sn_remove_class().
| int line::qn::Station< T >::polling_par = 0 |
Definition at line 686 of file network_struct.h.
Referenced by line::qn::NetworkStruct< T >::effective_polling(), line::io::network_to_json(), line::qn::Network< double >::set_polling_type(), and line::mva::solver_mva_polling_analyzer().
| std::vector<lang::PollingType> line::qn::Station< T >::polling_type |
Polling parameters for a POLLING station, MATLAB's pollingType, switchoverTime and pollingPar on the Queue.
polling_type[r] is the discipline of class r's buffer (the reference assumes it is identical across buffers), switchover[r] its switchover distribution, and polling_par the K of a K-limited discipline. Empty polling_type means the station is not a polling station.
Definition at line 684 of file network_struct.h.
Referenced by line::qn::NetworkStruct< T >::effective_polling(), line::io::network_to_json(), line::qn::Network< double >::set_polling_type(), and line::mva::solver_mva_polling_analyzer().
| SchedStrategy line::qn::Station< T >::sched = SchedStrategy::FCFS |
Definition at line 589 of file network_struct.h.
Referenced by line::qn::Network< double >::add_delay(), line::qn::Network< double >::add_join_unbound(), line::qn::Network< double >::add_place(), line::qn::Network< double >::add_queue(), line::qn::Network< double >::add_source(), line::autosolver::auto_supports(), line::autosolver::auto_traits(), line::fes::fes_aggregate(), line::mva::find_oi_stations(), line::mva::fj_ht(), line::mva::fj_mmt(), line::qn::from_marginal_and_started_core(), line::qn::from_marginal_core(), line::mva::list_valid_methods(), line::mva::mva_mvac_reason(), line::mva::nc_is_oi_model(), line::io::network_to_json(), line::opt::open_sensitivities(), line::qn::NetworkStruct< T >::refresh_sched_param(), line::qn::Network< double >::set_polling_type(), line::qn::Network< double >::set_service_rate_function(), line::qn::Network< double >::set_switchover(), line::api::sn_aggregate_chains(), line::qn::station_swap_graph(), and line::qn::used_lang_features().
| std::vector<T> line::qn::Station< T >::schedparam |
sn.schedparam, per class: the DPS / GPS weight, or the SEPT / LEPT rank.
Empty means the discipline takes no parameter; the refresh fills it with ones for DPS and GPS, which is MATLAB's default weight.
Definition at line 599 of file network_struct.h.
Referenced by line::qn::fj_tag(), line::io::network_to_json(), line::qn::NetworkStruct< T >::refresh_sched_param(), line::qn::Network< double >::set_sched_param(), line::api::sn_remove_class(), and line::qn::tag_chain().
| std::vector<std::size_t> line::qn::Station< T >::server_parallelism |
Queue.setServerParallelism(class, n): the servers a job seizes for the whole of its service, JMT's job parallelism.
Per class, empty or all ones when every job seizes one server.
Definition at line 759 of file network_struct.h.
Referenced by line::io::network_to_json(), line::qn::Network< double >::set_server_parallelism(), line::api::sn_remove_class(), and line::qn::used_lang_features().
| std::vector<ServerType> line::qn::Station< T >::server_types |
Definition at line 751 of file network_struct.h.
Referenced by line::io::network_to_json(), line::api::sn_remove_class(), and line::qn::used_lang_features().
| std::function<T(const std::vector<std::size_t>&)> line::qn::Station< T >::svc_rate_fun |
sn.nodeparam{ind}.svcRateFun for a PAS / OI station: the TOTAL service rate as a function of the ordered microstate, a 1-based list of class indices in queue order.
A pass-and-swap or order-independent queue is parameterized by mu(c) as a whole; there is no per-class service distribution, and MATLAB's setServiceRateFunction rejects one. The refresh still derives a representative per-class rate mu([r]) so the ordinary rate machinery stays consistent, exactly as Queue.setServiceRateFunction does.
Definition at line 673 of file network_struct.h.
Referenced by line::mva::find_oi_stations(), line::mva::nc_is_oi_model(), line::qn::Network< double >::set_pas(), and line::qn::Network< double >::set_service_rate_function().
| Matrix<T> line::qn::Station< T >::swap_graph |
sn.nodeparam{ind}.swapGraph: which class a departing job promotes the jobs behind it into.
All zero is the ORDER-INDEPENDENT case, where no swapping happens and the station is product-form; a nonzero entry makes it a genuine pass-and-swap station, which the OI analyzer refuses.
Definition at line 693 of file network_struct.h.
Referenced by line::qn::Network< double >::set_pas(), line::qn::Network< double >::set_service_rate_function(), and line::qn::station_swap_graph().
| std::vector<Distrib<T> > line::qn::Station< T >::switchover |
Definition at line 685 of file network_struct.h.
Referenced by line::qn::NetworkStruct< T >::effective_polling(), line::io::network_to_json(), line::qn::Network< double >::set_switchover(), and line::mva::solver_mva_polling_analyzer().