![]() |
LINE Solver (C++)
Templated C++ port of the LINE queueing solver
|
The parameters of a Cache node, MATLAB's sn.nodeparam{ind} for a Cache. More...
#include <line/lang/qn/network_struct.h>
Classes | |
| struct | Popularity |
| The popularity LAW each class declared, beside the pmf it expands to. More... | |
Public Attributes | |
| std::size_t | nitems = 0 |
| std::vector< int > | itemcap |
| std::vector< std::size_t > | classitem |
| Item read by each per-item class of a cache network (MATLAB Cache.setItemReadClasses, sn.nodeparam{i}.classitem), 1-based, 0 where the class is not one. | |
| std::vector< int > | itemsize |
| Per-item storage cost (size) and per-list cap on the total cost of the resident items (ton21cache Sec. | |
| std::vector< int > | costcap |
| bool | costcapglobal = false |
| std::vector< std::vector< T > > | pread |
| (u) x (n), empty row = NaN | |
| std::vector< Popularity > | preadkind |
| per class, parallel to pread | |
| lang::ReplacementStrategy | replacestrat = lang::ReplacementStrategy::RR |
| std::vector< std::size_t > | hitclass |
| std::vector< std::size_t > | missclass |
| std::vector< std::vector< Matrix< T > > > | accost |
| (u) x (n) of (h+1)x(h+1), or empty | |
| T | qlru = num_traits<T>::from_int(1) |
| q-LRU admission probability; 1 admits every miss (plain LRU). | |
| int | retrieval_capacity = 0 |
| Delayed-hit retrieval system (Cache.setRetrievalSystem). | |
| std::map< std::size_t, std::vector< std::size_t > > | retrieval_queues |
| read class(0-based)->nodes | |
| std::vector< std::vector< std::size_t > > | retrieval_classes |
| (nitems x nclasses), 1-based | |
| std::vector< T > | initstate |
| The DECLARED initial contents of the cache, as the reference dumps the node's state row: the per-class job counts, then the list contents, then the retrieval bitmap. | |
| long | max_pending_retrieval = -1 |
| Truncation level of block B: how many secondary requests may be merged onto the in-flight fetches of this cache at once. | |
The parameters of a Cache node, MATLAB's sn.nodeparam{ind} for a Cache.
itemcap is the capacity of each of the h cache lists (a single-level cache has one entry). nitems is the item population n.
pread[v] is the read distribution of class v over the n items; an EMPTY row is MATLAB's NaN placeholder, "class v does not read this cache", and leaves that class's rates at zero. accost[v][k] is the ((h+1) x (h+1)) list-to-list routing matrix of class v on item k; an EMPTY accost selects the reference default, the linear cache in which an item moves from list l to l+1 on a hit. These two match da::CacheParam exactly, so da_cache_isolate consumes them without a conversion.
hitclass and missclass are the 1-based classes a job of class r switches into on a hit and on a miss, 0 meaning the transition is disabled.
Definition at line 554 of file network_struct.h.
| std::vector<std::vector<Matrix<T> > > line::qn::CacheParam< T >::accost |
(u) x (n) of (h+1)x(h+1), or empty
Definition at line 592 of file network_struct.h.
Referenced by line::qn::after_event_cache(), line::io::build_network_from_json(), line::retrieval::cache_retrieval_inputs(), line::da::da_cacheqn(), line::da::da_cacheqn_retrieval(), line::ldes::engine::ldes_engine_reject(), line::io::network_to_json(), line::fluid::solver_fld_cacheqn_tran(), and line::mva::solver_mva_cache_analyzer().
| std::vector<std::size_t> line::qn::CacheParam< T >::classitem |
Item read by each per-item class of a cache network (MATLAB Cache.setItemReadClasses, sn.nodeparam{i}.classitem), 1-based, 0 where the class is not one.
Stored rather than inferred from a one-hot pread, which is ambiguous against a genuine single-item popularity.
Definition at line 563 of file network_struct.h.
Referenced by line::io::build_network_from_json(), line::io::network_to_json(), line::qn::Network< double >::set_item_read_classes(), and line::qn::Network< double >::set_miss_cache().
| std::vector<int> line::qn::CacheParam< T >::costcap |
Definition at line 571 of file network_struct.h.
Referenced by line::io::build_network_from_json(), line::da::da_cacheqn(), line::nc::nc_cache_missrate(), and line::io::network_to_json().
| bool line::qn::CacheParam< T >::costcapglobal = false |
Definition at line 572 of file network_struct.h.
Referenced by line::io::build_network_from_json(), and line::io::network_to_json().
| std::vector<std::size_t> line::qn::CacheParam< T >::hitclass |
Definition at line 591 of file network_struct.h.
Referenced by line::qn::after_event_cache(), line::io::build_network_from_json(), line::solvers::cache_reads_class(), line::io::JmtWriter< T >::cache_refusal(), line::da::da_cacheqn(), line::da::da_cacheqn_retrieval(), line::mva::filter_metric(), line::qn::from_marginal_node(), line::io::jmt_cache_classes(), line::io::jmt_exportable_classes(), line::io::network_to_json(), line::qn::NetworkStruct< T >::refresh_cacheqn_actual_visits(), line::qn::NetworkStruct< T >::refresh_chains(), line::qn::NetworkStruct< T >::refresh_routing(), line::qn::Network< double >::set_cache_hit_class(), line::qn::Network< double >::set_item_read_classes(), line::qn::Network< double >::set_miss_cache(), line::qn::Network< double >::set_retrieval_system(), line::mva::solver_mva_cache_analyzer(), and line::mva::solver_mva_retrieval_analyzer().
| std::vector<T> line::qn::CacheParam< T >::initstate |
The DECLARED initial contents of the cache, as the reference dumps the node's state row: the per-class job counts, then the list contents, then the retrieval bitmap.
Empty means the cache starts empty, which is what initDefault builds; a warm cache is not derivable from anything else.
Definition at line 611 of file network_struct.h.
Referenced by line::io::build_network_from_json(), and line::io::network_to_json().
| std::vector<int> line::qn::CacheParam< T >::itemcap |
Definition at line 556 of file network_struct.h.
Referenced by line::qn::after_event_cache(), line::io::build_network_from_json(), line::io::JmtWriter< T >::cache_refusal(), line::retrieval::cache_retrieval_inputs(), line::mc::ctmc_state_space_logsize(), line::da::da_cacheqn(), line::da::da_cacheqn_retrieval(), line::qn::from_marginal_node(), line::qn::from_marginal_node_first(), line::io::network_to_json(), line::qn::Network< double >::set_retrieval_system(), line::mva::solver_mva_cache_analyzer(), and line::nc::solver_nc_cacheqn_analyzer().
| std::vector<int> line::qn::CacheParam< T >::itemsize |
Per-item storage cost (size) and per-list cap on the total cost of the resident items (ton21cache Sec.
IX). BOTH EMPTY = unconstrained, the classic model. costcapglobal records that the caps came from a single cache-wide value.
Definition at line 570 of file network_struct.h.
Referenced by line::io::build_network_from_json(), line::da::da_cacheqn(), line::nc::nc_cache_missrate(), and line::io::network_to_json().
| long line::qn::CacheParam< T >::max_pending_retrieval = -1 |
Truncation level of block B: how many secondary requests may be merged onto the in-flight fetches of this cache at once.
-1 is UNBOUNDED, which is what a sample path needs and what State.afterEventCache calls the isSimulation branch; a non-negative value is the enumeration bound an exact solver generates its local state space under.
Definition at line 619 of file network_struct.h.
Referenced by line::qn::after_event_cache(), and line::qn::from_marginal_node().
| std::vector<std::size_t> line::qn::CacheParam< T >::missclass |
Definition at line 591 of file network_struct.h.
Referenced by line::qn::after_event_cache(), line::io::build_network_from_json(), line::solvers::cache_reads_class(), line::io::JmtWriter< T >::cache_refusal(), line::da::da_cacheqn(), line::da::da_cacheqn_retrieval(), line::mva::filter_metric(), line::qn::from_marginal_node(), line::io::jmt_cache_classes(), line::io::jmt_exportable_classes(), line::io::network_to_json(), line::qn::NetworkStruct< T >::refresh_cacheqn_actual_visits(), line::qn::NetworkStruct< T >::refresh_chains(), line::qn::NetworkStruct< T >::refresh_routing(), line::qn::Network< double >::set_cache_miss_class(), line::qn::Network< double >::set_item_miss_class(), line::qn::Network< double >::set_item_read_classes(), line::qn::Network< double >::set_miss_cache(), line::qn::Network< double >::set_retrieval_system(), line::mva::solver_mva_cache_analyzer(), and line::mva::solver_mva_retrieval_analyzer().
| std::size_t line::qn::CacheParam< T >::nitems = 0 |
Definition at line 555 of file network_struct.h.
Referenced by line::qn::after_event_cache(), line::io::build_network_from_json(), line::io::JmtWriter< T >::cache_refusal(), line::retrieval::cache_retrieval_inputs(), line::mc::ctmc_state_space_logsize(), line::da::da_cacheqn(), line::da::da_cacheqn_retrieval(), line::qn::from_marginal_node(), line::qn::from_marginal_node_first(), line::qn::Network< double >::link(), line::io::network_to_json(), line::qn::Network< double >::set_cache_read(), line::qn::Network< double >::set_item_read_classes(), line::qn::Network< double >::set_retrieval_system(), line::mva::solver_mva_cache_analyzer(), and line::nc::solver_nc_cacheqn_analyzer().
| std::vector<std::vector<T> > line::qn::CacheParam< T >::pread |
(u) x (n), empty row = NaN
Definition at line 573 of file network_struct.h.
Referenced by line::qn::after_event_cache(), line::io::build_network_from_json(), line::solvers::cache_reads_class(), line::io::JmtWriter< T >::cache_refusal(), line::retrieval::cache_retrieval_inputs(), line::da::da_cacheqn(), line::da::da_cacheqn_retrieval(), line::io::network_to_json(), line::qn::Network< double >::set_cache_read(), line::qn::Network< double >::set_item_read_classes(), line::qn::Network< double >::set_miss_cache(), line::qn::Network< double >::set_retrieval_system(), and line::mva::solver_mva_cache_analyzer().
| std::vector<Popularity> line::qn::CacheParam< T >::preadkind |
per class, parallel to pread
Definition at line 589 of file network_struct.h.
Referenced by line::io::build_network_from_json(), line::io::JmtWriter< T >::cache_refusal(), line::qn::Network< double >::set_cache_read(), line::qn::Network< double >::set_item_read_classes(), line::qn::Network< double >::set_miss_cache(), and line::qn::Network< double >::set_retrieval_system().
| T line::qn::CacheParam< T >::qlru = num_traits<T>::from_int(1) |
q-LRU admission probability; 1 admits every miss (plain LRU).
Definition at line 594 of file network_struct.h.
Referenced by line::qn::after_event_cache(), line::io::build_network_from_json(), and line::io::network_to_json().
| lang::ReplacementStrategy line::qn::CacheParam< T >::replacestrat = lang::ReplacementStrategy::RR |
Definition at line 590 of file network_struct.h.
Referenced by line::qn::after_event_cache(), line::io::build_network_from_json(), line::io::JmtWriter< T >::cache_refusal(), line::da::da_cacheqn(), line::nc::nc_cache_missrate(), line::io::network_to_json(), line::fluid::solver_fld_cacheqn_tran(), line::mva::solver_mva_cache_analyzer(), and line::nc::solver_nc_cacheqn_analyzer().
| int line::qn::CacheParam< T >::retrieval_capacity = 0 |
Delayed-hit retrieval system (Cache.setRetrievalSystem).
Zero capacity = none. retrieval_queues[r] are the 1-based retrieval-station node indices a read of class r (0-based key) circulates on a miss; retrieval_classes is (nitems x nclasses), item i of read class r -> the per-item retrieval class (1-based), 0 where none. Built by set_retrieval_system.
Definition at line 602 of file network_struct.h.
Referenced by line::qn::after_event_cache(), line::io::build_network_from_json(), line::retrieval::cache_retrieval_inputs(), line::mc::ctmc_state_space_logsize(), line::qn::from_marginal_node(), line::qn::from_marginal_node_first(), line::qn::Network< double >::link(), line::io::network_to_json(), and line::qn::Network< double >::set_retrieval_system().
| std::vector<std::vector<std::size_t> > line::qn::CacheParam< T >::retrieval_classes |
(nitems x nclasses), 1-based
Definition at line 604 of file network_struct.h.
Referenced by line::qn::after_event_cache(), line::io::build_network_from_json(), line::qn::cache_retrieval_class_map(), line::retrieval::cache_retrieval_inputs(), line::da::da_cacheqn_retrieval(), line::qn::Network< double >::link(), line::io::network_to_json(), line::qn::NetworkStruct< T >::refresh_chains(), and line::qn::Network< double >::set_retrieval_system().
| std::map<std::size_t, std::vector<std::size_t> > line::qn::CacheParam< T >::retrieval_queues |
read class(0-based)->nodes
Definition at line 603 of file network_struct.h.
Referenced by line::io::build_network_from_json(), line::retrieval::cache_retrieval_inputs(), line::da::da_cacheqn_retrieval(), line::qn::Network< double >::link(), line::io::network_to_json(), and line::qn::Network< double >::set_retrieval_system().