![]() |
LINE Solver (C++)
Templated C++ port of the LINE queueing solver
|
The writer itself. More...
#include <line/io/jmt_writer.h>
Public Member Functions | |
| JmtWriter (const qn::NetworkStruct< T > &sn, const JmtWriteOptions &opt) | |
| std::string | write_jsim () |
| Port of @@JMTIO/writeJSIM.m; returns the serialized document. | |
| std::string | buffer_capacity_refusal (bool jmva_engine) const |
| The buffer-capacity refusals of save_buffer_capacity, as a SENTENCE rather than an exception; empty when every buffer is exportable. | |
| std::string | cache_refusal (std::size_t ind) const |
| Everything save_cache_strategy refuses for cache node ind, as a SENTENCE; empty when JMT reproduces the cache (MATLAB jmtCachePromotion, shared by saveCacheStrategy and jmtMethodRefusal). | |
The writer itself.
One instance per exported model; it holds the derived tables (connections, exportable classes, cache classes) that nearly every handler reads, so they are computed once rather than per section as the reference recomputes them.
Definition at line 496 of file jmt_writer.h.
|
inline |
Definition at line 498 of file jmt_writer.h.
References line::io::jmt_cache_classes(), line::io::jmt_conn_matrix(), and line::io::jmt_exportable_classes().
|
inline |
The buffer-capacity refusals of save_buffer_capacity, as a SENTENCE rather than an exception; empty when every buffer is exportable.
ONE PREDICATE, TWO CALLERS. save_buffer_capacity raises it while writing the JSIM document, and jmt::jmt_method_refusal returns it so that findSolver never offers a jmt row on a model the writer will refuse. It was reachable only from inside the writer, which is why the gate could not see it and offered jmt.jsim on a binding buffer.
WHAT MAKES A BUFFER BIND is not that sn.cap is finite: refresh_capacity DERIVES a finite cap for every station nobody capped. It is that the cap is strictly below the population that can REACH the station, and an infinite-server station has no buffer at all – the same two tests save_buffer_capacity applies before it exports anything.
jmva_engine selects the verdict, because the two engines fail a binding buffer for OPPOSITE reasons. JSIM exports it whenever JMT can read the drop rule, so only assert_station_cap_exportable's cases go. JMVA has no capacity element in its document at all – write_jmva emits a station type, a per-chain demand and a per-chain visit count and nothing else – so ANY binding buffer would be solved as if it were unbounded: measured on a closed Delay+FCFS model, N=4, cap 2, every jmva method reported 2.19 jobs at a station that can hold 2, against the exact 1.33.
Definition at line 543 of file jmt_writer.h.
References line::io::jmt_int().
Referenced by line::io::jmt_buffer_capacity_refusal().
|
inline |
Everything save_cache_strategy refuses for cache node ind, as a SENTENCE; empty when JMT reproduces the cache (MATLAB jmtCachePromotion, shared by saveCacheStrategy and jmtMethodRefusal).
ONE PREDICATE, TWO CALLERS: the writer raises it, and jmt::jmt_method_refusal returns it through jmt_cache_refusal, so the supports check and findSolver refuse a FIFO list of capacity 2 that the writer would refuse at run time instead of offering jmt.jsim on it. Unlike MATLAB, this port keeps the popularity KIND on the struct (CacheParam::preadkind), so the popularity rules are visible to the gate as well.
Definition at line 2877 of file jmt_writer.h.
References line::lang::DISCRETESAMPLER, line::lang::FIFO, line::qn::CacheParam< T >::hitclass, line::qn::CacheParam< T >::itemcap, line::lang::LRU, line::qn::CacheParam< T >::missclass, line::qn::CacheParam< T >::nitems, line::qn::CacheParam< T >::pread, line::qn::CacheParam< T >::preadkind, line::qn::CacheParam< T >::replacestrat, line::lang::RR, line::lang::SFIFO, line::qn::CacheParam< T >::Popularity::type, and line::lang::ZIPF.
Referenced by line::io::jmt_cache_refusal().
|
inline |
Port of @@JMTIO/writeJSIM.m; returns the serialized document.
Definition at line 506 of file jmt_writer.h.
References line::xml::element(), and line::xml::serialize().
Referenced by line::io::jmt_write_jsim().