LINE Solver (C++)
Templated C++ port of the LINE queueing solver
Loading...
Searching...
No Matches
line::qn::Station< T > Struct Template Reference

One station of the network. More...

#include <line/lang/qn/network_struct.h>

Collaboration diagram for line::qn::Station< T >:

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
std::vector< std::vector< Distrib< T > > > switchover_pair
 Queue.setSwitchover(fromClass, toClass, distrib): the walk the server takes when it turns from serving class r to serving class s, MATLAB's (K x K) switchoverTime cell.
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.

Detailed Description

template<class T>
struct line::qn::Station< T >

One station of the network.

Definition at line 593 of file network_struct.h.

Member Data Documentation

◆ arrival_batch

template<class T>
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 791 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().

◆ attr_idx

template<class T>
std::size_t line::qn::Station< T >::attr_idx = 0

LQN element this station stands for.

Definition at line 599 of file network_struct.h.

◆ attr_ishost

template<class T>
bool line::qn::Station< T >::attr_ishost = false

Definition at line 598 of file network_struct.h.

◆ balking

◆ batch_reject

template<class T>
std::vector<T> line::qn::Station< T >::batch_reject

Queue.setBatchRejectProbability: per-class rejection of a whole batch.

Definition at line 743 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().

◆ cap

template<class T>
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 611 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

◆ cdscalingpeak

template<class T>
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 648 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(), line::nc::solver_nc_conv(), and line::qn::tag_chain().

◆ classcap

template<class T>
std::vector<double> line::qn::Station< T >::classcap

◆ departure_discipline

template<class T>
std::vector<lang::DepartureDiscipline> line::qn::Station< T >::departure_discipline

◆ droprule

template<class T>
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 629 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().

◆ hetero_policy

Definition at line 777 of file network_struct.h.

Referenced by line::io::network_to_json().

◆ immfeed

template<class T>
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 619 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().

◆ impatience

◆ jdscaling

template<class T>
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 661 of file network_struct.h.

Referenced by line::qn::cd_factor(), line::qn::NetworkStruct< T >::is_mm1k_loss(), line::io::network_to_json(), line::qn::Network< double >::set_joint_dependence(), line::mva::sn_is_mm1k_loss(), line::ctmc::solver_ctmc_avg_from_pi(), line::nc::solver_nc_conv(), and line::qn::used_lang_features().

◆ jdscalingpeak

template<class T>
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 667 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(), line::ctmc::solver_ctmc_avg_from_pi(), and line::nc::solver_nc_conv().

◆ lldscaling

template<class T>
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 634 of file network_struct.h.

Referenced by line::qn::NetworkStruct< T >::is_mm1k_loss(), line::io::network_to_json(), line::mva::sn_is_mm1k_loss(), line::nc::solver_nc_solve(), and line::qn::used_lang_features().

◆ marked_classes

template<class T>
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 793 of file network_struct.h.

Referenced by line::io::network_to_json(), and line::api::sn_remove_class().

◆ name

◆ nodetype

◆ nservers

◆ orbit_impatience

template<class T>
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 741 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().

◆ patience

template<class T>
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 734 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().

◆ polling_par

◆ polling_type

template<class T>
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 691 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().

◆ sched

◆ schedparam

template<class T>
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 606 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().

◆ server_parallelism

template<class T>
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 784 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().

◆ server_types

template<class T>
std::vector<ServerType> line::qn::Station< T >::server_types

◆ svc_rate_fun

template<class T>
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 680 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().

◆ swap_graph

template<class T>
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 718 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().

◆ switchover

◆ switchover_pair

template<class T>
std::vector<std::vector<Distrib<T> > > line::qn::Station< T >::switchover_pair

Queue.setSwitchover(fromClass, toClass, distrib): the walk the server takes when it turns from serving class r to serving class s, MATLAB's (K x K) switchoverTime cell.

Empty means none declared at all; otherwise it is (K x K) and an undeclared pair is DISABLED, so it is not serialized. MATLAB fills its cell with Immediate and writes all K^2 entries instead; nothing reads either, and the sparse form is the one that round-trips a document unchanged.

IT IS CARRIED, NOT CONSUMED, and that is parity rather than an omission. No solver in any codebase reads a pairwise switchover: the MVA polling analyzer and the state machinery reach switchover above through the polling buffers, and writeJSIM warns and DROPS the pairwise times on an ordinary Server because JMT's Server has no switchover of its own. What the field buys is that the model can be declared, serialized and read back unchanged – which is what switchover_basic exercises.

Definition at line 711 of file network_struct.h.

Referenced by line::io::network_to_json(), and line::qn::Network< double >::set_switchover().


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