LINE Solver (C++)
Templated C++ port of the LINE queueing solver
Loading...
Searching...
No Matches
line::io Namespace Reference

Namespaces

namespace  code_gen_detail
namespace  jmt_import_detail
namespace  jmva_detail
namespace  tikz_detail
namespace  wfcommons_detail

Classes

struct  Citation
 One bibliography entry. More...
struct  Distrib
struct  ExactValue
 An exact scalar as it crosses to a host without a rational type: the two decimal integer strings, plus the double a host can use directly. More...
struct  JmtDistView
 The (D0, D1) pair a JMT MAP or phase-type parameter block is built from, plus the moments the analytic families are reconstructed from. More...
struct  JmtSections
 The three JMT section class names of a node: input, server, output. More...
struct  JmtWriteOptions
 The simulation controls the JSIM header carries, MATLAB's JMTIO properties. More...
class  JmtWriter
 The writer itself. More...
struct  Map2RenvInfo
 The INFO output of map2renv: how the stage set was assembled. More...
struct  QnModel
class  TikzEdgeRouter
struct  TikzGraph
 Nodes in model order plus sn.connmatrix over them. More...
struct  TikzLayout
 Node positions in cm, indexed like TikzGraph::nodes, and the layers that produced them. More...
struct  TikzNode
 One node as the TikZ exporter sees it. More...
struct  TikzOptions
 Layout and rendering options of the network TikZ exporter (TikZOptions). More...
struct  TikzPoint
 A waypoint in cm. More...
struct  TikzViewResult
 What tikz_view produced. More...
struct  WfCommonsOptions
 The loader options; the defaults are the reference's parseOptions. More...

Typedefs

template<class T>
using LineModel
 What linemodel_load returns: MATLAB's Network, LayeredNetwork, Workflow or Environment.

Enumerations

enum class  JmtMetricKind {
  QLen , Util , RespT , Tput ,
  ArvR , Tard , SysTard
}
 The measure kinds saveMetrics requests, in the order it requests them. More...
enum class  WfDistributionType { EXP , DET , APH , HYPEREXP }
 options.distributionType, the JAR's WfCommonsOptions.DistributionType. More...
enum class  ProcessType
 Distribution kinds, with the values of MATLAB ProcessType. More...
enum class  JoinStrategy
 Join rules, with the values of MATLAB JoinStrategy. More...
enum class  NodeType
 Node kinds, with the values of MATLAB NodeType. More...
enum class  PollingType
 Polling service disciplines, with the values of MATLAB PollingType. More...
enum class  RoutingStrategy
 Routing strategies, with the values of MATLAB RoutingStrategy. More...
enum class  SchedStrategy
 Scheduling disciplines, with the values of MATLAB SchedStrategy. More...

Functions

template<class T>
void qn2matlab (const qn::NetworkStruct< T > &sn, const std::string &model_name, std::ostream &os)
 Port of QN2MATLAB(model, modelName, fid): a MATLAB script that rebuilds the network from its refreshed struct.
template<class T>
void qn2matlab (qn::Network< T > &model, const std::string &model_name, std::ostream &os)
 QN2MATLAB on a model under construction; refreshes it first.
template<class T>
void qn2matlab (qn::Network< T > &model, std::ostream &os)
 QN2MATLAB with MATLAB's default model name.
template<class T>
void qn2matlab (qn::Network< T > &model, const std::string &model_name, const std::string &path)
 QN2MATLAB into a file, as MATLAB does when fid is a file name.
template<class T>
std::string qn2matlab_string (qn::Network< T > &model, const std::string &model_name="myModel")
 QN2MATLAB returned as a string.
template<class T>
void qn2java (const qn::NetworkStruct< T > &sn, const std::string &model_name, std::ostream &os, bool headers=true)
 Port of QN2JAVA(model, modelName, fid, headers): the body of a JLINE method public static Network ex() that rebuilds the network.
template<class T>
void qn2java (qn::Network< T > &model, const std::string &model_name, std::ostream &os, bool headers=true)
 QN2JAVA on a model under construction; refreshes it first.
template<class T>
void qn2java (qn::Network< T > &model, std::ostream &os)
 QN2JAVA with MATLAB's default model name.
template<class T>
void qn2java (qn::Network< T > &model, const std::string &model_name, const std::string &path, bool headers=true)
 QN2JAVA into a file.
template<class T>
std::string qn2java_string (qn::Network< T > &model, const std::string &model_name="myModel", bool headers=true)
 QN2JAVA returned as a string.
template<class T>
void lqn2java (const lqn::LqnModel< T > &model, const std::string &model_name, std::ostream &os)
 Port of LQN2JAVA(model, modelName, fid): a JLINE program that rebuilds the layered network and solves it with SolverLN.
template<class T>
void lqn2java (const lqn::LqnBuilder< T > &b, const std::string &model_name, std::ostream &os)
 LQN2JAVA on a model under construction.
template<class T>
void lqn2java (const lqn::LqnModel< T > &model, std::ostream &os)
 LQN2JAVA with MATLAB's default model name.
template<class T>
void lqn2java (const lqn::LqnModel< T > &model, const std::string &model_name, const std::string &path)
 LQN2JAVA into a file.
template<class T>
std::string lqn2java_string (const lqn::LqnModel< T > &model, const std::string &model_name="myLayeredModel")
 LQN2JAVA returned as a string.
template<class T>
void lqn2matlab (const lqn::LqnModel< T > &m, const std::string &model_name, std::ostream &os)
 Port of LQN2MATLAB(model, modelName, fid), the generator form: a MATLAB script that rebuilds the layered network by the constructors a user writes, with hosts, tasks, entries and activities in model order so the regenerated model has the same LayeredNetworkStruct indexing, and numbers at the shortest spelling that reads back bit for bit.
template<class T>
void lqn2matlab (const lqn::LqnModel< T > &model, std::ostream &os)
 LQN2MATLAB under the model's own name (myLayeredModel when it has none).
template<class T>
void lqn2matlab (const lqn::LqnBuilder< T > &b, const std::string &model_name, std::ostream &os)
 LQN2MATLAB on a model under construction.
template<class T>
void lqn2matlab (const lqn::LqnModel< T > &model, const std::string &model_name, const std::string &path)
 LQN2MATLAB into a file.
template<class T>
std::string lqn2matlab_string (const lqn::LqnModel< T > &model, const std::string &model_name)
 LQN2MATLAB returned as a string.
template<class T>
void line2matlab (qn::Network< T > &model, std::ostream &os)
 Port of LINE2MATLAB(model) for a Network: QN2MATLAB under the model's own name.
template<class T>
void line2matlab (qn::Network< T > &model, const std::string &path)
 Port of LINE2MATLAB(model, filename) for a Network.
template<class T>
void line2java (qn::Network< T > &model, std::ostream &os)
 Port of LINE2JAVA(model) for a Network: QN2JAVA under the model's own name.
template<class T>
void line2java (qn::Network< T > &model, const std::string &path)
 Port of LINE2JAVA(model, filename) for a Network.
template<class T>
void line2java (const lqn::LqnModel< T > &model, const std::string &model_name, std::ostream &os)
 Port of LINE2JAVA(model) for a LayeredNetwork.
template<class T>
void line2java (const lqn::LqnModel< T > &model, const std::string &model_name, const std::string &path)
 Port of LINE2JAVA(model, filename) for a LayeredNetwork.
template<class T>
void line2matlab (const lqn::LqnModel< T > &model, std::ostream &os)
 Port of LINE2MATLAB(model) for a LayeredNetwork: LQN2MATLAB under the model's own name.
template<class T>
void line2matlab (const lqn::LqnModel< T > &model, const std::string &path)
 Port of LINE2MATLAB(model, filename) for a LayeredNetwork.
template<class T>
void line2java (const lqn::LqnModel< T > &model, std::ostream &os)
 Port of LINE2JAVA(model) for a LayeredNetwork under its own name (myLayeredModel when it has none).
template<class T = double>
void line2java_json (const std::string &json_path, std::ostream &os)
 LINE2JAVA on a model.json file, dispatching on the model type as MATLAB dispatches on the class of the object: a LayeredNetwork goes to LQN2JAVA and any other network to QN2JAVA, each under the name the document declares.
template<class T = double>
void line2matlab_json (const std::string &json_path, std::ostream &os)
 LINE2MATLAB on a model.json file: a LayeredNetwork goes to LQN2MATLAB, any other network to QN2MATLAB.
bool docker_daemon_available ()
 True if the Docker daemon is reachable.
bool docker_has_local_image (const std::string &image)
bool docker_pull (const std::string &image)
 Pulls an image, streaming Docker's progress to stdout and stderr.
bool docker_has_storage_for (const std::string &image)
template<class T>
env::Environment< T > build_environment_from_json (const detail::json &root)
 Build an env::Environment<T> from a parsed model.json envelope.
template<class T>
env::Environment< T > read_environment_json (const std::string &path)
 Parse a model.json file into an env::Environment<T>.
std::string jmt_fmt (double x)
 sprintf('%.12f', x), the numeric format of every JMT <value> body.
std::string jmt_int (double x)
 int2str(x): round to nearest, print as a decimal integer.
std::string jmt_num (double x)
 num2str(x): MATLAB's default five-significant-digit form.
std::string jmt_sig2 (double x)
 num2str(x, 2): the two-significant-digit form used for alpha/precision.
xml::Element & jmt_scalar (xml::Element &parent, const char *class_path, const char *name, const std::string &value)
 <subParameter classPath="java.lang.Double" name="NAME"><value>V</value>
xml::Element & jmt_double (xml::Element &parent, const char *name, double v)
 A java.lang.Double scalar subparameter.
template<class T>
JmtDistView< T > jmt_dist_view (const Distrib< T > &d)
 Lower a Distrib to the view above.
bool jmt_is_phase_type (ProcessType t, std::size_t phases)
 True when the reference routes the process through JMT's PhaseTypeDistr rather than through a named analytic law.
xml::Element & jmt_object_array (xml::Element &parent, const char *name)
 <subParameter array="true" classPath="java.lang.Object" name="NAME">
void jmt_append_row (xml::Element &parent, const Matrix< double > &M, std::size_t row, std::size_t n, bool negate_diagonal)
 One vector of entry doubles, the JMT encoding of a matrix row.
template<class T>
void jmt_append_distribution (xml::Element &wrapper, const JmtDistView< T > &v, const char *who)
 Append the distribution and distrPar pair for one process.
template<class T>
qn::Network< T > jsim2line (const std::string &path, const std::string &name=std::string())
 Port of JSIM2LINE(filename, modelName).
template<class T>
qn::Network< T > jmt2line (const std::string &path, const std::string &name=std::string())
 Port of JMT2LINE(filename, modelName): dispatch on the extension.
template<class T>
std::vector< std::vector< bool > > jmt_conn_matrix (const qn::NetworkStruct< T > &sn)
 sn.connmatrix: which ordered pairs of nodes the model LINKED.
template<class T>
std::vector< bool > jmt_exportable_classes (const qn::NetworkStruct< T > &sn)
 Port of getExportableClasses.
template<class T>
JmtSections< T > jmt_sections (const qn::NetworkStruct< T > &sn, std::size_t ind)
const char * jmt_metric_text (JmtMetricKind k)
 The JMT type attribute, MATLAB MetricType.toText.
template<class T>
bool jmt_metric_enabled (const qn::NetworkStruct< T > &sn, JmtMetricKind kind, std::size_t ist, std::size_t r, const std::vector< bool > &is_cache_class)
 Port of the disabled rules in getAvgHandles, per (station, class).
template<class T>
std::vector< bool > jmt_cache_classes (const qn::NetworkStruct< T > &sn)
 The classes a Cache switches jobs into; they keep their Tput/ArvR measures.
xml::Element & jmt_param (xml::Element &section, const char *class_path, const char *name, bool array)
 <parameter array="true" classPath="CP" name="NAME">
void jmt_param_value (xml::Element &section, const char *class_path, const char *name, const std::string &value)
 <parameter classPath="CP" name="NAME"><value>V</value></parameter>
void jmt_ref_class (xml::Element &parent, const std::string &class_name)
 <refClass>NAME</refClass>, the per-class marker of an array parameter.
const char * jmt_drop_text (DropStrategy d)
 MATLAB DropStrategy.toText, the strings JMT's dropRule field expects.
bool jmt_reads_drop (DropStrategy d)
 Whether JMT's queue section can read this drop strategy at all.
const char * jmt_hetero_text (lang::HeteroSchedPolicy p)
 MATLAB HeteroSchedPolicy.toJMTText: JMT's long descriptive identifiers.
template<class T>
std::string jmt_write_jsim (const qn::NetworkStruct< T > &sn, const JmtWriteOptions &opt)
 Port of @@JMTIO/writeJSIM.m: serialize sn as a JMT .jsimg document.
template<class T>
std::string jmt_buffer_capacity_refusal (const qn::NetworkStruct< T > &sn, bool jmva_engine)
 JmtWriter::buffer_capacity_refusal without a document: the writer's own binding-buffer verdict, for the gate in jmt::jmt_method_refusal.
