Class CacheTwins
python/examples/basic/cacheModel/: the replacement-policy comparison,
the refined mean-field cache, and the five retrieval systems (delayed hits).
THE RETRIEVAL MODELS ARE BUILT HERE rather than taken from
CacheRetrievalSystemModel. Those builders
are parameterized over service-rate and routing MATRICES and therefore always
write a per-item override; four of the five reference scripts write NONE and
let setRetrievalSystem inherit the read class's service and topology,
which is a different model. A twin that is compared cell for cell against the
reference has to be the reference's model, so the scripts are transcribed.
WHAT THE PARSER READS differs per family: the replacement comparison is
one policy: v1, v2, v3 line per policy (parse_cache_comparison),
the RMF example is its labelled hit/miss rates (parse_cache_rmf), and
the retrieval examples are the getAvgCacheTable the JAR prints under
each SOLVER: banner.
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidcache_compare_replc.py: the hit ratio of RR, FIFO and LRU under the exact chain, MVA and the normalizing constants.static Networkretrieval_chain.py: two FCFS retrieval stations in series.static Networkretrieval_default.py: two PS retrieval stations in series, with item 0 given a faster fetch and a short circuit past the second queue.static Networkretrieval_ps.py: a seven-item RR cache behind one PS station.static Networkretrieval_routing.py: three retrieval stations with a per-item routing law over [IS, Queue 1, Queue 2, Cache], the cache last.static Networkretrieval_simple.py: one INF retrieval station, nothing overridden.
-
Method Details
-
cacheCompareReplc
cache_compare_replc.py: the hit ratio of RR, FIFO and LRU under the exact chain, MVA and the normalizing constants.- Throws:
Exception
-
retrievalSimple
retrieval_simple.py: one INF retrieval station, nothing overridden. -
retrievalDefault
retrieval_default.py: two PS retrieval stations in series, with item 0 given a faster fetch and a short circuit past the second queue. -
retrievalChain
retrieval_chain.py: two FCFS retrieval stations in series. -
retrievalPs
retrieval_ps.py: a seven-item RR cache behind one PS station. -
retrievalRouting
retrieval_routing.py: three retrieval stations with a per-item routing law over [IS, Queue 1, Queue 2, Cache], the cache last.
-