![]() |
LINE Solver (C++)
Templated C++ port of the LINE queueing solver
|
#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) |
| Delayed-hit retrieval system (Cache.setRetrievalSystem). | |
| int | retrieval_capacity = 0 |
| 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. | |
Definition at line 477 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 515 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::io::network_to_json(), line::fluid::solver_fld_cacheqn_tran(), line::mva::solver_mva_cache_analyzer(), and line::nc::solver_nc_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 486 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 494 of file network_struct.h.
Referenced by line::io::build_network_from_json(), line::io::network_to_json(), and line::nc::solver_nc_cache_analyzer().
| bool line::qn::CacheParam< T >::costcapglobal = false |
Definition at line 495 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 514 of file network_struct.h.
Referenced by line::qn::after_event_cache(), line::io::build_network_from_json(), 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_item_read_classes(), line::qn::Network< double >::set_miss_cache(), line::qn::Network< double >::set_retrieval_system(), line::mva::solver_mva_cache_analyzer(), line::mva::solver_mva_retrieval_analyzer(), line::nc::solver_nc_cache_analyzer(), and line::nc::solver_nc_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 534 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 479 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::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(), line::nc::solver_nc_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 493 of file network_struct.h.
Referenced by line::io::build_network_from_json(), line::io::network_to_json(), and line::nc::solver_nc_cache_analyzer().
| 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 542 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 514 of file network_struct.h.
Referenced by line::qn::after_event_cache(), line::io::build_network_from_json(), 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_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(), line::mva::solver_mva_retrieval_analyzer(), line::nc::solver_nc_cache_analyzer(), and line::nc::solver_nc_retrieval_analyzer().
| std::size_t line::qn::CacheParam< T >::nitems = 0 |
Definition at line 478 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::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_item_read_classes(), line::qn::Network< double >::set_retrieval_system(), line::mva::solver_mva_cache_analyzer(), line::nc::solver_nc_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 496 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::io::network_to_json(), 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::nc::solver_nc_cache_analyzer().
| std::vector<Popularity> line::qn::CacheParam< T >::preadkind |
per class, parallel to pread
Definition at line 512 of file network_struct.h.
Referenced by line::io::build_network_from_json(), 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) |
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. q-LRU admission probability; 1 admits every miss (plain LRU).
Definition at line 524 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 513 of file network_struct.h.
Referenced by line::qn::after_event_cache(), line::io::build_network_from_json(), line::da::da_cacheqn(), line::io::network_to_json(), line::fluid::solver_fld_cacheqn_tran(), line::mva::solver_mva_cache_analyzer(), line::nc::solver_nc_cache_analyzer(), and line::nc::solver_nc_cacheqn_analyzer().
| int line::qn::CacheParam< T >::retrieval_capacity = 0 |
Definition at line 525 of file network_struct.h.
Referenced by line::qn::after_event_cache(), line::io::build_network_from_json(), line::retrieval::cache_retrieval_inputs(), 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 527 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 526 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().