template<class T>
qn::Network< T > jmva2line (const std::string &path, const std::string &name=std::string())
 Port of JMVA2LINE(filename, modelName).
template<class T>
std::string write_jmva (const qn::NetworkStruct< T > &L, const std::string &path, const std::string &method, std::size_t samples)
 Port of writeJMVA(sn, outputFileName, options).
template<class T>
qn::Network< T > read_jsim (const std::string &path, const std::string &name=std::string())
 Read a JSIM document into a Network.
std::string jsim_stage_stdin (const std::string &text)
 Write a piped XML model document to a temporary file and return its path.
const std::map< std::string, Citation > & citation_registry ()
 The whole method name -> reference table, built once.
std::vector< Citation > line_citations (const std::vector< std::string > &method_names)
 The references for METHOD NAMES, de-duplicated by key, in order of appearance.
std::vector< Citation > line_citations_for_method (const std::string &method)
 Convenience for the default/<actual> compound a solver reports.
std::string linemodel_type (const nlohmann::json &root)
 The envelope's model.type of a parsed document; empty when it declares none.
template<class T>
LineModel< T > linemodel_from_json (const nlohmann::json &root)
 Port of linemodel_load(filename) on an already parsed document.
template<class T>
LineModel< T > linemodel_load (const std::string &path)
 Port of linemodel_load(filename).
template<class T>
void linemodel_save (const qn::NetworkStruct< T > &sn, const std::string &path)
 Port of linemodel_save(model, filename) for a refreshed Network struct.
template<class T>
void linemodel_save (qn::Network< T > &model, const std::string &path)
 Port of linemodel_save(model, filename) for a Network; refreshes it first.
template<class T>
void linemodel_save (const lqn::LqnModel< T > &model, const std::string &path)
 Port of linemodel_save(model, filename) for a LayeredNetwork (layered2json).
template<class T>
void linemodel_save (const workflow::Workflow< T > &model, const std::string &path)
 Port of linemodel_save(model, filename) for a Workflow (workflow2json).
template<class T>
void linemodel_save (const env::Environment< T > &model, const std::string &path)
 Port of linemodel_save(model, filename) for an Environment (environment2json).
template<class T>
void linemodel_save (LineModel< T > &model, const std::string &path)
 linemodel_save on whatever linemodel_load returned, dispatched on the alternative held.
template<class T>
detail::json lqn_model_to_json (const lqn::LqnModel< T > &m)
 layered2json: the model object of a LayeredNetwork document.
template<class T>
detail::json workflow_to_json (const workflow::Workflow< T > &wf)
 workflow2json: the model object of a Workflow document.
template<class T>
detail::json environment_to_json (const env::Environment< T > &e)
 environment2json: the model object of an Environment document.
detail::json linemodel_envelope (const detail::json &model)
 The {format, version, model} envelope around a model object, with the wire's non-finites.
void write_linemodel_json (const detail::json &root, const std::string &path)
 Write an envelope, indented as write_network_json indents it.
template<class T>
qn::Network< T > lqn2qn (const lqn::LqnModel< T > &lqn, const std::string &replication="auto", const std::string &name="model", std::vector< std::string > *warnings=nullptr)
 Port of MATLAB LQN2QN(lqn, replication): flatten a layered network into a queueing network whose synchronous calls block through REPLY signals.
template<class T>
qn::Network< T > lqn2qn (const lqn::LqnStruct< T > &lsn, const std::string &replication="auto", const std::string &name="model", std::vector< std::string > *warnings=nullptr)
 LQN2QN over an already flattened LqnStruct.
template<class T>
lqn::LqnModel< T > build_lqn_model_from_json (const detail::json &root)
 Build the intermediate LqnModel<T> from a parsed model.json envelope carrying a LayeredNetwork.
template<class T>
lqn::LqnStruct< T > build_lqn_from_json (const detail::json &root)
 Build an LqnStruct<T> from a parsed model.json envelope carrying a LayeredNetwork.
bool is_layered_json_text (const std::string &text)
 True when a DOCUMENT ALREADY IN MEMORY is a LayeredNetwork model.json.
bool is_layered_json (const std::string &path)
 True when a file is a LayeredNetwork model.json rather than an .lqnx.
template<class T>
lqn::LqnModel< T > read_lqn_json_model (const std::string &path)
 Parse a LayeredNetwork model.json file into its intermediate LqnModel<T>.
template<class T>
lqn::LqnStruct< T > read_lqn_json (const std::string &path)
 Parse a LayeredNetwork model.json file into an LqnStruct<T>.
template<class T>
lqn::LqnStruct< T > read_layered_model (const std::string &path)
 Read a layered model from either interchange: the LINE model.json or the LQNS .lqnx.
template<class T>
lqn::LqnModel< T > read_lqnx_model (const std::string &path)
 Read a .lqnx file into the model-level LqnModel, which write_lqnx accepts back.
template<class T>
lqn::LqnWriteReport write_lqnx (const lqn::LqnModel< T > &m, const std::string &path, const std::string &model_name=std::string("LQN"), bool use_abstract_names=false, std::string *out_text=NULL)
 Write an LqnModel as .lqnx; forwards to lqn::write_lqnx.
template<class T>
env::Environment< T > map2renv (const qn::NetworkStruct< T > &base, Map2RenvInfo< T > *info=nullptr, std::size_t max_stages=64)
template<class T>
env::Environment< T > mapqn2renv (const qn::NetworkStruct< T > &base, Map2RenvInfo< T > *info=nullptr, std::size_t max_stages=64)
 Retained name for the transformation now implemented by map2renv, which generalizes it from a single MMPP2 service process to any number of MAP, MMPP2 or MMAP processes of arbitrary phase order.
template<class T, class S>
Matrix< T > from_column_major (const S *data, std::size_t rows, std::size_t cols)
 Build a Matrix from a column-major host buffer (MATLAB's mxGetPr layout, numpy's order='F').
