![]() |
LINE Solver (C++)
Templated C++ port of the LINE queueing solver
|
One station's mutable state. More...
#include <line/solvers/ldes/ldes_engine.h>
Classes | |
| struct | BalkRule |
| Balking: the (min, max, probability) triples an arrival consults. More... | |
Public Member Functions | |
| bool | powers_down_after (std::size_t r) const |
| Does a server freed by class r enter DELAYOFF (or power down at once)? | |
Public Attributes | |
| Role | role = Role::Queue |
| lang::SchedStrategy | sched = lang::SchedStrategy::FCFS |
| bool | ps = false |
| bool | preemptive = false |
| bool | resume = false |
| PR (continue the residual) as against PI (redraw). | |
| bool | size_ordered = false |
| The waiting room is ranked by the job's SAMPLED size, so the size has to exist before the job enters service. | |
| std::size_t | nservers = 1 |
| std::size_t | lps_limit = 0 |
| LPS admission cap; 0 = none. | |
| double | cap = std::numeric_limits<double>::infinity() |
| std::vector< double > | classcap |
| std::vector< lang::DropStrategy > | droprule |
| sn.droprule, per class, declared on the DESTINATION station. | |
| std::vector< double > | blocked_at |
| Jobs held OUTSIDE this station's buffer but counted in its queue length: a BAS or BBS job whose destination is full occupies the upstream server and is charged to the destination, which is where it is queueing for. | |
| std::vector< double > | weight |
| schedparam, the DPS/GPS weights | |
| std::vector< double > | class_mean |
| mean service per class, for SEPT/LEPT | |
| std::vector< double > | lld |
| sn.lldscaling: the RATE multiplier when n jobs are present, indexed n-1. | |
| lang::CdScaling< double > | cd |
| sn.cdscaling: beta_r(n), a per-class RATE at the station's population. | |
| bool | has_cd = false |
| bool | pas = false |
| A PASS-AND-SWAP station serves an ORDERED LIST whose total rate is a function of the whole class sequence (Dorsman and Gardner 2024). | |
| std::function< double(const std::vector< std::size_t > &)> | pas_rate |
| std::vector< std::vector< bool > > | pas_swap |
| std::vector< Job > | pas_list |
| std::uint64_t | pas_tag = 0 |
| bool | polling = false |
| A POLLING SERVER visits the per-class buffers in a fixed cyclic order, paying a SWITCHOVER on each leg. | |
| std::size_t | poll_at = 0 |
| the buffer the server is serving or heading to | |
| bool | poll_switching = false |
| bool | poll_parked = false |
| std::size_t | poll_budget = 0 |
| remaining visit budget; 0 = exhausted | |
| std::size_t | poll_gate = 0 |
| DECREMENTING: jobs found at the polling instant. | |
| lang::PollingType | poll_type = lang::PollingType::EXHAUSTIVE |
| std::size_t | poll_k = 1 |
| std::vector< Sampler > | switchover |
| std::vector< bool > | has_switchover |
| bool | rr = false |
| ROUND ROBIN (SchedStrategy::RR): the per-class quantum law, and per slot the identity of the quantum clock armed for the job it serves, 0 when none. | |
| std::vector< Sampler > | rr_quantum |
| std::vector< std::uint64_t > | rr_qtag |
| bool | poll_ext = false |
| POLLING EXTENSIONS (set_polling_table, set_polling_order, set_polling_timer), the event-driven counterpart of State.pollingInfo/pollingAdvance and of the Java engine's pollingExtAdvance. | |
| std::vector< std::size_t > | poll_ring |
| class (0-based) at each position | |
| std::size_t | poll_pos = 0 |
| current position in the ring | |
| std::vector< Sampler > | poll_leg |
| std::vector< bool > | poll_has_leg |
| lang::PollingOrder | poll_order = lang::PollingOrder::CYCLIC |
| std::size_t | poll_thr_class = 0 |
| THRESHOLD priority class, 0-based. | |
| long | poll_thr_l = 0 |
| lang::PollingTimer | poll_timer = lang::PollingTimer::NONE |
| bool | poll_preempt = false |
| std::vector< Sampler > | poll_tlaw |
| visit timer law per class | |
| std::vector< bool > | poll_has_tlaw |
| std::vector< bool > | poll_polled |
| std::vector< double > | poll_trt |
| GLOBAL: token rotation timer expiry per class. | |
| bool | poll_trt_ready = false |
| std::uint64_t | poll_timer_tag = 0 |
| the live visit timer, 0 = none | |
| bool | poll_expired = false |
| non-preemptive: end the visit at the next completion | |
| bool | has_setup = false |
| SETUP AND DELAY-OFF: servers that power down when they fall idle. | |
| std::vector< Sampler > | setup_law |
| [class], valid where has_setup_law | |
| std::vector< bool > | has_setup_law |
| a setup of positive mean is declared | |
| std::vector< Sampler > | doff_law |
| [class], valid where has_doff_law | |
| std::vector< bool > | has_doff_law |
| a delay-off of positive mean is declared | |
| std::vector< bool > | doff_zero |
| a delay-off is declared with zero mean | |
| std::vector< int > | power |
| [slot] PowerState | |
| std::vector< std::uint64_t > | power_tag |
| [slot] generation of the live power timer | |
| std::vector< Sampler > | retrial |
| RETRIAL: a retrial station has NO WAITING ROOM. | |
| std::vector< bool > | has_retrial |
| std::vector< int > | max_attempts |
| std::vector< int > | retrial_policy |
| 1 = LINEAR (a clock per job), 2 = CONSTANT (one per orbit) | |
| std::vector< bool > | const_pending |
| CONSTANT: the shared clock is armed. | |
| std::vector< std::deque< Job > > | orbit |
| per class, oldest first | |
| std::vector< Sampler > | orbit_abandon |
| std::vector< bool > | has_orbit_abandon |
| std::vector< double > | orbit_size |
| live, per class | |
| std::vector< double > | tot_orbit |
| time integral of the orbit size | |
| double | orbit_last = 0.0 |
| std::vector< double > | retried |
| std::vector< double > | retrial_lost |
| std::vector< Sampler > | patience |
| Reneging: the abandonment timer of a WAITING job, per class. | |
| std::vector< bool > | has_patience |
| std::vector< std::vector< BalkRule > > | balk |
| std::vector< Sampler > | svc |
| std::vector< bool > | off |
| bool | bmsp = false |
| BULK SERVICE (BMSP): a THIRD station kind, beside the buffered one and the sharing one. | |
| std::size_t | bmsp_cls = 0 |
| the one enabled class | |
| std::size_t | bmsp_pending = 1 |
| jobs the armed firing will complete | |
| std::uint64_t | bmsp_tag = 0 |
| neutralises a superseded firing | |
| bool | has_pools = false |
| HETEROGENEOUS SERVER POOLS, empty on a station whose servers are alike. | |
| std::vector< std::size_t > | server_type |
| per slot, its pool | |
| std::vector< std::size_t > | type_first |
| per pool, its first slot | |
| std::vector< std::size_t > | type_count |
| per pool, its server count | |
| std::vector< std::vector< bool > > | type_compat |
| [pool][class] | |
| std::vector< std::vector< Sampler > > | type_svc |
| [pool][class] | |
| std::vector< std::vector< bool > > | type_has_svc |
| [pool][class], a law of its own | |
| std::vector< std::vector< double > > | type_rate |
| [pool][class], 1/mean, for FSF | |
| lang::HeteroSchedPolicy | hetero_policy = lang::HeteroSchedPolicy::ORDER |
| std::vector< std::size_t > | type_order |
| ALIS/FAIRNESS rotate this order; a used pool goes to the back. | |
| std::vector< std::size_t > | alfs_order |
| ALFS walks the pools least-flexible first: fewest compatible classes. | |
| std::vector< Job > | buffer |
| The waiting room, as an EXPLICIT HEAP rather than a std::priority_queue. | |
| WaitCmp | cmp |
| std::vector< Job > | server |
| std::vector< bool > | server_busy |
| std::vector< double > | server_start |
| instant the held job entered service | |
| std::vector< std::uint64_t > | server_tag |
| std::vector< bool > | server_blocked |
| A server holding a completed job it cannot hand on, because its destination is full. | |
| std::vector< bool > | server_held |
| A server HELD ACROSS A SYNCHRONOUS CALL. | |
| std::vector< std::size_t > | held_cls |
| std::vector< Job > | blocked_job |
| std::vector< std::size_t > | blocked_dest |
| std::vector< std::size_t > | blocked_dest_cls |
| std::vector< PsJob > | ps_jobs |
| double | ps_last_update = 0.0 |
| bool | state_dependent = false |
| True when the station's service RATE depends on its own population, i.e. | |
| bool | draw_at_start = false |
| True when the service requirement is drawn when a server TAKES the job, not when it joins the station: every non-preemptive, non-sharing queue outside polling, round robin, PAS, bulk service and the size-ranked disciplines. | |
| double | util_peak = 1.0 |
| max(c, max(alpha)): the peak capacity the utilization is reported against. | |
| std::vector< double > | cd_peak_class |
| Class or joint dependence: the declared peak per class, the product over the declared families of the largest entry within the class's CHAIN, as solver_nc_conv normalizes. | |
| std::vector< std::size_t > | parallelism |
| Queue.setServerParallelism(class, n): the servers a class-r job seizes for the whole of its service, one entry per class. | |
| bool | has_parallelism = false |
| std::vector< std::vector< std::size_t > > | held_extra |
| The further slots held beside each primary one, so that releasing the primary releases the whole set. | |
| std::vector< double > | gd_peak |
| The declared peak of the GLOBAL (Whittle) dependence at this station, one entry per class, 1 when the model declares none. | |
| std::vector< double > | ps_cd |
| The class-dependent speed a SHARING station is running at right now, one entry per class. | |
| bool | has_breakdown = false |
| Server breakdown: the server alternates up and down on two clocks. | |
| bool | up = true |
| std::vector< double > | down_scale |
| std::vector< double > | down_rate_raw |
| The declared absolute rate, kept so the scale can be formed once E[S] is known. | |
| Sampler | failure_time |
| Sampler | repair_time |
| double | sd_last_update = 0.0 |
One station's mutable state.
Definition at line 683 of file ldes_engine.h.
|
inline |
Does a server freed by class r enter DELAYOFF (or power down at once)?
Definition at line 852 of file ldes_engine.h.
References doff_zero, has_doff_law, has_setup, and has_setup_law.
| std::vector<std::size_t> line::ldes::engine::StationState::alfs_order |
ALFS walks the pools least-flexible first: fewest compatible classes.
Definition at line 948 of file ldes_engine.h.
| std::vector<std::vector<BalkRule> > line::ldes::engine::StationState::balk |
Definition at line 891 of file ldes_engine.h.
| std::vector<double> line::ldes::engine::StationState::blocked_at |
Jobs held OUTSIDE this station's buffer but counted in its queue length: a BAS or BBS job whose destination is full occupies the upstream server and is charged to the destination, which is where it is queueing for.
Charging it upstream would let a full station report a queue below its own capacity while jobs pile up in front of it.
Definition at line 716 of file ldes_engine.h.
| std::vector<std::size_t> line::ldes::engine::StationState::blocked_dest |
Definition at line 983 of file ldes_engine.h.
| std::vector<std::size_t> line::ldes::engine::StationState::blocked_dest_cls |
Definition at line 984 of file ldes_engine.h.
| std::vector<Job> line::ldes::engine::StationState::blocked_job |
Definition at line 982 of file ldes_engine.h.
| bool line::ldes::engine::StationState::bmsp = false |
BULK SERVICE (BMSP): a THIRD station kind, beside the buffered one and the sharing one.
A BMAP or BMMAPt assigned as a SERVICE process is a batch Markovian service process: the station has no per-job service time at all, only a station-level FIRING CLOCK, and one firing completes min(b, present) jobs at once. Neither existing path can express that – draw_at_arrival gives every job a Job::service, and a sharing station divides one server among everyone – so this is its own arm in the admit path and in the departure arm.
The clock is armed when the station goes from EMPTY to non-empty and re-armed at every firing, so the server fires continuously while it holds work. That is what makes a wall-clock schedule walk exact for a BMMAPt clock: the firing interval is drawn from the instant the clock is armed, never from a job's arrival.
Restricted BY NAME to a single-server, single-class FCFS queue with no preemption, polling, PAS, setup, load dependence, server pools, immediate feedback or blocking destination, exactly as the Java engine restricts it: a bulk server is a single server by construction, and "which of the b jobs it just released is the one blocking" has no answer.
Definition at line 918 of file ldes_engine.h.
| std::size_t line::ldes::engine::StationState::bmsp_cls = 0 |
the one enabled class
Definition at line 919 of file ldes_engine.h.
| std::size_t line::ldes::engine::StationState::bmsp_pending = 1 |
jobs the armed firing will complete
Definition at line 920 of file ldes_engine.h.
| std::uint64_t line::ldes::engine::StationState::bmsp_tag = 0 |
neutralises a superseded firing
Definition at line 921 of file ldes_engine.h.
| std::vector<Job> line::ldes::engine::StationState::buffer |
The waiting room, as an EXPLICIT HEAP rather than a std::priority_queue.
FSP is why. Its order is the virtual finish time of a processor-sharing schedule over the residual work PRESENT AT THE STATION, so it changes whenever the station's composition does and cannot be stamped on a job when it arrives. A container that hides its storage cannot be reordered or rescanned; this one is scanned linearly for FSP and kept as a heap for every other discipline, whose keys are per-job constants.
Definition at line 960 of file ldes_engine.h.
| double line::ldes::engine::StationState::cap = std::numeric_limits<double>::infinity() |
Definition at line 698 of file ldes_engine.h.
| lang::CdScaling<double> line::ldes::engine::StationState::cd |
sn.cdscaling: beta_r(n), a per-class RATE at the station's population.
Definition at line 728 of file ldes_engine.h.
| std::vector<double> line::ldes::engine::StationState::cd_peak_class |
Class or joint dependence: the declared peak per class, the product over the declared families of the largest entry within the class's CHAIN, as solver_nc_conv normalizes.
A single station-wide maximum halved the utilization of a class whose own peak is 1 (setClassDependence(beta, [2 1]) gave B 0.22 for 0.44).
Definition at line 1020 of file ldes_engine.h.
| std::vector<double> line::ldes::engine::StationState::class_mean |
mean service per class, for SEPT/LEPT
Definition at line 718 of file ldes_engine.h.
| std::vector<double> line::ldes::engine::StationState::classcap |
Definition at line 699 of file ldes_engine.h.
| WaitCmp line::ldes::engine::StationState::cmp |
Definition at line 961 of file ldes_engine.h.
| std::vector<bool> line::ldes::engine::StationState::const_pending |
CONSTANT: the shared clock is armed.
Definition at line 873 of file ldes_engine.h.
| std::vector<Sampler> line::ldes::engine::StationState::doff_law |
[class], valid where has_doff_law
Definition at line 846 of file ldes_engine.h.
| std::vector<bool> line::ldes::engine::StationState::doff_zero |
a delay-off is declared with zero mean
Definition at line 848 of file ldes_engine.h.
Referenced by powers_down_after().
| std::vector<double> line::ldes::engine::StationState::down_rate_raw |
The declared absolute rate, kept so the scale can be formed once E[S] is known.
Definition at line 1075 of file ldes_engine.h.
| std::vector<double> line::ldes::engine::StationState::down_scale |
Definition at line 1073 of file ldes_engine.h.
| bool line::ldes::engine::StationState::draw_at_start = false |
True when the service requirement is drawn when a server TAKES the job, not when it joins the station: every non-preemptive, non-sharing queue outside polling, round robin, PAS, bulk service and the size-ranked disciplines.
That is where the reference draws it (serviceTimeOnServer), and the instant matters to the sample path whenever the service order differs from the arrival order on one (station, class) stream: LCFS, SIRO, an immediate feedback that keeps the server. Under FCFS the two instants consume the stream in the same order.
Definition at line 1012 of file ldes_engine.h.
| std::vector<lang::DropStrategy> line::ldes::engine::StationState::droprule |
sn.droprule, per class, declared on the DESTINATION station.
JMT's convention and the reference's: the policy belongs to the station whose capacity is limited, not to the upstream one whose server ends up blocked. A model that declared it on the source would be read as having no policy at all.
Definition at line 708 of file ldes_engine.h.
| Sampler line::ldes::engine::StationState::failure_time |
Definition at line 1076 of file ldes_engine.h.
| std::vector<double> line::ldes::engine::StationState::gd_peak |
The declared peak of the GLOBAL (Whittle) dependence at this station, one entry per class, 1 when the model declares none.
It MULTIPLIES whatever peak the station already reports against, because phi multiplies the rate the class-, joint- and load-dependent scalings have already set; getPeakScaling folds the same product.
Definition at line 1046 of file ldes_engine.h.
| bool line::ldes::engine::StationState::has_breakdown = false |
Server breakdown: the server alternates up and down on two clocks.
down_scale[r] is the RATE MULTIPLIER while down, down_rate(r) * E[S(i,r)], so the whole outage is expressed as a state-dependent rate change and needs no separate machinery: a zero multiplier stalls the job with its residual intact (nothing is rescheduled, so nothing departs until repair) and a positive one is the degraded server. That is exactly the reference's semantics – a breakdown does not evict the job in service, and downServiceRates degrades rather than stops.
Definition at line 1071 of file ldes_engine.h.
| bool line::ldes::engine::StationState::has_cd = false |
Definition at line 729 of file ldes_engine.h.
| std::vector<bool> line::ldes::engine::StationState::has_doff_law |
a delay-off of positive mean is declared
Definition at line 847 of file ldes_engine.h.
Referenced by powers_down_after().
| std::vector<bool> line::ldes::engine::StationState::has_orbit_abandon |
Definition at line 876 of file ldes_engine.h.
| bool line::ldes::engine::StationState::has_parallelism = false |
Definition at line 1032 of file ldes_engine.h.
| std::vector<bool> line::ldes::engine::StationState::has_patience |
Definition at line 884 of file ldes_engine.h.
| bool line::ldes::engine::StationState::has_pools = false |
HETEROGENEOUS SERVER POOLS, empty on a station whose servers are alike.
A pool is count servers that accept only compatible classes and serve them at a law of their own, so a model that declares them is a DIFFERENT system from the multiserver it would otherwise look like: flattening the pools into nservers answers that other system, plausibly and silently.
The slots are laid out POOL BY POOL in declaration order, so slot type_first[t] .. type_first[t] + type_count[t] - 1 belongs to pool t and server_type[slot] is the inverse. Every other part of the engine addresses a server by its slot and needs to know nothing about this.
Definition at line 936 of file ldes_engine.h.
| std::vector<bool> line::ldes::engine::StationState::has_retrial |
Definition at line 870 of file ldes_engine.h.
| bool line::ldes::engine::StationState::has_setup = false |
SETUP AND DELAY-OFF: servers that power down when they fall idle.
EACH SERVER runs its own four-state machine, as the reference's Solver_ssj.ServerState does: ACTIVE, OFF, SETUP, DELAYOFF, all servers starting ACTIVE. An arrival takes the first ACTIVE idle server; failing that the first DELAYOFF one, whose timer is cancelled so the job pays nothing; failing that the first OFF one, which starts a setup under the ARRIVING class's law while the job waits; failing all three it waits. A server freed with nobody waiting enters DELAYOFF under the DEPARTING class's law, and only when that class declares both laws; a completed setup serves the head of the queue or idles ACTIVE with no timer.
Keeping ONE machine per station, as this engine did before 2026-11-24, let one setup power every server and started the delay-off only when the whole station emptied: at c = 2 that read 1.822 against CTMC 1.789.
The laws are PER CLASS (sn.setupparam). A declared delay-off of zero mean shuts the server down the instant it empties; see doff_zero.
Definition at line 843 of file ldes_engine.h.
Referenced by powers_down_after().
| std::vector<bool> line::ldes::engine::StationState::has_setup_law |
a setup of positive mean is declared
Definition at line 845 of file ldes_engine.h.
Referenced by powers_down_after().
| std::vector<bool> line::ldes::engine::StationState::has_switchover |
Definition at line 774 of file ldes_engine.h.
| std::vector<std::size_t> line::ldes::engine::StationState::held_cls |
Definition at line 981 of file ldes_engine.h.
| std::vector<std::vector<std::size_t> > line::ldes::engine::StationState::held_extra |
The further slots held beside each primary one, so that releasing the primary releases the whole set.
Empty at a station that declares none.
Definition at line 1037 of file ldes_engine.h.
| lang::HeteroSchedPolicy line::ldes::engine::StationState::hetero_policy = lang::HeteroSchedPolicy::ORDER |
Definition at line 944 of file ldes_engine.h.
| std::vector<double> line::ldes::engine::StationState::lld |
sn.lldscaling: the RATE multiplier when n jobs are present, indexed n-1.
It divides the sampled service time at an ordinary station and IS the effective server count at a sharing one – the same table read two ways, because a share of c servers and a c-fold rate are the same thing only for PS.
Definition at line 726 of file ldes_engine.h.
| std::size_t line::ldes::engine::StationState::lps_limit = 0 |
LPS admission cap; 0 = none.
Definition at line 697 of file ldes_engine.h.
| std::vector<int> line::ldes::engine::StationState::max_attempts |
Definition at line 871 of file ldes_engine.h.
| std::size_t line::ldes::engine::StationState::nservers = 1 |
Definition at line 696 of file ldes_engine.h.
| std::vector<bool> line::ldes::engine::StationState::off |
Definition at line 893 of file ldes_engine.h.
| std::vector<std::deque<Job> > line::ldes::engine::StationState::orbit |
per class, oldest first
Definition at line 874 of file ldes_engine.h.
| std::vector<Sampler> line::ldes::engine::StationState::orbit_abandon |
Definition at line 875 of file ldes_engine.h.
| double line::ldes::engine::StationState::orbit_last = 0.0 |
Definition at line 879 of file ldes_engine.h.
| std::vector<double> line::ldes::engine::StationState::orbit_size |
live, per class
Definition at line 877 of file ldes_engine.h.
| std::vector<std::size_t> line::ldes::engine::StationState::parallelism |
Queue.setServerParallelism(class, n): the servers a class-r job seizes for the whole of its service, one entry per class.
The job holds the WHOLE SET or it waits, so the station serves at most floor(c/n) of them at once and the utilization one contributes is n/c rather than 1/c. That is JMT's Server.serverNumRequired, and it is not the same model as an n-fold slower server, which would leave the other slots free for someone else.
Definition at line 1031 of file ldes_engine.h.
| bool line::ldes::engine::StationState::pas = false |
A PASS-AND-SWAP station serves an ORDERED LIST whose total rate is a function of the whole class sequence (Dorsman and Gardner 2024).
The rate of the token at position p is the INCREMENT mu(c1..cp) - mu(c1..c_{p-1}), which is what makes the station order-independent. On a completion at position p the departing job is not the one at p: the SWAP GRAPH chains forward from p to the last position reachable through it, and that job departs while the chain shifts into the hole. An empty swap graph is the plain OI station, where p itself departs.
Definition at line 742 of file ldes_engine.h.
| std::vector<Job> line::ldes::engine::StationState::pas_list |
Definition at line 745 of file ldes_engine.h.
| std::function<double(const std::vector<std::size_t>&)> line::ldes::engine::StationState::pas_rate |
Definition at line 743 of file ldes_engine.h.
| std::vector<std::vector<bool> > line::ldes::engine::StationState::pas_swap |
Definition at line 744 of file ldes_engine.h.
| std::uint64_t line::ldes::engine::StationState::pas_tag = 0 |
Definition at line 746 of file ldes_engine.h.
| std::vector<Sampler> line::ldes::engine::StationState::patience |
Reneging: the abandonment timer of a WAITING job, per class.
Definition at line 883 of file ldes_engine.h.
| std::size_t line::ldes::engine::StationState::poll_at = 0 |
the buffer the server is serving or heading to
Definition at line 766 of file ldes_engine.h.
| std::size_t line::ldes::engine::StationState::poll_budget = 0 |
remaining visit budget; 0 = exhausted
Definition at line 769 of file ldes_engine.h.
| bool line::ldes::engine::StationState::poll_expired = false |
non-preemptive: end the visit at the next completion
Definition at line 821 of file ldes_engine.h.
| bool line::ldes::engine::StationState::poll_ext = false |
POLLING EXTENSIONS (set_polling_table, set_polling_order, set_polling_timer), the event-driven counterpart of State.pollingInfo/pollingAdvance and of the Java engine's pollingExtAdvance.
A station with none of them leaves poll_ext false and keeps the cyclic walk above untouched.
The server walks a RING of positions: the table entries, or the polled classes in cyclic order, or (under a load-dependent order) the classes themselves. poll_leg[p] is the walk OUT of position p (under a load-dependent order, out of class p), absent when immediate. Under a visit timer the visit ends when the timer fires: after the job in service (non-preemptive), or at once with that job put back at the head of its buffer to restart (preemptive). A GLOBAL timer is a timed token: poll_trt[r] is the absolute expiry of class r's token rotation timer, restarted at every arrival of the token at r, and the visit may hold the server only for what was left of the previous rotation.
Definition at line 805 of file ldes_engine.h.
| std::size_t line::ldes::engine::StationState::poll_gate = 0 |
DECREMENTING: jobs found at the polling instant.
Definition at line 770 of file ldes_engine.h.
| std::vector<bool> line::ldes::engine::StationState::poll_has_leg |
Definition at line 809 of file ldes_engine.h.
| std::vector<bool> line::ldes::engine::StationState::poll_has_tlaw |
Definition at line 816 of file ldes_engine.h.
| std::size_t line::ldes::engine::StationState::poll_k = 1 |
Definition at line 772 of file ldes_engine.h.
| std::vector<Sampler> line::ldes::engine::StationState::poll_leg |
Definition at line 808 of file ldes_engine.h.
| lang::PollingOrder line::ldes::engine::StationState::poll_order = lang::PollingOrder::CYCLIC |
Definition at line 810 of file ldes_engine.h.
| bool line::ldes::engine::StationState::poll_parked = false |
Definition at line 768 of file ldes_engine.h.
| std::vector<bool> line::ldes::engine::StationState::poll_polled |
Definition at line 817 of file ldes_engine.h.
| std::size_t line::ldes::engine::StationState::poll_pos = 0 |
current position in the ring
Definition at line 807 of file ldes_engine.h.
| bool line::ldes::engine::StationState::poll_preempt = false |
Definition at line 814 of file ldes_engine.h.
| std::vector<std::size_t> line::ldes::engine::StationState::poll_ring |
class (0-based) at each position
Definition at line 806 of file ldes_engine.h.
| bool line::ldes::engine::StationState::poll_switching = false |
Definition at line 767 of file ldes_engine.h.
| std::size_t line::ldes::engine::StationState::poll_thr_class = 0 |
THRESHOLD priority class, 0-based.
Definition at line 811 of file ldes_engine.h.
| long line::ldes::engine::StationState::poll_thr_l = 0 |
Definition at line 812 of file ldes_engine.h.
| lang::PollingTimer line::ldes::engine::StationState::poll_timer = lang::PollingTimer::NONE |
Definition at line 813 of file ldes_engine.h.
| std::uint64_t line::ldes::engine::StationState::poll_timer_tag = 0 |
the live visit timer, 0 = none
Definition at line 820 of file ldes_engine.h.
| std::vector<Sampler> line::ldes::engine::StationState::poll_tlaw |
visit timer law per class
Definition at line 815 of file ldes_engine.h.
| std::vector<double> line::ldes::engine::StationState::poll_trt |
GLOBAL: token rotation timer expiry per class.
Definition at line 818 of file ldes_engine.h.
| bool line::ldes::engine::StationState::poll_trt_ready = false |
Definition at line 819 of file ldes_engine.h.
| lang::PollingType line::ldes::engine::StationState::poll_type = lang::PollingType::EXHAUSTIVE |
Definition at line 771 of file ldes_engine.h.
| bool line::ldes::engine::StationState::polling = false |
A POLLING SERVER visits the per-class buffers in a fixed cyclic order, paying a SWITCHOVER on each leg.
It advances ONE STEP AT A TIME and pays that step's switchover whether or not the buffer it reaches holds work. Skipping ahead to the next non-empty buffer for a single switchover is a different and much faster discipline: it shortens the cycle and understates the waiting time by tens of percent against Takagi's exact formulas, which assume the walking server. The one exception is a lap made entirely of zero-time legs, which would spin forever at the same instant: there the server PARKS and the next arrival restarts it.
The switchover charged to a leg is the one stored against the buffer being LEFT – that is Takagi's r_i and what Queue.setSwitchover means – not the one against the buffer being entered.
Definition at line 765 of file ldes_engine.h.
| std::vector<int> line::ldes::engine::StationState::power |
[slot] PowerState
Definition at line 849 of file ldes_engine.h.
| std::vector<std::uint64_t> line::ldes::engine::StationState::power_tag |
[slot] generation of the live power timer
Definition at line 850 of file ldes_engine.h.
| bool line::ldes::engine::StationState::preemptive = false |
Definition at line 687 of file ldes_engine.h.
| bool line::ldes::engine::StationState::ps = false |
Definition at line 686 of file ldes_engine.h.
| std::vector<double> line::ldes::engine::StationState::ps_cd |
The class-dependent speed a SHARING station is running at right now, one entry per class.
It is cached rather than recomputed because ps_advance integrates the interval that just ENDED while the caller has already written the new population: reading the handle there would credit that interval at the speed that only starts now. ps_reschedule refreshes it in the same breath as it re-times the departures, which is the moment the new speed actually takes effect – the same flush-then-install order Accum::set_busy_scale uses for load dependence.
Definition at line 1059 of file ldes_engine.h.
| std::vector<PsJob> line::ldes::engine::StationState::ps_jobs |
Definition at line 987 of file ldes_engine.h.
| double line::ldes::engine::StationState::ps_last_update = 0.0 |
Definition at line 988 of file ldes_engine.h.
| Sampler line::ldes::engine::StationState::repair_time |
Definition at line 1076 of file ldes_engine.h.
| bool line::ldes::engine::StationState::resume = false |
PR (continue the residual) as against PI (redraw).
Definition at line 688 of file ldes_engine.h.
| std::vector<Sampler> line::ldes::engine::StationState::retrial |
RETRIAL: a retrial station has NO WAITING ROOM.
A job of a retrial class that finds every server busy joins an ORBIT and re-offers itself later; a freed server is never filled from the orbit, only by a retry.
The orbit is not a waiting line, but it IS part of the station population, as in the reference (MATLAB SSA holds it in the station, MAM and CTMC count it in QLen, manual Section 5.3.5): QLen counts orbiting jobs, the response time runs from the first arrival, and the capacity bounds service plus orbit, so setOrbit's cap = nservers + maxOrbit is what loses a job arriving to a full orbit.
Definition at line 869 of file ldes_engine.h.
| std::vector<double> line::ldes::engine::StationState::retrial_lost |
Definition at line 880 of file ldes_engine.h.
| std::vector<int> line::ldes::engine::StationState::retrial_policy |
1 = LINEAR (a clock per job), 2 = CONSTANT (one per orbit)
Definition at line 872 of file ldes_engine.h.
| std::vector<double> line::ldes::engine::StationState::retried |
Definition at line 880 of file ldes_engine.h.
| Role line::ldes::engine::StationState::role = Role::Queue |
Definition at line 684 of file ldes_engine.h.
| bool line::ldes::engine::StationState::rr = false |
ROUND ROBIN (SchedStrategy::RR): the per-class quantum law, and per slot the identity of the quantum clock armed for the job it serves, 0 when none.
The clock has its OWN identity rather than the slot's server_tag because a rate change retags the departure (sd_reschedule_one) without restarting the quantum, which is wall-clock time.
Definition at line 783 of file ldes_engine.h.
| std::vector<std::uint64_t> line::ldes::engine::StationState::rr_qtag |
Definition at line 785 of file ldes_engine.h.
| std::vector<Sampler> line::ldes::engine::StationState::rr_quantum |
Definition at line 784 of file ldes_engine.h.
| lang::SchedStrategy line::ldes::engine::StationState::sched = lang::SchedStrategy::FCFS |
Definition at line 685 of file ldes_engine.h.
| double line::ldes::engine::StationState::sd_last_update = 0.0 |
Definition at line 1077 of file ldes_engine.h.
| std::vector<Job> line::ldes::engine::StationState::server |
Definition at line 962 of file ldes_engine.h.
| std::vector<bool> line::ldes::engine::StationState::server_blocked |
A server holding a completed job it cannot hand on, because its destination is full.
It is NOT free: refusing to start a new service is the whole content of blocking, and a blocked slot treated as idle turns a blocking network into a lossless one with the same topology.
Definition at line 972 of file ldes_engine.h.
| std::vector<bool> line::ldes::engine::StationState::server_busy |
Definition at line 963 of file ldes_engine.h.
| std::vector<bool> line::ldes::engine::StationState::server_held |
A server HELD ACROSS A SYNCHRONOUS CALL.
Its job has left for the callee and the slot is NOT free: releasing it would let the caller serve someone else while its own call is outstanding, which is the asynchronous model under the synchronous one's name. Separate from server_blocked, which holds a COMPLETED job whose destination is full.
Definition at line 980 of file ldes_engine.h.
| std::vector<double> line::ldes::engine::StationState::server_start |
instant the held job entered service
Definition at line 964 of file ldes_engine.h.
| std::vector<std::uint64_t> line::ldes::engine::StationState::server_tag |
Definition at line 965 of file ldes_engine.h.
| std::vector<std::size_t> line::ldes::engine::StationState::server_type |
per slot, its pool
Definition at line 937 of file ldes_engine.h.
| std::vector<Sampler> line::ldes::engine::StationState::setup_law |
[class], valid where has_setup_law
Definition at line 844 of file ldes_engine.h.
| bool line::ldes::engine::StationState::size_ordered = false |
The waiting room is ranked by the job's SAMPLED size, so the size has to exist before the job enters service.
A time-inhomogeneous law is drawn at the service start instant everywhere else (see draw_at_arrival); here it cannot be, and is drawn on arrival as the reference does.
Definition at line 695 of file ldes_engine.h.
| bool line::ldes::engine::StationState::state_dependent = false |
True when the station's service RATE depends on its own population, i.e.
it declares a load- or class-dependence table.
Such a station cannot schedule a departure once and forget it: the rate in force changes every time the population does, so the residual work must be integrated forward and the completion re-timed at each change – the same discipline a sharing station needs, for a different reason. Applying the scaling only at service start would time every completion at the rate that happened to hold when it began.
Definition at line 1001 of file ldes_engine.h.
| std::vector<Sampler> line::ldes::engine::StationState::svc |
Definition at line 892 of file ldes_engine.h.
| std::vector<Sampler> line::ldes::engine::StationState::switchover |
Definition at line 773 of file ldes_engine.h.
| std::vector<double> line::ldes::engine::StationState::tot_orbit |
time integral of the orbit size
Definition at line 878 of file ldes_engine.h.
| std::vector<std::vector<bool> > line::ldes::engine::StationState::type_compat |
[pool][class]
Definition at line 940 of file ldes_engine.h.
| std::vector<std::size_t> line::ldes::engine::StationState::type_count |
per pool, its server count
Definition at line 939 of file ldes_engine.h.
| std::vector<std::size_t> line::ldes::engine::StationState::type_first |
per pool, its first slot
Definition at line 938 of file ldes_engine.h.
| std::vector<std::vector<bool> > line::ldes::engine::StationState::type_has_svc |
[pool][class], a law of its own
Definition at line 942 of file ldes_engine.h.
| std::vector<std::size_t> line::ldes::engine::StationState::type_order |
ALIS/FAIRNESS rotate this order; a used pool goes to the back.
Definition at line 946 of file ldes_engine.h.
| std::vector<std::vector<double> > line::ldes::engine::StationState::type_rate |
[pool][class], 1/mean, for FSF
Definition at line 943 of file ldes_engine.h.
| std::vector<std::vector<Sampler> > line::ldes::engine::StationState::type_svc |
[pool][class]
Definition at line 941 of file ldes_engine.h.
| bool line::ldes::engine::StationState::up = true |
Definition at line 1072 of file ldes_engine.h.
| double line::ldes::engine::StationState::util_peak = 1.0 |
max(c, max(alpha)): the peak capacity the utilization is reported against.
Definition at line 1014 of file ldes_engine.h.
| std::vector<double> line::ldes::engine::StationState::weight |
schedparam, the DPS/GPS weights
Definition at line 717 of file ldes_engine.h.