template<class T, class S>
Matrix< T > from_row_major (const S *data, std::size_t rows, std::size_t cols)
 Build a Matrix from a row-major host buffer (numpy's default order='C').
template<class T>
void to_column_major (const Matrix< T > &m, double *out)
 Write a Matrix into a column-major host buffer, as doubles.
template<class T>
void to_host (const std::vector< T > &v, double *out)
 Write a vector into a host buffer, as doubles.
template<class T>
std::string exact_numerator (const T &)
 Numerator of an exact value as a decimal string; empty for inexact types.
template<class T>
std::string exact_denominator (const T &)
template<class T>
ExactValue marshal_scalar (const T &v)
 Marshal any T; only the exact instantiation fills numerator/denominator.
template<>
std::string exact_numerator< Rational > (const Rational &v)
template<>
std::string exact_denominator< Rational > (const Rational &v)
const char * error_id (const Error &e)
 Stable identifier for an error, for mexErrMsgIdAndTxt and for mapping to a host exception class.
template<class T>
qn::Network< T > build_network_from_json (const detail::json &root)
 Build a qn::Network<T> from a parsed model.json envelope.
template<class T>
qn::Network< T > read_network_json (const std::string &path)
 Parse a model.json file into a qn::Network<T>.
template<class T>
detail::json network_to_json (const qn::NetworkStruct< T > &sn)
 qn::NetworkStruct -> the model.json model object.
template<class T>
detail::json network_json_envelope (const qn::NetworkStruct< T > &sn)
 The complete model.json envelope: {format, version, model}.
template<class T>
void write_network_json (const qn::NetworkStruct< T > &sn, const std::string &path)
 Write a model.json file, indented as the reference writers indent it.
template<class T>
void pnml_save (const qn::NetworkStruct< T > &sn, const std::string &path)
 Write the Petri net of a refreshed NetworkStruct to a PNML place/transition file.
template<class T>
qn::Network< T > pnml_load (const std::string &path, const std::string &net_id=std::string())
 Read one net of a PNML place/transition document into a Network.
template<class T>
std::string qn2jsimg (const qn::NetworkStruct< T > &sn, const std::string &path=std::string(), const JmtWriteOptions &opt=JmtWriteOptions())
 Port of QN2JSIMG(model, outputFileName, options) on a refreshed struct.
template<class T>
std::string qn2jsimg (qn::Network< T > &model, const std::string &path=std::string(), const JmtWriteOptions &opt=JmtWriteOptions())
 Port of QN2JSIMG(model, outputFileName, options) on a model: refreshes it first.
template<class T>
lqn::LqnModel< T > qn2lqn (const qn::NetworkStruct< T > &sn)
 Port of MATLAB QN2LQN(model), over the refreshed C++ NetworkStruct.
template<class T>
lqn::LqnModel< T > qn2lqn (qn::Network< T > &model)
 MATLAB-compatible model-level entry point; refreshes the Network first.
template<class T>
T parse_rational_token (const std::string &tok)
 Parse a rational token of the form "3" or "3/10".
template<class T>
QnModel< T > read_qn (const std::string &path)
std::string to_tikz (const TikzGraph &g, const TikzOptions &opt=TikzOptions())
 TikZExporter.generateTikZ over an extracted graph.
template<class T>
std::string to_tikz (const qn::NetworkStruct< T > &sn, const TikzOptions &opt=TikzOptions())
 Network.toTikZ(options) over a network struct.
template<class T>
std::string to_tikz (qn::Network< T > &model, const TikzOptions &opt=TikzOptions())
 Network.toTikZ(options); refreshes the struct, as the JAR's getStruct() does.
bool tikz_pdflatex_available ()
 Can pdflatex --version run?
template<class M>
void export_tikz_to_file (M &model, const std::string &tex_path, const TikzOptions &opt=TikzOptions())
 Network.exportTikZToFile: the document, written to tex_path as given.
template<class M>
std::string export_tikz (M &model, const std::string &path, const TikzOptions &opt=TikzOptions())
 Network.exportTikZ: write <stem>.tex and compile it to <stem>.pdf, where the stem is path less a .pdf or .tex suffix.
template<class M>
std::string tikz_export_png (M &model, const std::string &path, int dpi=150, const TikzOptions &opt=TikzOptions())
 Network.tikzExportPNG(path, dpi): compile the document and rasterise it with pdftoppm -png -r dpi -singlefile.
template<class M>
TikzViewResult tikz_view (M &model, const TikzOptions &opt=TikzOptions(), bool open_viewer=true)
 MNetwork.tikzView (TikZExporter.display).
std::string tikz_render_routed_edge (const std::string &from_id, const std::string &to_id, const std::string &from_anchor, const std::string &to_anchor, const std::vector< TikzPoint > &wp, double prob, const TikzOptions &opt)
 TikZEdgeRouter.renderRoutedEdge.
template<class T>
TikzGraph tikz_graph (const qn::NetworkStruct< T > &sn)
 The drawable graph of a network struct.
TikzLayout tikz_layout (const TikzGraph &g, const TikzOptions &opt)
 TikZLayoutEngine.computeLayout.
std::string tikz_preamble (const TikzOptions &opt)
 TikZNodeRenderer.getPreamble, byte for byte.
std::string tikz_render_node (const TikzNode &nd, double x, double y, const TikzOptions &opt)
 TikZNodeRenderer.renderNode.
WfDistributionType wf_distribution_type_from_string (const std::string &s)
 lower(options.distributionType) as the reference switches on it: exp, det, aph, hyperexp.
template<class T>
workflow::Workflow< T > wfcommons_load_from_json (const nlohmann::json &data, const WfCommonsOptions &options=WfCommonsOptions())
 Port of WfCommonsLoader.loadFromStruct(data, options), on a parsed document.
template<class T>
workflow::Workflow< T > wfcommons_load (const std::string &path, const WfCommonsOptions &options=WfCommonsOptions())
 Port of WfCommonsLoader.load(jsonFile, options).
template<class T>
workflow::Workflow< T > wfcommons_load_from_url (const std::string &url, const WfCommonsOptions &options=WfCommonsOptions(), int timeout_ms=60000)
 Port of WfCommonsLoader.loadFromUrl(urlString, options).
bool wfcommons_validate (const std::string &path)
 Port of WfCommonsLoader.validateFile(jsonFile): true when the file parses and passes the schema checks.
template<class T>
workflow::Workflow< T > build_workflow_from_json (const detail::json &root)
 Build a workflow::Workflow<T> from a parsed model.json envelope.
template<class T>
workflow::Workflow< T > read_workflow_json (const std::string &path)
 Read a Workflow model.json off disk.

Variables

static const long long DOCKER_DEFAULT_MIN_FREE_BYTES = 2LL * 1024 * 1024 * 1024
 Conservative free-space floor required before a pull (2 GiB).

Typedef Documentation

◆ LineModel

template<class T>
using line::io::LineModel
Initial value:
The intermediate model, and the second stage that flattens it.
Definition lqn_reader.h:409

What linemodel_load returns: MATLAB's Network, LayeredNetwork, Workflow or Environment.

Definition at line 51 of file linemodel.h.

Enumeration Type Documentation

◆ JmtMetricKind

enum class line::io::JmtMetricKind
strong

The measure kinds saveMetrics requests, in the order it requests them.

Enumerator
QLen 
Util 
RespT 
Tput 
ArvR 
Tard 
SysTard 

Definition at line 282 of file jmt_writer.h.

◆ JoinStrategy

enum class line::lang::JoinStrategy
strong

Join rules, with the values of MATLAB JoinStrategy.

Definition at line 463 of file lang_types.h.

◆ NodeType

enum class line::lang::NodeType
strong

Node kinds, with the values of MATLAB NodeType.

Definition at line 326 of file lang_types.h.

◆ PollingType

enum class line::lang::PollingType
strong

Polling service disciplines, with the values of MATLAB PollingType.

Definition at line 372 of file lang_types.h.

◆ ProcessType

enum class line::lang::ProcessType
strong

Distribution kinds, with the values of MATLAB ProcessType.

Definition at line 485 of file lang_types.h.

◆ RoutingStrategy

enum class line::lang::RoutingStrategy
strong

Routing strategies, with the values of MATLAB RoutingStrategy.

Definition at line 391 of file lang_types.h.

◆ SchedStrategy

enum class line::lang::SchedStrategy
strong

Scheduling disciplines, with the values of MATLAB SchedStrategy.

Definition at line 181 of file lang_types.h.

◆ WfDistributionType

enum class line::io::WfDistributionType
strong

options.distributionType, the JAR's WfCommonsOptions.DistributionType.

Enumerator
EXP 
DET 
APH 
HYPEREXP 

Definition at line 79 of file wfcommons_loader.h.

Function Documentation

◆ build_environment_from_json()

template<class T>
env::Environment< T > line::io::build_environment_from_json ( const detail::json & root)

Build an env::Environment<T> from a parsed model.json envelope.

init() is NOT called here. It superposes the arcs into the marked processes the analyzer integrates against, and it throws when a stage has no finite holding time; that diagnostic belongs to the solve, next to the options that chose it, and not to the parse. Every caller in this port calls init() itself, exactly as the reference's env.init() is a separate step from building the object.

Definition at line 216 of file environment_reader.h.

References line::env::Environment< T >::add_transition(), build_environment_from_json(), build_network_from_json(), line::env::Environment< T >::down_stage_name(), line::qn::Network< T >::get_struct(), line::InputError::InputError(), line::env::Environment< T >::register_node_failure(), line::env::Environment< T >::set_stage(), and line::UnsupportedError::UnsupportedError().

Referenced by build_environment_from_json(), linemodel_from_json(), and read_environment_json().

◆ build_lqn_from_json()

template<class T>
lqn::LqnStruct< T > line::io::build_lqn_from_json ( const detail::json & root)

Build an LqnStruct<T> from a parsed model.json envelope carrying a LayeredNetwork.

Definition at line 458 of file lqn_json_reader.h.

References build_lqn_from_json(), build_lqn_model_from_json(), and line::lqn::lqn_finalize().

Referenced by build_lqn_from_json(), and read_lqn_json().

◆ build_lqn_model_from_json()

template<class T>
lqn::LqnModel< T > line::io::build_lqn_model_from_json ( const detail::json & root)

Build the intermediate LqnModel<T> from a parsed model.json envelope carrying a LayeredNetwork.

The struct loses the declared reply activities, which the source-code generators in code_gen.h need, so the model is exposed as well.

Definition at line 160 of file lqn_json_reader.h.

References line::lqn::LqnBuilder< T >::act_think_time(), line::lqn::LqnBuilder< T >::activity(), line::lqn::LqnBuilder< T >::and_fork(), line::lqn::LqnBuilder< T >::and_join(), line::lqn::LqnBuilder< T >::async_call(), line::lqn::LqnBuilder< T >::bound_to(), build_lqn_model_from_json(), line::lqn::LqnBuilder< T >::cache_access(), line::lqn::LqnBuilder< T >::cache_task(), line::lqn::LqnBuilder< T >::call_order(), line::lqn::LqnBuilder< T >::entry(), line::lang::Distrib< T >::exp_mean(), line::lqn::LqnBuilder< T >::forward(), line::lang::Distrib< T >::immediate(), line::InputError::InputError(), line::lqn::LqnBuilder< T >::item_entry(), line::lqn::LqnBuilder< T >::loop(), line::lqn::LqnBuilder< T >::model(), line::lqn::LqnModel< T >::name, line::lqn::LqnBuilder< T >::open_arrival(), line::lqn::LqnBuilder< T >::or_fork(), line::lqn::LqnBuilder< T >::or_join(), line::lqn::LqnBuilder< T >::processor(), line::lqn::LqnModel< T >::procs, line::lqn::LqnBuilder< T >::replies_to(), line::lqn::LqnBuilder< T >::serial(), line::lqn::LqnBuilder< T >::setup_time(), line::lqn::LqnBuilder< T >::sync_call(), line::lqn::LqnBuilder< T >::task(), line::lqn::LqnBuilder< T >::task_priority(), line::lqn::LqnModel< T >::tasks, line::lqn::LqnBuilder< T >::think_time(), and line::UnsupportedError::UnsupportedError().

Referenced by build_lqn_from_json(), build_lqn_model_from_json(), linemodel_from_json(), and read_lqn_json_model().

◆ build_network_from_json()

template<class T>
qn::Network< T > line::io::build_network_from_json ( const detail::json & root)

Build a qn::Network<T> from a parsed model.json envelope.

Two passes: classes and nodes are declared first (a class references its reference node by name, a Join references its Fork by name, so every node index must exist before the cross-references are wired), then service, arrival and routing are applied.

Definition at line 1219 of file network_reader.h.

References line::qn::CacheParam< T >::accost, line::qn::Network< T >::add_cache(), line::qn::Network< T >::add_class_switch(), line::qn::Network< T >::add_closed_class(), line::qn::Network< T >::add_delay(), line::qn::Network< T >::add_fork(), line::qn::Network< T >::add_join_unbound(), line::qn::Network< T >::add_logger(), line::qn::Network< T >::add_open_class(), line::qn::Network< T >::add_place(), line::qn::Network< T >::add_queue(), line::qn::Network< T >::add_region(), line::qn::Network< T >::add_router(), line::qn::Network< T >::add_self_looping_class(), line::qn::Network< T >::add_server_type(), line::qn::Network< T >::add_sink(), line::qn::Network< T >::add_source(), line::qn::Network< T >::add_transition(), line::qn::Network< T >::bind_join(), build_network_from_json(), line::lang::CATASTROPHE, line::qn::CacheParam< T >::classitem, line::Matrix< T >::cols(), line::qn::Station< T >::ServerType::compatible, line::qn::CacheParam< T >::costcap, line::qn::CacheParam< T >::costcapglobal, line::qn::Station< T >::ServerType::count, line::lang::DISABLED, line::lang::Distrib< T >::disabled, line::lang::Distrib< T >::disabled_dist(), line::lang::Distrib< T >::discrete_sampler(), line::lang::dist_to_map(), line::qn::TransitionParam< T >::enabling, line::lang::FCFS, line::qn::NodeDef::LoggerParam::file_path, line::qn::TransitionParam< T >::fireweight, line::qn::TransitionParam< T >::firing, line::qn::TransitionParam< T >::firingdep, line::qn::TransitionParam< T >::firingphases, line::qn::TransitionParam< T >::firingprio, line::qn::TransitionParam< T >::firingproc, line::qn::Network< T >::get_struct(), line::qn::CacheParam< T >::hitclass, line::lang::IMMEDIATE, line::qn::TransitionParam< T >::inhibiting, line::qn::CacheParam< T >::initstate, line::InputError::InputError(), line::qn::CacheParam< T >::itemcap, line::qn::CacheParam< T >::itemsize, line::qn::NodeDef::LoggerParam::job_class, line::qn::NodeDef::LoggerParam::job_id, line::lang::LCFS, line::qn::Network< T >::link(), line::qn::NodeDef::LoggerParam::logger_name, line::qn::Station< T >::BalkingThreshold::max_jobs, line::lang::Distrib< T >::mean, line::qn::Station< T >::BalkingThreshold::min_jobs, line::qn::CacheParam< T >::missclass, line::qn::TransitionParam< T >::modenames, line::qn::Station< T >::ServerType::name, line::qn::NetworkStruct< T >::nclasses, line::lang::NEGATIVE, line::qn::CacheParam< T >::nitems, line::qn::TransitionParam< T >::nmodes, line::qn::TransitionParam< T >::nmodeservers, line::qn::NetworkStruct< T >::nodes, line::qn::NetworkStruct< T >::nstations, line::ones(), line::lang::PARTIAL, line::qn::CacheParam< T >::pread, line::qn::CacheParam< T >::preadkind, line::qn::Station< T >::BalkingThreshold::probability, line::qn::CacheParam< T >::qlru, line::lang::RANDOM, line::qn::Network< T >::raw_struct(), line::lang::RENEGING, line::qn::CacheParam< T >::replacestrat, line::lang::REPLY, line::qn::CacheParam< T >::retrieval_capacity, line::qn::CacheParam< T >::retrieval_classes, line::qn::CacheParam< T >::retrieval_queues, line::Matrix< T >::rows(), line::qn::Station< T >::ServerType::service, line::qn::RoutingMatrix< T >::set(), line::qn::Network< T >::set_arrival(), line::qn::Network< T >::set_arrival_batch(), line::qn::Network< T >::set_balking(), line::qn::Network< T >::set_batch_reject(), line::qn::Network< T >::set_breakdown(), line::qn::Network< T >::set_capacity(), line::qn::Network< T >::set_class_capacity(), line::qn::Network< T >::set_class_deadline(), line::qn::Network< T >::set_class_dependence(), line::qn::Network< T >::set_class_immediate_feedback(), line::qn::Network< T >::set_class_patience(), line::qn::Network< T >::set_class_spawn(), line::qn::Network< T >::set_departure_discipline(), line::qn::Network< T >::set_drop_rule(), line::qn::Network< T >::set_fork_branch_probability(), line::qn::Network< T >::set_fork_tasks_per_link(), line::qn::Network< T >::set_fork_tasks_per_link_dist(), line::qn::Network< T >::set_global_dependence(), line::qn::Network< T >::set_hetero_sched_policy(), line::qn::Network< T >::set_immediate_feedback(), line::qn::Network< T >::set_initial_marking(), line::qn::Network< T >::set_join_strategy(), line::qn::Network< T >::set_joint_dependence(), line::qn::Network< T >::set_load_dependence(), line::qn::Network< T >::set_log_path(), line::qn::Network< T >::set_marked_classes(), line::qn::Network< T >::set_number_of_servers(), line::qn::Network< T >::set_orbit_impatience(), line::qn::Network< T >::set_pas(), line::qn::Network< T >::set_patience(), line::qn::Network< T >::set_polling_type(), line::qn::Network< T >::set_reference_class(), line::qn::Network< T >::set_region_constraint(), line::qn::Network< T >::set_region_weights(), line::qn::Network< T >::set_reply_signal_class(), line::qn::Network< T >::set_retrial(), line::qn::Network< T >::set_reward(), line::qn::Network< T >::set_routing(), line::qn::Network< T >::set_routing_param(), line::qn::Network< T >::set_routing_weights(), line::qn::Network< T >::set_sched_param(), line::qn::Network< T >::set_server_parallelism(), line::qn::Network< T >::set_service(), line::qn::Network< T >::set_setup_delayoff(), line::qn::Network< T >::set_signal(), line::qn::Network< T >::set_state_dep_routing(), line::qn::Network< T >::set_state_prior(), line::qn::Network< T >::set_switchover(), line::qn::NodeDef::LoggerParam::start_time, line::lang::STD, line::qn::NodeDef::LoggerParam::time_any_class, line::qn::NodeDef::LoggerParam::time_same_class, line::lang::TIMED, line::qn::NodeDef::LoggerParam::timestamp, line::qn::TransitionParam< T >::timing, line::UnsupportedError::UnsupportedError(), and line::lang::WAITQ.

Referenced by build_environment_from_json(), build_network_from_json(), linemodel_from_json(), and read_network_json().

◆ build_workflow_from_json()

template<class T>
workflow::Workflow< T > line::io::build_workflow_from_json ( const detail::json & root)

Build a workflow::Workflow<T> from a parsed model.json envelope.

One pass: an activity is declared before any precedence may reference it, which the wire guarantees by carrying activities as its own block. The result is NOT validated here – validate() and to_ph() do that on the composed model, where the series-parallel and quorum rules actually apply.

Definition at line 165 of file workflow_reader.h.

References build_workflow_from_json(), line::lang::Distrib< T >::exp_mean(), line::InputError::InputError(), line::workflow::Precedence< T >::post_acts, line::workflow::Precedence< T >::post_params, line::workflow::Precedence< T >::post_type, line::workflow::Precedence< T >::pre_acts, line::workflow::Precedence< T >::pre_params, line::workflow::Precedence< T >::pre_type, and line::UnsupportedError::UnsupportedError().

Referenced by build_workflow_from_json(), linemodel_from_json(), and read_workflow_json().

◆ citation_registry()

const std::map< std::string, Citation > & line::io::citation_registry ( )

The whole method name -> reference table, built once.

Definition at line 1616 of file line_citations.cpp.

References citation_registry().

Referenced by citation_registry(), and line_citations().

◆ docker_daemon_available()

bool line::io::docker_daemon_available ( )
inline

True if the Docker daemon is reachable.

Definition at line 50 of file docker_image.h.

References line::util::capture(), docker_daemon_available(), and line::util::ProcResult::exitCode.

Referenced by docker_daemon_available(), and line::jmt::jmt_run().

◆ docker_has_local_image()

bool line::io::docker_has_local_image ( const std::string & image)
inline
Parameters
imagethe image tag
Returns
true if it is already present in the local Docker store

Definition at line 59 of file docker_image.h.

References line::util::capture(), docker_has_local_image(), line::util::ProcResult::exitCode, line::util::ProcResult::out, and line::util::trim().

Referenced by docker_has_local_image(), line::jmt::jmt_run(), line::sym::sym_find_image(), and line::sym::sym_resolve().

◆ docker_has_storage_for()

bool line::io::docker_has_storage_for ( const std::string & image)
inline
Parameters
imagethe image tag
Returns
true if the Docker storage location has room for it

Definition at line 135 of file docker_image.h.

References DOCKER_DEFAULT_MIN_FREE_BYTES, and docker_has_storage_for().

Referenced by docker_has_storage_for(), and line::jmt::jmt_run().

◆ docker_pull()

bool line::io::docker_pull ( const std::string & image)
inline

Pulls an image, streaming Docker's progress to stdout and stderr.

No timeout.

Parameters
imagethe image tag
Returns
true on success

Definition at line 71 of file docker_image.h.

References docker_pull(), and line::util::run_inherit().

Referenced by docker_pull(), and line::jmt::jmt_run().

◆ environment_to_json()

template<class T>
detail::json line::io::environment_to_json ( const env::Environment< T > & e)

environment2json: the model object of an Environment document.

The stages go out EXPANDED, each with its own network, plus the nodeFailures descriptors that alone carry the reset policies, as both reference writers do. A reset FUNCTION on an ordinary arc has no wire form in any codebase; it is dropped with a warning, as MATLAB warns for a custom node-failure policy.

Definition at line 424 of file linemodel_writer.h.

References line::env::Environment< T >::arc(), line::lang::DISABLED, line::env::EnvArc< T >::dist, line::env::Environment< T >::down_stage_name(), line::env::EnvArc< T >::enabled, environment_to_json(), line::env::Environment< T >::find_stage(), line::env::EnvStage< T >::has_lqn, line::env::EnvStage< T >::has_model, line::env::EnvStage< T >::model, line::env::Environment< T >::name(), line::env::EnvStage< T >::name, network_to_json(), line::env::Environment< T >::node_failures(), line::env::Environment< T >::nstages(), line::env::EnvArc< T >::reset, line::env::EnvArc< T >::reset_rates, line::env::Environment< T >::stage(), line::env::EnvStage< T >::type, and line::UnsupportedError::UnsupportedError().

Referenced by environment_to_json(), and linemodel_save().

◆ error_id()

const char * line::io::error_id ( const Error & e)
inline

Stable identifier for an error, for mexErrMsgIdAndTxt and for mapping to a host exception class.

The prose message stays in what(); hosts must key on the identifier, which will not change with wording.

Definition at line 146 of file marshal.h.

References error_id().

Referenced by error_id(), and line::cli::run().

◆ exact_denominator()

template<class T>
std::string line::io::exact_denominator ( const T & )

Definition at line 132 of file marshal.h.

References exact_denominator().

Referenced by exact_denominator(), exact_denominator< Rational >(), and marshal_scalar().

◆ exact_denominator< Rational >()

template<>
std::string line::io::exact_denominator< Rational > ( const Rational & v)
inline

Definition at line 137 of file marshal.h.

References exact_denominator().

◆ exact_numerator()

template<class T>
std::string line::io::exact_numerator ( const T & )

Numerator of an exact value as a decimal string; empty for inexact types.

Definition at line 122 of file marshal.h.

References exact_numerator().

Referenced by exact_numerator(), exact_numerator< Rational >(), and marshal_scalar().

◆ exact_numerator< Rational >()

template<>
std::string line::io::exact_numerator< Rational > ( const Rational & v)
inline

Definition at line 127 of file marshal.h.

References exact_numerator().

◆ export_tikz()

template<class M>
std::string line::io::export_tikz ( M & model,
const std::string & path,
const TikzOptions & opt = TikzOptions() )

Network.exportTikZ: write <stem>.tex and compile it to <stem>.pdf, where the stem is path less a .pdf or .tex suffix.

Returns the PDF path.

The JAR writes the same .tex and returns a PDF left in a temporary directory; this port puts the PDF beside the .tex instead, which is where a caller that named a path expects to find it, and leaves no directory behind.

Definition at line 223 of file tikz.h.

References line::io::tikz_detail::compile_pdf(), line::io::tikz_detail::copy_file(), line::io::tikz_detail::ends_with(), export_tikz(), to_tikz(), and line::io::tikz_detail::write_text().

Referenced by export_tikz().

◆ export_tikz_to_file()

template<class M>
void line::io::export_tikz_to_file ( M & model,
const std::string & tex_path,
const TikzOptions & opt = TikzOptions() )

Network.exportTikZToFile: the document, written to tex_path as given.

Definition at line 210 of file tikz.h.

References export_tikz_to_file(), to_tikz(), and line::io::tikz_detail::write_text().

Referenced by export_tikz_to_file().

◆ from_column_major()

template<class T, class S>
Matrix< T > line::io::from_column_major ( const S * data,
std::size_t rows,
std::size_t cols )

Build a Matrix from a column-major host buffer (MATLAB's mxGetPr layout, numpy's order='F').

Converts the element type through num_traits, so a double buffer can feed an exact or high-precision instantiation.

Definition at line 53 of file marshal.h.

References from_column_major(), and line::InputError::InputError().

Referenced by from_column_major().

◆ from_row_major()

template<class T, class S>
Matrix< T > line::io::from_row_major ( const S * data,
std::size_t rows,
std::size_t cols )

Build a Matrix from a row-major host buffer (numpy's default order='C').

Definition at line 65 of file marshal.h.

References from_row_major(), and line::InputError::InputError().

Referenced by from_row_major().

◆ is_layered_json()

bool line::io::is_layered_json ( const std::string & path)
inline

True when a file is a LayeredNetwork model.json rather than an .lqnx.

Decided on the CONTENT, not the extension: linemodel_save writes .json for both model kinds and the two readers cannot be told apart by name. The first non-space character settles it – { is JSON, < is XML – and the type field settles which JSON.

Definition at line 493 of file lqn_json_reader.h.

References is_layered_json().

Referenced by find_solver_report(), is_layered_json(), line2java_json(), line2matlab_json(), read_layered_model(), and run_invocation().

◆ is_layered_json_text()

bool line::io::is_layered_json_text ( const std::string & text)
inline

True when a DOCUMENT ALREADY IN MEMORY is a LayeredNetwork model.json.

The path form below reads the file twice, which is right for a file and impossible for a stream: standard input can be drained only once, so a caller holding piped text has nothing to hand the path form. Without this the CLI could not tell a layered model from a flat one on stdin, and refused every piped LayeredNetwork with a message about the SOLVER rather than the reader.

Definition at line 471 of file lqn_json_reader.h.

References is_layered_json_text().

Referenced by find_solver_report(), is_layered_json_text(), and run_invocation().

◆ jmt2line()

template<class T>
qn::Network< T > line::io::jmt2line ( const std::string & path,
const std::string & name = std::string() )

Port of JMT2LINE(filename, modelName): dispatch on the extension.

.jmva goes to jmva2line, .jsim / .jsimg / .jsimw to jsim2line. Any other extension is read as JSIM after the reference's warning, which in this port goes to stderr with the [LINE] Warning: prefix the io layer uses. The match is case-sensitive, as switch fext is in MATLAB.

Definition at line 65 of file jmt_import.h.

References line::io::jmt_import_detail::extension(), jmt2line(), jmva2line(), and jsim2line().

Referenced by jmt2line().

◆ jmt_append_distribution()

template<class T>
void line::io::jmt_append_distribution ( xml::Element & wrapper,
const JmtDistView< T > & v,
const char * who )

Append the distribution and distrPar pair for one process.

Parameters
wrapperthe element the pair is appended to – the caller's ServiceTimeStrategy, or a Timing / Impatience wrapper
vthe lowered process
whothe caller, for the refusal message of an unexportable family

A family JMT has no law for is REFUSED BY NAME. Falling through to the nearest available law would export a model that simulates cleanly and answers a different question, and the featset gate is what is supposed to catch this: a refusal here means the featset and this emitter have drifted apart.

Definition at line 226 of file jmt_dist.h.

References line::xml::Element::add_child(), line::io::JmtDistView< T >::D0, line::io::JmtDistView< T >::D1, jmt_append_distribution(), jmt_append_row(), jmt_double(), jmt_fmt(), jmt_int(), jmt_is_phase_type(), jmt_object_array(), jmt_scalar(), line::io::JmtDistView< T >::phases, line::io::JmtDistView< T >::pie, line::io::JmtDistView< T >::rate, line::Matrix< T >::rows(), line::io::JmtDistView< T >::scv, line::xml::Element::set_attr(), line::io::JmtDistView< T >::trace_file, line::io::JmtDistView< T >::type, and line::UnsupportedError::UnsupportedError().

Referenced by jmt_append_distribution().

◆ jmt_append_row()

void line::io::jmt_append_row ( xml::Element & parent,
const Matrix< double > & M,
std::size_t row,
std::size_t n,
bool negate_diagonal )
inline

One vector of entry doubles, the JMT encoding of a matrix row.

Definition at line 202 of file jmt_dist.h.

References jmt_append_row(), jmt_fmt(), jmt_object_array(), and jmt_scalar().

Referenced by jmt_append_distribution(), and jmt_append_row().

◆ jmt_buffer_capacity_refusal()

template<class T>
std::string line::io::jmt_buffer_capacity_refusal ( const qn::NetworkStruct< T > & sn,
bool jmva_engine )

JmtWriter::buffer_capacity_refusal without a document: the writer's own binding-buffer verdict, for the gate in jmt::jmt_method_refusal.

Definition at line 2866 of file jmt_writer.h.

References line::io::JmtWriter< T >::buffer_capacity_refusal(), and jmt_buffer_capacity_refusal().

Referenced by jmt_buffer_capacity_refusal(), and line::jmt::jmt_method_refusal().

◆ jmt_cache_classes()

template<class T>
std::vector< bool > line::io::jmt_cache_classes ( const qn::NetworkStruct< T > & sn)

The classes a Cache switches jobs into; they keep their Tput/ArvR measures.

Definition at line 346 of file jmt_writer.h.

References line::qn::CacheParam< T >::hitclass, jmt_cache_classes(), and line::qn::CacheParam< T >::missclass.

Referenced by jmt_cache_classes(), line::jmt::jmt_get_cdf_resp_t(), and line::io::JmtWriter< T >::JmtWriter().

◆ jmt_conn_matrix()

template<class T>
std::vector< std::vector< bool > > line::io::jmt_conn_matrix ( const qn::NetworkStruct< T > & sn)

sn.connmatrix: which ordered pairs of nodes the model LINKED.

The reference carries the matrix on the struct, recorded by Network.addLink. This port records the links only through the routing blocks P, so the connection set is their union support. That is the same set for every model built the way link(P) builds one – addLink is called from link for each nonzero entry – and it is what the JSIM <connection> list, the ClassSwitch row sum, the WRROBIN and PROB destination lists and the SPN input/output vectors all read.

Peff IS NOT USED HERE, deliberately: it has the RAND/RROBIN expansion and the class-switch folding applied, so a Router's declared links would come back as the links of the stations it routes to, and the exported topology would not be the user's.

Definition at line 96 of file jmt_writer.h.

References line::Matrix< T >::cols(), jmt_conn_matrix(), and line::Matrix< T >::rows().

Referenced by jmt_conn_matrix(), and line::io::JmtWriter< T >::JmtWriter().

◆ jmt_dist_view()

template<class T>
JmtDistView< T > line::io::jmt_dist_view ( const Distrib< T > & d)

◆ jmt_double()

xml::Element & line::io::jmt_double ( xml::Element & parent,
const char * name,
double v )
inline

A java.lang.Double scalar subparameter.

Definition at line 91 of file jmt_dist.h.

References jmt_double(), jmt_fmt(), and jmt_scalar().

Referenced by jmt_append_distribution(), and jmt_double().

◆ jmt_drop_text()

const char * line::io::jmt_drop_text ( DropStrategy d)
inline

MATLAB DropStrategy.toText, the strings JMT's dropRule field expects.

Definition at line 385 of file jmt_writer.h.

References line::InputError::InputError(), and jmt_drop_text().

Referenced by jmt_drop_text().

◆ jmt_exportable_classes()

template<class T>
std::vector< bool > line::io::jmt_exportable_classes ( const qn::NetworkStruct< T > & sn)

Port of getExportableClasses.

A closed class with no customers is dropped from the exported model UNLESS jobs can still reach it: as a cache hit/miss class, or through a class switch from a populated class of the same chain. Exporting it anyway would give JMT a class it can never see and, for a closed class, a reference station with zero population – which JMT reports as an unreachable measure rather than as an empty one.

Definition at line 120 of file jmt_writer.h.

References line::qn::CacheParam< T >::hitclass, jmt_exportable_classes(), and line::qn::CacheParam< T >::missclass.

Referenced by jmt_exportable_classes(), and line::io::JmtWriter< T >::JmtWriter().

◆ jmt_fmt()

std::string line::io::jmt_fmt ( double x)
inline

sprintf('%.12f', x), the numeric format of every JMT <value> body.

Definition at line 53 of file jmt_dist.h.

References jmt_fmt().

Referenced by jmt_append_distribution(), jmt_append_row(), jmt_double(), and jmt_fmt().

◆ jmt_hetero_text()

const char * line::io::jmt_hetero_text ( lang::HeteroSchedPolicy p)
inline

MATLAB HeteroSchedPolicy.toJMTText: JMT's long descriptive identifiers.

Definition at line 414 of file jmt_writer.h.

References line::lang::ALFS, line::lang::ALIS, line::lang::FAIRNESS, line::lang::FSF, jmt_hetero_text(), line::lang::ORDER, and line::lang::RAIS.

Referenced by jmt_hetero_text().

◆ jmt_int()

std::string line::io::jmt_int ( double x)
inline

int2str(x): round to nearest, print as a decimal integer.

Definition at line 60 of file jmt_dist.h.

References jmt_int().

Referenced by line::io::JmtWriter< T >::buffer_capacity_refusal(), jmt_append_distribution(), and jmt_int().

◆ jmt_is_phase_type()

bool line::io::jmt_is_phase_type ( ProcessType t,
std::size_t phases )
inline

True when the reference routes the process through JMT's PhaseTypeDistr rather than through a named analytic law.

COX2 IS ADDED TO THE REFERENCE'S LIST. saveServiceStrategy sends PH, APH, COXIAN and a HyperExp of more than two phases down this branch, and lets COX2 fall into the analytic switch – which has no COX2 case, so MATLAB errors on an undefined javaClass. A two-phase Coxian has an exact phase-type representation, and this port's ProcessType keeps COX2 distinct from COXIAN, so it is exported through the same exact branch rather than through an error.

Definition at line 187 of file jmt_dist.h.

References jmt_is_phase_type().

Referenced by jmt_append_distribution(), and jmt_is_phase_type().

◆ jmt_metric_enabled()

template<class T>
bool line::io::jmt_metric_enabled ( const qn::NetworkStruct< T > & sn,
JmtMetricKind kind,
std::size_t ist,
std::size_t r,
const std::vector< bool > & is_cache_class )

Port of the disabled rules in getAvgHandles, per (station, class).

The rules are per kind: a Source or a Sink reports no queue length, response time, utilization or tardiness but DOES report throughput and arrival rate; a Fork or a Join reports no utilization; a station whose class has no service process reports nothing, EXCEPT that a cache hit/miss class keeps its throughput and arrival rate – a job only ever passes through such a class, it is never served in it, and disabling the measure would leave the cache's hit rate unobservable.

has_service_tunnel reproduces the reference's test on the SECTION object: a Source, a Join and an ordinary Place have a ServiceTunnel and are therefore exempt from the service-defined test entirely.

Definition at line 314 of file jmt_writer.h.

References ArvR, jmt_metric_enabled(), jmt_sections(), QLen, RespT, line::io::JmtSections< T >::server, SysTard, Tard, Tput, and Util.

Referenced by line::jmt::jmt_get_cdf_resp_t(), and jmt_metric_enabled().

◆ jmt_metric_text()

const char * line::io::jmt_metric_text ( JmtMetricKind k)
inline

The JMT type attribute, MATLAB MetricType.toText.

Definition at line 285 of file jmt_writer.h.

References ArvR, jmt_metric_text(), QLen, RespT, SysTard, Tard, Tput, and Util.

Referenced by jmt_metric_text().

◆ jmt_num()

std::string line::io::jmt_num ( double x)
inline

num2str(x): MATLAB's default five-significant-digit form.

Definition at line 67 of file jmt_dist.h.

References jmt_num().

Referenced by jmt_num().

◆ jmt_object_array()

xml::Element & line::io::jmt_object_array ( xml::Element & parent,
const char * name )
inline

<subParameter array="true" classPath="java.lang.Object" name="NAME">

Definition at line 193 of file jmt_dist.h.

References line::xml::Element::add_child(), jmt_object_array(), and line::xml::Element::set_attr().

Referenced by jmt_append_distribution(), jmt_append_row(), and jmt_object_array().

◆ jmt_param()

xml::Element & line::io::jmt_param ( xml::Element & section,
const char * class_path,
const char * name,
bool array )
inline

<parameter array="true" classPath="CP" name="NAME">

Definition at line 363 of file jmt_writer.h.

References line::xml::Element::add_child(), jmt_param(), and line::xml::Element::set_attr().

Referenced by jmt_param(), and jmt_param_value().

◆ jmt_param_value()

void line::io::jmt_param_value ( xml::Element & section,
const char * class_path,
const char * name,
const std::string & value )
inline

<parameter classPath="CP" name="NAME"><value>V</value></parameter>

Definition at line 373 of file jmt_writer.h.

References line::xml::Element::add_text_child(), jmt_param(), and jmt_param_value().

Referenced by jmt_param_value().

◆ jmt_reads_drop()

bool line::io::jmt_reads_drop ( DropStrategy d)
inline

Whether JMT's queue section can read this drop strategy at all.

It recognizes exactly four dropStrategies strings – 'drop', 'BAS blocking', 'waiting queue', 'retrial' (a lookupswitch on String.hashCode in jmt/engine/NodeSections/Queue.class; the Storage section of a Place is even narrower and drops 'retrial'). An unrecognized value falls through the default arm with NO flag set, so BBS, RSRD and retrial-with-limit are not approximated, they are IGNORED.

Definition at line 408 of file jmt_writer.h.

References jmt_reads_drop().

Referenced by jmt_reads_drop().

◆ jmt_ref_class()

void line::io::jmt_ref_class ( xml::Element & parent,
const std::string & class_name )
inline

<refClass>NAME</refClass>, the per-class marker of an array parameter.

Definition at line 380 of file jmt_writer.h.

References line::xml::Element::add_text_child(), and jmt_ref_class().

Referenced by jmt_ref_class().

◆ jmt_scalar()

xml::Element & line::io::jmt_scalar ( xml::Element & parent,
const char * class_path,
const char * name,
const std::string & value )
inline

<subParameter classPath="java.lang.Double" name="NAME"><value>V</value>

Definition at line 81 of file jmt_dist.h.

References line::xml::Element::add_child(), line::xml::Element::add_text_child(), jmt_scalar(), and line::xml::Element::set_attr().

Referenced by jmt_append_distribution(), jmt_append_row(), jmt_double(), and jmt_scalar().

◆ jmt_sections()

template<class T>
JmtSections< T > line::io::jmt_sections ( const qn::NetworkStruct< T > & sn,
std::size_t ind )

◆ jmt_sig2()

std::string line::io::jmt_sig2 ( double x)
inline

num2str(x, 2): the two-significant-digit form used for alpha/precision.

Definition at line 74 of file jmt_dist.h.

References jmt_sig2().

Referenced by jmt_sig2().

◆ jmt_write_jsim()

template<class T>
std::string line::io::jmt_write_jsim ( const qn::NetworkStruct< T > & sn,
const JmtWriteOptions & opt )

Port of @@JMTIO/writeJSIM.m: serialize sn as a JMT .jsimg document.

Definition at line 2856 of file jmt_writer.h.

References jmt_write_jsim(), and line::io::JmtWriter< T >::write_jsim().

Referenced by jmt_write_jsim(), qn2jsimg(), run_invocation(), and line::jmt::solver_jmt_run_analyzer().

◆ jmva2line()

◆ jsim2line()

template<class T>
qn::Network< T > line::io::jsim2line ( const std::string & path,
const std::string & name = std::string() )

Port of JSIM2LINE(filename, modelName).

Parameters
patha .jsim, .jsimg or .jsimw file
namethe model name; empty takes fileparts of the document's <sim name>

Definition at line 38 of file jmt_import.h.

References line::io::jmva_detail::file_stem(), jsim2line(), line::qn::Network< T >::raw_struct(), and read_jsim().

Referenced by jmt2line(), and jsim2line().

◆ jsim_stage_stdin()

std::string line::io::jsim_stage_stdin ( const std::string & text)
inline

Write a piped XML model document to a temporary file and return its path.

Shared by the JMT and PNML paths: both readers walk a DOM built by xml::parse_file, which takes a path, and a document arriving on stdin has none. Staging it is the whole of the difference; the caller removes the file. The messages name no reader, since either may be the caller.

Definition at line 871 of file jsim_reader.h.

References line::InputError::InputError(), and jsim_stage_stdin().

Referenced by jsim_stage_stdin().

◆ line2java() [1/5]

template<class T>
void line::io::line2java ( const lqn::LqnModel< T > & model,
const std::string & model_name,
const std::string & path )

Port of LINE2JAVA(model, filename) for a LayeredNetwork.

Definition at line 1475 of file code_gen.h.

References line2java(), and lqn2java().

◆ line2java() [2/5]

template<class T>
void line::io::line2java ( const lqn::LqnModel< T > & model,
const std::string & model_name,
std::ostream & os )

Port of LINE2JAVA(model) for a LayeredNetwork.

The intermediate model does not carry the model name, so it is passed explicitly.

Definition at line 1469 of file code_gen.h.

References line2java(), and lqn2java().

◆ line2java() [3/5]

template<class T>
void line::io::line2java ( const lqn::LqnModel< T > & model,
std::ostream & os )

Port of LINE2JAVA(model) for a LayeredNetwork under its own name (myLayeredModel when it has none).

Definition at line 1494 of file code_gen.h.

References line2java(), lqn2java(), and line::lqn::LqnModel< T >::name.

◆ line2java() [4/5]

template<class T>
void line::io::line2java ( qn::Network< T > & model,
const std::string & path )

Port of LINE2JAVA(model, filename) for a Network.

Definition at line 1459 of file code_gen.h.

References line2java(), and line::io::code_gen_detail::open_out().

◆ line2java() [5/5]

template<class T>
void line::io::line2java ( qn::Network< T > & model,
std::ostream & os )

Port of LINE2JAVA(model) for a Network: QN2JAVA under the model's own name.

Definition at line 1452 of file code_gen.h.

References line::qn::Network< T >::get_struct(), line2java(), and qn2java().

Referenced by line2java(), line2java(), line2java(), line2java(), line2java(), and line2java_json().

◆ line2java_json()

template<class T = double>
void line::io::line2java_json ( const std::string & json_path,
std::ostream & os )

LINE2JAVA on a model.json file, dispatching on the model type as MATLAB dispatches on the class of the object: a LayeredNetwork goes to LQN2JAVA and any other network to QN2JAVA, each under the name the document declares.

Definition at line 1523 of file code_gen.h.

References is_layered_json(), line::io::code_gen_detail::json_model_name(), line2java(), line2java_json(), lqn2java(), read_lqn_json_model(), and read_network_json().

Referenced by line2java_json().

◆ line2matlab() [1/4]

template<class T>
void line::io::line2matlab ( const lqn::LqnModel< T > & model,
const std::string & path )

Port of LINE2MATLAB(model, filename) for a LayeredNetwork.

Definition at line 1487 of file code_gen.h.

References line2matlab(), lqn2matlab(), and line::io::code_gen_detail::open_out().

◆ line2matlab() [2/4]

template<class T>
void line::io::line2matlab ( const lqn::LqnModel< T > & model,
std::ostream & os )

Port of LINE2MATLAB(model) for a LayeredNetwork: LQN2MATLAB under the model's own name.

Definition at line 1481 of file code_gen.h.

References line2matlab(), and lqn2matlab().

◆ line2matlab() [3/4]

template<class T>
void line::io::line2matlab ( qn::Network< T > & model,
const std::string & path )

Port of LINE2MATLAB(model, filename) for a Network.

Definition at line 1445 of file code_gen.h.

References line2matlab(), and line::io::code_gen_detail::open_out().

◆ line2matlab() [4/4]

template<class T>
void line::io::line2matlab ( qn::Network< T > & model,
std::ostream & os )

Port of LINE2MATLAB(model) for a Network: QN2MATLAB under the model's own name.

Definition at line 1438 of file code_gen.h.

References line::qn::Network< T >::get_struct(), line2matlab(), and qn2matlab().

Referenced by line2matlab(), line2matlab(), line2matlab(), line2matlab(), and line2matlab_json().

◆ line2matlab_json()

template<class T = double>
void line::io::line2matlab_json ( const std::string & json_path,
std::ostream & os )

LINE2MATLAB on a model.json file: a LayeredNetwork goes to LQN2MATLAB, any other network to QN2MATLAB.

Definition at line 1535 of file code_gen.h.

References is_layered_json(), line2matlab(), line2matlab_json(), lqn2matlab(), read_lqn_json_model(), and read_network_json().

Referenced by line2matlab_json().

◆ line_citations()

std::vector< Citation > line::io::line_citations ( const std::vector< std::string > & method_names)

The references for METHOD NAMES, de-duplicated by key, in order of appearance.

Definition at line 1621 of file line_citations.cpp.

References citation_registry(), and line_citations().

Referenced by line_citations(), and line_citations_for_method().

◆ line_citations_for_method()

std::vector< Citation > line::io::line_citations_for_method ( const std::string & method)

Convenience for the default/<actual> compound a solver reports.

Definition at line 1644 of file line_citations.cpp.

References line_citations(), and line_citations_for_method().

Referenced by line_citations_for_method().

◆ linemodel_envelope()

detail::json line::io::linemodel_envelope ( const detail::json & model)
inline

The {format, version, model} envelope around a model object, with the wire's non-finites.

Definition at line 500 of file linemodel_writer.h.

References linemodel_envelope().

Referenced by linemodel_envelope(), linemodel_save(), linemodel_save(), and linemodel_save().

◆ linemodel_from_json()

template<class T>
LineModel< T > line::io::linemodel_from_json ( const nlohmann::json & root)

◆ linemodel_load()

template<class T>
LineModel< T > line::io::linemodel_load ( const std::string & path)

Port of linemodel_load(filename).

Returns
the model, as whichever alternative of LineModel<T> its model.type names

Definition at line 82 of file linemodel.h.

References line::InputError::InputError(), linemodel_from_json(), and linemodel_load().

Referenced by linemodel_load().

◆ linemodel_save() [1/6]

template<class T>
void line::io::linemodel_save ( const env::Environment< T > & model,
const std::string & path )

Port of linemodel_save(model, filename) for an Environment (environment2json).

Definition at line 120 of file linemodel.h.

References environment_to_json(), linemodel_envelope(), linemodel_save(), and write_linemodel_json().

◆ linemodel_save() [2/6]

template<class T>
void line::io::linemodel_save ( const lqn::LqnModel< T > & model,
const std::string & path )

Port of linemodel_save(model, filename) for a LayeredNetwork (layered2json).

Definition at line 108 of file linemodel.h.

References linemodel_envelope(), linemodel_save(), lqn_model_to_json(), and write_linemodel_json().

◆ linemodel_save() [3/6]

template<class T>
void line::io::linemodel_save ( const qn::NetworkStruct< T > & sn,
const std::string & path )

Port of linemodel_save(model, filename) for a refreshed Network struct.

Definition at line 96 of file linemodel.h.

References linemodel_save(), and write_network_json().

Referenced by linemodel_save(), linemodel_save(), linemodel_save(), linemodel_save(), linemodel_save(), and linemodel_save().

◆ linemodel_save() [4/6]

template<class T>
void line::io::linemodel_save ( const workflow::Workflow< T > & model,
const std::string & path )

Port of linemodel_save(model, filename) for a Workflow (workflow2json).

Definition at line 114 of file linemodel.h.

References linemodel_envelope(), linemodel_save(), workflow_to_json(), and write_linemodel_json().

◆ linemodel_save() [5/6]

template<class T>
void line::io::linemodel_save ( LineModel< T > & model,
const std::string & path )

linemodel_save on whatever linemodel_load returned, dispatched on the alternative held.

Definition at line 126 of file linemodel.h.

References linemodel_save().

◆ linemodel_save() [6/6]

template<class T>
void line::io::linemodel_save ( qn::Network< T > & model,
const std::string & path )

Port of linemodel_save(model, filename) for a Network; refreshes it first.

Definition at line 102 of file linemodel.h.

References line::qn::Network< T >::get_struct(), linemodel_save(), and write_network_json().

◆ linemodel_type()

std::string line::io::linemodel_type ( const nlohmann::json & root)
inline

The envelope's model.type of a parsed document; empty when it declares none.

Definition at line 55 of file linemodel.h.

References linemodel_type().

Referenced by linemodel_from_json(), and linemodel_type().

◆ lqn2java() [1/4]

template<class T>
void line::io::lqn2java ( const lqn::LqnBuilder< T > & b,
const std::string & model_name,
std::ostream & os )

LQN2JAVA on a model under construction.

Definition at line 998 of file code_gen.h.

References lqn2java(), and line::lqn::LqnBuilder< T >::model().

◆ lqn2java() [2/4]

template<class T>
void line::io::lqn2java ( const lqn::LqnModel< T > & model,
const std::string & model_name,
const std::string & path )

LQN2JAVA into a file.

Definition at line 1010 of file code_gen.h.

References lqn2java(), and line::io::code_gen_detail::open_out().

◆ lqn2java() [3/4]

template<class T>
void line::io::lqn2java ( const lqn::LqnModel< T > & model,
const std::string & model_name,
std::ostream & os )

Port of LQN2JAVA(model, modelName, fid): a JLINE program that rebuilds the layered network and solves it with SolverLN.

It takes the intermediate LqnModel rather than the struct alone, because the struct keeps neither the declared reply activities nor an AND-join's quorum, both of which MATLAB reads off the model object.

Definition at line 743 of file code_gen.h.

References line::lang::ASYNC, line::lang::DISABLED, line::lang::Distrib< T >::disabled, line::lang::IMMEDIATE, lqn2java(), line::lqn::lqn_finalize(), line::lang::REF, line::lang::SYNC, and line::lang::Distrib< T >::type.

Referenced by line2java(), line2java(), line2java(), line2java_json(), lqn2java(), lqn2java(), lqn2java(), lqn2java(), and lqn2java_string().

◆ lqn2java() [4/4]

template<class T>
void line::io::lqn2java ( const lqn::LqnModel< T > & model,
std::ostream & os )

LQN2JAVA with MATLAB's default model name.

Definition at line 1004 of file code_gen.h.

References lqn2java().

◆ lqn2java_string()

template<class T>
std::string line::io::lqn2java_string ( const lqn::LqnModel< T > & model,
const std::string & model_name = "myLayeredModel" )

LQN2JAVA returned as a string.

Definition at line 1017 of file code_gen.h.

References lqn2java(), and lqn2java_string().

Referenced by lqn2java_string().

◆ lqn2matlab() [1/4]

template<class T>
void line::io::lqn2matlab ( const lqn::LqnBuilder< T > & b,
const std::string & model_name,
std::ostream & os )

LQN2MATLAB on a model under construction.

Definition at line 1413 of file code_gen.h.

References lqn2matlab(), and line::lqn::LqnBuilder< T >::model().

◆ lqn2matlab() [2/4]

template<class T>
void line::io::lqn2matlab ( const lqn::LqnModel< T > & m,
const std::string & model_name,
std::ostream & os )

Port of LQN2MATLAB(model, modelName, fid), the generator form: a MATLAB script that rebuilds the layered network by the constructors a user writes, with hosts, tasks, entries and activities in model order so the regenerated model has the same LayeredNetworkStruct indexing, and numbers at the shortest spelling that reads back bit for bit.

It reads the intermediate LqnModel, which is the C++ counterpart of the MATLAB objects. What that model does not carry is written at its MATLAB default: a task priority, an entry type other than PH1PH2, an activity call order, phase, a processor class other than Processor, and the numeric-versus- object choice MATLAB makes for an Immediate or Exp time (this port writes the object form, and cannot tell an explicit Immediate() think time from the default one). A class- or joint-dependent rate is a compiled function here and is refused.

Definition at line 1268 of file code_gen.h.

References line::lqn::LqnModel< T >::acts, line::lqn::LqnModel< T >::entries, line::lang::JSQ, lqn2matlab(), line::lqn::LqnModel< T >::proc_cdscaling, line::lqn::LqnModel< T >::proc_jdscaling, line::lqn::LqnModel< T >::proc_lincon, line::lqn::LqnModel< T >::proc_linconrows, line::lqn::LqnModel< T >::proc_lldscaling, line::lqn::LqnModel< T >::proc_pools, line::lqn::LqnModel< T >::procs, line::lang::REF, line::lang::routing_to_text(), line::lang::RROBIN, line::lqn::LqnModel< T >::tasks, and line::UnsupportedError::UnsupportedError().

Referenced by line2matlab(), line2matlab(), line2matlab_json(), lqn2matlab(), lqn2matlab(), lqn2matlab(), lqn2matlab(), and lqn2matlab_string().

◆ lqn2matlab() [3/4]

template<class T>
void line::io::lqn2matlab ( const lqn::LqnModel< T > & model,
const std::string & model_name,
const std::string & path )

LQN2MATLAB into a file.

Definition at line 1419 of file code_gen.h.

References lqn2matlab(), and line::io::code_gen_detail::open_out().

◆ lqn2matlab() [4/4]

template<class T>
void line::io::lqn2matlab ( const lqn::LqnModel< T > & model,
std::ostream & os )

LQN2MATLAB under the model's own name (myLayeredModel when it has none).

Definition at line 1407 of file code_gen.h.

References lqn2matlab(), and line::lqn::LqnModel< T >::name.

◆ lqn2matlab_string()

template<class T>
std::string line::io::lqn2matlab_string ( const lqn::LqnModel< T > & model,
const std::string & model_name )

LQN2MATLAB returned as a string.

Definition at line 1426 of file code_gen.h.

References lqn2matlab(), and lqn2matlab_string().

Referenced by lqn2matlab_string().

◆ lqn2qn() [1/2]

template<class T>
qn::Network< T > line::io::lqn2qn ( const lqn::LqnModel< T > & lqn,
const std::string & replication = "auto",
const std::string & name = "model",
std::vector< std::string > * warnings = nullptr )

Port of MATLAB LQN2QN(lqn, replication): flatten a layered network into a queueing network whose synchronous calls block through REPLY signals.

Parameters
lqnthe layered model, from lqn::LqnBuilder::model() or lqn::read_lqnx_model
replication'auto' (default), 'materialize' or 'pool', as in the reference
namethe layered model's name; the network is called <name>-QN
warningswhen non-null, the reference's line_warning messages are appended here instead of being printed to stderr
Returns
the queueing network, routed and ready for get_struct()

Definition at line 1368 of file lqn2qn.h.

References lqn2qn(), and line::lqn::lqn_finalize().

Referenced by lqn2qn(), and lqn2qn().

◆ lqn2qn() [2/2]

template<class T>
qn::Network< T > line::io::lqn2qn ( const lqn::LqnStruct< T > & lsn,
const std::string & replication = "auto",
const std::string & name = "model",
std::vector< std::string > * warnings = nullptr )

LQN2QN over an already flattened LqnStruct.

The struct carries no replygraph, so only the IMPLICIT replies (leaf activities) are known here; a model with an explicit reply on a non-leaf activity (phase 2) must use the LqnModel overload.

Definition at line 1383 of file lqn2qn.h.

References lqn2qn().

◆ lqn_model_to_json()

◆ map2renv()

template<class T>
env::Environment< T > line::io::map2renv ( const qn::NetworkStruct< T > & base,
Map2RenvInfo< T > * info = nullptr,
std::size_t max_stages = 64 )

◆ mapqn2renv()

template<class T>
env::Environment< T > line::io::mapqn2renv ( const qn::NetworkStruct< T > & base,
Map2RenvInfo< T > * info = nullptr,
std::size_t max_stages = 64 )

Retained name for the transformation now implemented by map2renv, which generalizes it from a single MMPP2 service process to any number of MAP, MMPP2 or MMAP processes of arbitrary phase order.

New code should call map2renv directly.

Definition at line 191 of file map2renv.h.

References map2renv(), and mapqn2renv().

Referenced by mapqn2renv().

◆ marshal_scalar()

template<class T>
ExactValue line::io::marshal_scalar ( const T & v)

Marshal any T; only the exact instantiation fills numerator/denominator.

Definition at line 110 of file marshal.h.

References line::io::ExactValue::approx, line::io::ExactValue::denominator, exact_denominator(), exact_numerator(), line::io::ExactValue::is_exact, marshal_scalar(), and line::io::ExactValue::numerator.

Referenced by marshal_scalar().

◆ network_json_envelope()

template<class T>
detail::json line::io::network_json_envelope ( const qn::NetworkStruct< T > & sn)

The complete model.json envelope: {format, version, model}.

Definition at line 1513 of file network_writer.h.

References network_json_envelope(), and network_to_json().

Referenced by network_json_envelope(), run_generate(), line::ldes::solver_ldes(), and write_network_json().

◆ network_to_json()

template<class T>
detail::json line::io::network_to_json ( const qn::NetworkStruct< T > & sn)

qn::NetworkStruct -> the model.json model object.

Takes the struct rather than the qn::Network builder because that is what a solver holds, and because get_struct() is what the builder hands out.

Definition at line 604 of file network_writer.h.

References line::qn::CacheParam< T >::accost, line::qn::Station< T >::arrival_batch, line::qn::Station< T >::balking, line::qn::Station< T >::batch_reject, line::pfqn::SdrStruct::branch, line::pfqn::SdrStruct::C, line::qn::Station< T >::cap, line::lang::CATASTROPHE, line::qn::Station< T >::cdscaling, line::qn::Station< T >::cdscalingpeak, line::qn::Station< T >::classcap, line::qn::CacheParam< T >::classitem, line::lang::CLOSED, line::Matrix< T >::cols(), line::qn::Station< T >::ServerType::compatible, line::qn::CacheParam< T >::costcap, line::qn::CacheParam< T >::costcapglobal, line::qn::Station< T >::ServerType::count, line::pfqn::SdrStruct::d, line::qn::JobClass::deadline, line::lang::Delay, line::pfqn::SdrStruct::departure, line::qn::Station< T >::departure_discipline, line::lang::Distrib< T >::disabled, line::lang::DPS, line::lang::DPSPRIO, line::qn::Station< T >::droprule, line::Matrix< T >::empty(), line::pfqn::SdrStruct::entry, line::lang::Distrib< T >::exp_rate(), line::qn::ForkParam< T >::fan_out_dist, line::qn::ForkParam< T >::fan_out_link, line::qn::ForkParam< T >::fan_out_prob, line::lang::FCFS, line::qn::NodeDef::LoggerParam::file_name, line::lang::Fork, line::lang::GPS, line::lang::GPSPRIO, line::qn::Station< T >::hetero_policy, line::qn::CacheParam< T >::hitclass, line::lang::IMMEDIATE, line::qn::JobClass::immfeed, line::qn::Station< T >::immfeed, line::qn::Station< T >::impatience, line::qn::CacheParam< T >::initstate, line::InputError::InputError(), line::qn::JobClass::is_ref_class, line::qn::CacheParam< T >::itemcap, line::qn::CacheParam< T >::itemsize, line::qn::Station< T >::jdscaling, line::qn::Station< T >::jdscalingpeak, line::lang::Join, line::pfqn::SdrStruct::level, line::qn::Station< T >::lldscaling, line::lang::Logger, line::qn::NodeDef::logger, line::qn::Station< T >::marked_classes, line::qn::CacheParam< T >::missclass, line::qn::JobClass::name, line::qn::NodeDef::name, line::qn::Station< T >::ServerType::name, network_to_json(), line::qn::CacheParam< T >::nitems, line::qn::NodeDef::nodetype, line::lang::NONE, line::lang::NORMAL, line::qn::Station< T >::nservers, line::qn::Station< T >::orbit_impatience, line::lang::ORDER, line::lang::Distrib< T >::params, line::lang::PARTIAL, line::qn::Station< T >::patience, line::lang::Place, line::qn::Station< T >::polling_par, line::qn::Station< T >::polling_type, line::qn::JobClass::population, line::qn::CacheParam< T >::pread, line::qn::JobClass::prio, line::lang::PROB, line::qn::CacheParam< T >::qlru, line::lang::Queue, line::qn::NodeDef::queue_object, line::lang::RANDOM, line::qn::JobClass::refstat, line::qn::CacheParam< T >::replacestrat, line::lang::REPLY, line::qn::CacheParam< T >::retrieval_capacity, line::qn::CacheParam< T >::retrieval_classes, line::qn::CacheParam< T >::retrieval_queues, line::qn::NodeDef::routing, line::qn::NodeDef::routing_param, line::qn::NodeDef::routing_weights, line::Matrix< T >::rows(), line::qn::Station< T >::sched, line::qn::Station< T >::schedparam, line::lang::SDR, line::qn::JobClass::self_looping, line::qn::Station< T >::server_parallelism, line::qn::Station< T >::server_types, line::qn::Station< T >::ServerType::service, line::lang::Source, line::qn::JobClass::spawn, line::qn::NodeDef::station, line::qn::Station< T >::switchover, line::qn::Station< T >::switchover_pair, line::qn::NodeDef::tasks_per_link, line::lang::Distrib< T >::trace, and line::qn::JobClass::type.

Referenced by environment_to_json(), network_json_envelope(), and network_to_json().

◆ parse_rational_token()

template<class T>
T line::io::parse_rational_token ( const std::string & tok)

Parse a rational token of the form "3" or "3/10".

Definition at line 62 of file qn_reader.h.

References line::InputError::InputError(), and parse_rational_token().

Referenced by parse_rational_token(), and read_qn().

◆ pnml_load()

◆ pnml_save()

◆ qn2java() [1/4]

template<class T>
void line::io::qn2java ( const qn::NetworkStruct< T > & sn,
const std::string & model_name,
std::ostream & os,
bool headers = true )

Port of QN2JAVA(model, modelName, fid, headers): the body of a JLINE method public static Network ex() that rebuilds the network.

With headers false only the statements are written, for pasting into an existing method.

Definition at line 410 of file code_gen.h.

References line::qn::JobClass::name, line::qn::NodeDef::name, line::qn::NodeDef::nodetype, line::qn::Station< T >::nservers, line::qn::JobClass::population, line::qn::JobClass::prio, qn2java(), line::qn::JobClass::refstat, line::qn::Station< T >::sched, and line::qn::NodeDef::station.

Referenced by line2java(), qn2java(), qn2java(), qn2java(), qn2java(), and qn2java_string().

◆ qn2java() [2/4]

template<class T>
void line::io::qn2java ( qn::Network< T > & model,
const std::string & model_name,
const std::string & path,
bool headers = true )

QN2JAVA into a file.

Definition at line 539 of file code_gen.h.

References line::qn::Network< T >::get_struct(), line::io::code_gen_detail::open_out(), and qn2java().

◆ qn2java() [3/4]

template<class T>
void line::io::qn2java ( qn::Network< T > & model,
const std::string & model_name,
std::ostream & os,
bool headers = true )

QN2JAVA on a model under construction; refreshes it first.

Definition at line 527 of file code_gen.h.

References line::qn::Network< T >::get_struct(), and qn2java().

◆ qn2java() [4/4]

template<class T>
void line::io::qn2java ( qn::Network< T > & model,
std::ostream & os )

QN2JAVA with MATLAB's default model name.

Definition at line 533 of file code_gen.h.

References line::qn::Network< T >::get_struct(), and qn2java().

◆ qn2java_string()

template<class T>
std::string line::io::qn2java_string ( qn::Network< T > & model,
const std::string & model_name = "myModel",
bool headers = true )

QN2JAVA returned as a string.

Definition at line 547 of file code_gen.h.

References line::qn::Network< T >::get_struct(), qn2java(), and qn2java_string().

Referenced by qn2java_string().

◆ qn2jsimg() [1/2]

template<class T>
std::string line::io::qn2jsimg ( const qn::NetworkStruct< T > & sn,
const std::string & path = std::string(),
const JmtWriteOptions & opt = JmtWriteOptions() )

Port of QN2JSIMG(model, outputFileName, options) on a refreshed struct.

Parameters
snthe refreshed struct (model.getStruct(true))
paththe file to write; empty writes model.jsim in a fresh temp directory
optthe simulation header controls, JMTIO's properties
Returns
the path written

Definition at line 45 of file qn2jsimg.h.

References line::InputError::InputError(), jmt_write_jsim(), line::io::JmtWriteOptions::log_path, line::util::make_temp_dir(), and qn2jsimg().

Referenced by qn2jsimg(), and qn2jsimg().

◆ qn2jsimg() [2/2]

template<class T>
std::string line::io::qn2jsimg ( qn::Network< T > & model,
const std::string & path = std::string(),
const JmtWriteOptions & opt = JmtWriteOptions() )

Port of QN2JSIMG(model, outputFileName, options) on a model: refreshes it first.

Definition at line 61 of file qn2jsimg.h.

References line::qn::Network< T >::get_struct(), and qn2jsimg().

◆ qn2lqn() [1/2]

◆ qn2lqn() [2/2]

template<class T>
lqn::LqnModel< T > line::io::qn2lqn ( qn::Network< T > & model)

MATLAB-compatible model-level entry point; refreshes the Network first.

Definition at line 283 of file qn2lqn.h.

References line::qn::Network< T >::get_struct(), and qn2lqn().

◆ qn2matlab() [1/4]

template<class T>
void line::io::qn2matlab ( const qn::NetworkStruct< T > & sn,
const std::string & model_name,
std::ostream & os )

◆ qn2matlab() [2/4]

template<class T>
void line::io::qn2matlab ( qn::Network< T > & model,
const std::string & model_name,
const std::string & path )

QN2MATLAB into a file, as MATLAB does when fid is a file name.

Definition at line 387 of file code_gen.h.

References line::qn::Network< T >::get_struct(), line::io::code_gen_detail::open_out(), and qn2matlab().

◆ qn2matlab() [3/4]

template<class T>
void line::io::qn2matlab ( qn::Network< T > & model,
const std::string & model_name,
std::ostream & os )

QN2MATLAB on a model under construction; refreshes it first.

Definition at line 375 of file code_gen.h.

References line::qn::Network< T >::get_struct(), and qn2matlab().

◆ qn2matlab() [4/4]

template<class T>
void line::io::qn2matlab ( qn::Network< T > & model,
std::ostream & os )

QN2MATLAB with MATLAB's default model name.

Definition at line 381 of file code_gen.h.

References line::qn::Network< T >::get_struct(), and qn2matlab().

◆ qn2matlab_string()

template<class T>
std::string line::io::qn2matlab_string ( qn::Network< T > & model,
const std::string & model_name = "myModel" )

QN2MATLAB returned as a string.

Definition at line 394 of file code_gen.h.

References line::qn::Network< T >::get_struct(), qn2matlab(), and qn2matlab_string().

Referenced by qn2matlab_string().

◆ read_environment_json()

template<class T>
env::Environment< T > line::io::read_environment_json ( const std::string & path)

Parse a model.json file into an env::Environment<T>.

Definition at line 321 of file environment_reader.h.

References build_environment_from_json(), line::InputError::InputError(), and read_environment_json().

Referenced by read_environment_json().

◆ read_jsim()

template<class T>
qn::Network< T > line::io::read_jsim ( const std::string & path,
const std::string & name = std::string() )

Read a JSIM document into a Network.

Parameters
paththe .jsim / .jsimg / .jsimw file
namethe model name; the document's own when empty

< 1-based node index in the Network

Definition at line 294 of file jsim_reader.h.

References line::qn::Network< T >::add_class_switch(), line::qn::Network< T >::add_closed_class(), line::qn::Network< T >::add_delay(), line::qn::Network< T >::add_fork(), line::qn::Network< T >::add_join(), line::qn::Network< T >::add_open_class(), line::qn::Network< T >::add_place(), line::qn::Network< T >::add_queue(), line::qn::Network< T >::add_router(), line::qn::Network< T >::add_sink(), line::qn::Network< T >::add_source(), line::qn::Network< T >::add_transition(), line::lang::BAS, line::lang::DISABLED, line::lang::Distrib< T >::disabled_dist(), line::lang::DPS, line::lang::DPSPRIO, line::lang::DROP, line::qn::TransitionParam< T >::enabling, line::lang::FCFS, line::qn::TransitionParam< T >::fireweight, line::qn::TransitionParam< T >::firing, line::qn::TransitionParam< T >::firingdep, line::qn::TransitionParam< T >::firingphases, line::qn::TransitionParam< T >::firingprio, line::qn::TransitionParam< T >::firingproc, line::lang::GPS, line::lang::GPSPRIO, line::lang::HOL, line::lang::IMMEDIATE, line::lang::Distrib< T >::immediate(), line::qn::TransitionParam< T >::inhibiting, line::InputError::InputError(), line::lang::JSQ, line::lang::LCFS, line::lang::LEPT, line::qn::Network< T >::link(), line::lang::LJF, line::qn::TransitionParam< T >::modenames, line::qn::TransitionParam< T >::nmodes, line::qn::TransitionParam< T >::nmodeservers, line::xml::parse_file(), line::lang::Distrib< T >::phases(), line::lang::PROB, line::lang::PS, line::lang::PSPRIO, line::lang::RAND, read_jsim(), line::lang::RROBIN, line::lang::SEPT, line::qn::RoutingMatrix< T >::set(), line::qn::Network< T >::set_arrival(), line::qn::Network< T >::set_capacity(), line::qn::Network< T >::set_class_capacity(), line::qn::Network< T >::set_class_switch_matrix(), line::qn::Network< T >::set_drop_rule(), line::qn::Network< T >::set_initial_marking(), line::qn::Network< T >::set_number_of_servers(), line::qn::Network< T >::set_routing(), line::qn::Network< T >::set_routing_param(), line::qn::Network< T >::set_routing_weights(), line::qn::Network< T >::set_sched_param(), line::qn::Network< T >::set_service(), line::lang::SIRO, line::lang::SJF, line::lang::SQ, line::lang::TIMED, line::qn::TransitionParam< T >::timing, line::UnsupportedError::UnsupportedError(), line::lang::WAITQ, and line::lang::WRROBIN.

Referenced by jsim2line(), and read_jsim().

◆ read_layered_model()

template<class T>
lqn::LqnStruct< T > line::io::read_layered_model ( const std::string & path)

Read a layered model from either interchange: the LINE model.json or the LQNS .lqnx.

Every layered entry point goes through here, so a caller never has to know which of the two it was handed – and, more to the point, a model.json written by linemodel_save for a LayeredNetwork stops being unreadable merely because the XML reader was the only one wired up.

Definition at line 548 of file lqn_json_reader.h.

References is_layered_json(), read_layered_model(), read_lqn_json(), and line::lqn::read_lqnx().

Referenced by read_layered_model().

◆ read_lqn_json()

template<class T>
lqn::LqnStruct< T > line::io::read_lqn_json ( const std::string & path)

Parse a LayeredNetwork model.json file into an LqnStruct<T>.

Definition at line 526 of file lqn_json_reader.h.

References build_lqn_from_json(), line::InputError::InputError(), and read_lqn_json().

Referenced by read_layered_model(), and read_lqn_json().

◆ read_lqn_json_model()

template<class T>
lqn::LqnModel< T > line::io::read_lqn_json_model ( const std::string & path)

Parse a LayeredNetwork model.json file into its intermediate LqnModel<T>.

Definition at line 512 of file lqn_json_reader.h.

References build_lqn_model_from_json(), line::InputError::InputError(), and read_lqn_json_model().

Referenced by line2java_json(), line2matlab_json(), and read_lqn_json_model().

◆ read_lqnx_model()

template<class T>
lqn::LqnModel< T > line::io::read_lqnx_model ( const std::string & path)

Read a .lqnx file into the model-level LqnModel, which write_lqnx accepts back.

Definition at line 34 of file lqnx_io.h.

References read_lqnx_model(), and line::lqn::read_lqnx_model().

Referenced by read_lqnx_model().

◆ read_network_json()

template<class T>
qn::Network< T > line::io::read_network_json ( const std::string & path)

Parse a model.json file into a qn::Network<T>.

Definition at line 2611 of file network_reader.h.

References build_network_from_json(), line::InputError::InputError(), and read_network_json().

Referenced by line2java_json(), line2matlab_json(), main(), and read_network_json().

◆ read_qn()

◆ read_workflow_json()

template<class T>
workflow::Workflow< T > line::io::read_workflow_json ( const std::string & path)

Read a Workflow model.json off disk.

Definition at line 216 of file workflow_reader.h.

References build_workflow_from_json(), line::InputError::InputError(), and read_workflow_json().

Referenced by read_workflow_json().

◆ tikz_export_png()

template<class M>
std::string line::io::tikz_export_png ( M & model,
const std::string & path,
int dpi = 150,
const TikzOptions & opt = TikzOptions() )

Network.tikzExportPNG(path, dpi): compile the document and rasterise it with pdftoppm -png -r dpi -singlefile.

.png is appended when missing, as the JAR does. Returns the PNG path.

Definition at line 241 of file tikz.h.

References line::util::capture(), line::io::tikz_detail::compile_pdf(), line::io::tikz_detail::ends_with(), line::Error::Error(), line::util::ProcResult::exitCode, line::io::tikz_detail::kToolTimeout, line::util::ProcResult::out, tikz_export_png(), line::util::ProcResult::timedOut, and to_tikz().

Referenced by tikz_export_png().

◆ tikz_graph()

template<class T>
TikzGraph line::io::tikz_graph ( const qn::NetworkStruct< T > & sn)

The drawable graph of a network struct.

A node is drawn by the CLASS it was declared with, as MATLAB (through the JAR's instanceof chain) draws it: a Queue scheduled INF has nodetype Delay in the struct (Network::add_queue), but queue_object marks it, so it is drawn as a buffer labelled INF with an infinite server, not as a Delay box.

Definition at line 186 of file tikz_graph.h.

References line::Matrix< T >::cols(), line::io::TikzGraph::conn, line::io::tikz_detail::java_sched_name(), line::io::TikzGraph::name, line::io::TikzNode::name, line::qn::NodeDef::name, line::io::TikzGraph::nodes, line::qn::NodeDef::nodetype, line::qn::Station< T >::nservers, line::lang::Queue, line::qn::NodeDef::queue_object, line::Matrix< T >::rows(), line::io::TikzNode::sched, line::qn::Station< T >::sched, line::io::TikzNode::servers, line::qn::NodeDef::station, tikz_graph(), and line::io::TikzNode::type.

Referenced by tikz_graph(), and to_tikz().

◆ tikz_layout()

◆ tikz_pdflatex_available()

bool line::io::tikz_pdflatex_available ( )
inline

Can pdflatex --version run?

(TikZExporter.isPdfLatexAvailable)

Definition at line 204 of file tikz.h.

References line::util::capture(), and tikz_pdflatex_available().

Referenced by tikz_pdflatex_available(), and tikz_view().

◆ tikz_preamble()

std::string line::io::tikz_preamble ( const TikzOptions & opt)
inline

TikZNodeRenderer.getPreamble, byte for byte.

Definition at line 34 of file tikz_node_renderer.h.

References tikz_preamble().

Referenced by tikz_preamble(), and to_tikz().

◆ tikz_render_node()

std::string line::io::tikz_render_node ( const TikzNode & nd,
double x,
double y,
const TikzOptions & opt )
inline

◆ tikz_render_routed_edge()

std::string line::io::tikz_render_routed_edge ( const std::string & from_id,
const std::string & to_id,
const std::string & from_anchor,
const std::string & to_anchor,
const std::vector< TikzPoint > & wp,
double prob,
const TikzOptions & opt )
inline

TikZEdgeRouter.renderRoutedEdge.

prob is NaN for an unlabelled edge, which is every edge the exporter draws: the JAR passes NaN unconditionally.

Definition at line 176 of file tikz_edge_router.h.

References line::io::tikz_detail::java_fixed(), and tikz_render_routed_edge().

Referenced by tikz_render_routed_edge(), and to_tikz().

◆ tikz_view()

template<class M>
TikzViewResult line::io::tikz_view ( M & model,
const TikzOptions & opt = TikzOptions(),
bool open_viewer = true )

MNetwork.tikzView (TikZExporter.display).

With pdflatex, compile the document into a fresh line_tikz_* directory that is LEFT IN PLACE (the viewer reads it after this returns) and, when open_viewer, start a PDF viewer on it. Without pdflatex, or when compilation fails, save the source to network-diagram.tex in the working directory, as the JAR does, and say so on stdout. Nothing is thrown for a missing tool; the result says what exists.

Definition at line 331 of file tikz.h.

References line::io::tikz_detail::compile_pdf(), line::io::TikzViewResult::compiled, line::io::tikz_detail::display_pdf(), line::util::TempDir::keep(), line::io::tikz_detail::model_name(), line::io::TikzViewResult::opened, line::io::TikzViewResult::path, tikz_pdflatex_available(), tikz_view(), to_tikz(), and line::io::tikz_detail::write_text().

Referenced by tikz_view().

◆ to_column_major()

template<class T>
void line::io::to_column_major ( const Matrix< T > & m,
double * out )

Write a Matrix into a column-major host buffer, as doubles.

Definition at line 77 of file marshal.h.

References line::Matrix< T >::cols(), line::Matrix< T >::empty(), line::InputError::InputError(), line::Matrix< T >::rows(), and to_column_major().

Referenced by to_column_major().

◆ to_host()

template<class T>
void line::io::to_host ( const std::vector< T > & v,
double * out )

Write a vector into a host buffer, as doubles.

Definition at line 86 of file marshal.h.

References line::InputError::InputError(), and to_host().

Referenced by to_host().

◆ to_tikz() [1/3]

template<class T>
std::string line::io::to_tikz ( const qn::NetworkStruct< T > & sn,
const TikzOptions & opt = TikzOptions() )

Network.toTikZ(options) over a network struct.

Definition at line 193 of file tikz.h.

References tikz_graph(), and to_tikz().

◆ to_tikz() [2/3]

◆ to_tikz() [3/3]

template<class T>
std::string line::io::to_tikz ( qn::Network< T > & model,
const TikzOptions & opt = TikzOptions() )

Network.toTikZ(options); refreshes the struct, as the JAR's getStruct() does.

Definition at line 199 of file tikz.h.

References line::qn::Network< T >::get_struct(), and to_tikz().

◆ wf_distribution_type_from_string()

WfDistributionType line::io::wf_distribution_type_from_string ( const std::string & s)
inline

lower(options.distributionType) as the reference switches on it: exp, det, aph, hyperexp.

Anything else is EXP, the reference's otherwise branch.

Definition at line 85 of file wfcommons_loader.h.

References APH, DET, EXP, HYPEREXP, and wf_distribution_type_from_string().

Referenced by wf_distribution_type_from_string().

◆ wfcommons_load()

template<class T>
workflow::Workflow< T > line::io::wfcommons_load ( const std::string & path,
const WfCommonsOptions & options = WfCommonsOptions() )

◆ wfcommons_load_from_json()

template<class T>
workflow::Workflow< T > line::io::wfcommons_load_from_json ( const nlohmann::json & data,
const WfCommonsOptions & options = WfCommonsOptions() )

Port of WfCommonsLoader.loadFromStruct(data, options), on a parsed document.

The name defaults to struct_input, as in the reference.

Definition at line 411 of file wfcommons_loader.h.

References line::io::wfcommons_detail::build_workflow(), line::io::wfcommons_detail::extract_name(), line::io::wfcommons_detail::validate_schema(), and wfcommons_load_from_json().

Referenced by wfcommons_load_from_json().

◆ wfcommons_load_from_url()

template<class T>
workflow::Workflow< T > line::io::wfcommons_load_from_url ( const std::string & url,
const WfCommonsOptions & options = WfCommonsOptions(),
int timeout_ms = 60000 )

Port of WfCommonsLoader.loadFromUrl(urlString, options).

http:// goes over line::http, where a non-200 answer, including a redirect, is an InputError naming the status. https:// goes through curl or wget (fetch_https), following redirects that stay on https.

Parameters
timeout_msread timeout for the fetch

Definition at line 495 of file wfcommons_loader.h.

References line::http::Response::body, line::io::wfcommons_detail::build_workflow(), line::io::wfcommons_detail::extract_name(), line::io::wfcommons_detail::fetch_https(), line::io::wfcommons_detail::file_stem(), line::http::get(), line::InputError::InputError(), line::http::Response::status, line::io::wfcommons_detail::validate_schema(), and wfcommons_load_from_url().

Referenced by wfcommons_load_from_url().

◆ wfcommons_validate()

bool line::io::wfcommons_validate ( const std::string & path)
inline

Port of WfCommonsLoader.validateFile(jsonFile): true when the file parses and passes the schema checks.

Never throws.

Definition at line 523 of file wfcommons_loader.h.

References line::io::wfcommons_detail::parse_file(), line::io::wfcommons_detail::validate_schema(), and wfcommons_validate().

Referenced by wfcommons_validate().

◆ workflow_to_json()

template<class T>
detail::json line::io::workflow_to_json ( const workflow::Workflow< T > & wf)

workflow2json: the model object of a Workflow document.

Definition at line 387 of file linemodel_writer.h.

References workflow_to_json().

Referenced by linemodel_save(), and workflow_to_json().

◆ write_jmva()

template<class T>
std::string line::io::write_jmva ( const qn::NetworkStruct< T > & L,
const std::string & path,
const std::string & method,
std::size_t samples )

◆ write_linemodel_json()

void line::io::write_linemodel_json ( const detail::json & root,
const std::string & path )
inline

Write an envelope, indented as write_network_json indents it.

Definition at line 510 of file linemodel_writer.h.

References line::InputError::InputError(), and write_linemodel_json().

Referenced by linemodel_save(), linemodel_save(), linemodel_save(), and write_linemodel_json().

◆ write_lqnx()

template<class T>
lqn::LqnWriteReport line::io::write_lqnx ( const lqn::LqnModel< T > & m,
const std::string & path,
const std::string & model_name = std::string("LQN"),
bool use_abstract_names = false,
std::string * out_text = NULL )

Write an LqnModel as .lqnx; forwards to lqn::write_lqnx.

Returns
what the schema could not carry (see lqn::LqnWriteReport)

Definition at line 44 of file lqnx_io.h.

References write_lqnx(), and line::lqn::write_lqnx().

Referenced by write_lqnx().

◆ write_network_json()

template<class T>
void line::io::write_network_json ( const qn::NetworkStruct< T > & sn,
const std::string & path )

Write a model.json file, indented as the reference writers indent it.

Definition at line 1524 of file network_writer.h.

References line::InputError::InputError(), network_json_envelope(), and write_network_json().

Referenced by linemodel_save(), linemodel_save(), and write_network_json().

Variable Documentation

◆ DOCKER_DEFAULT_MIN_FREE_BYTES

const long long line::io::DOCKER_DEFAULT_MIN_FREE_BYTES = 2LL * 1024 * 1024 * 1024
static

Conservative free-space floor required before a pull (2 GiB).

Definition at line 47 of file docker_image.h.

Referenced by docker_has_storage_for().