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

Namespaces

namespace  decl_detail
namespace  embed_detail
namespace  markov_detail

Classes

struct  ActionRef
struct  ActionRow
 One row of an action table: Action, Throughput. More...
struct  ActionTable
struct  AddOptions
 Keyword arguments of Composition::add for an embedded LINE model. More...
class  Agent
 A finite-state agent with active, weighted passive and immediate transitions (handle semantics). More...
struct  AgentRecord
 The immutable agent record (core.Agent). More...
struct  AGOptions
 Options of the LAL arm of SolverAG (SolverAGOptions). More...
struct  AGResult
 The result of an AG decomposition (LALRCATResult, LALMeanFieldResult, LALGroupedResult). More...
struct  Certificate
 A successful RCAT certificate. More...
struct  ClockRoute
 One routed completion mark of a PH service clock. More...
struct  CommandOptions
 Keyword arguments of Agent::command. More...
struct  CommandValue
 A rate or weight of a guarded command: a number, a function f(v) of the agent's own variables, or a function f(v, view) that also reads other agents through the joint-state view (a functional rate). More...
struct  Compiled
 The compiled finite CTMC (core.Compiled). More...
struct  CompileOptions
 Options of compile_model. More...
class  Composition
 A collection of agents and embedded LINE models with atomic synchronisations (Composition). More...
struct  CoverageRow
 One row of the coverage matrix. More...
struct  CTMCOptions
 Options of the LAL arm of SolverCTMC. More...
struct  EmbeddedArc
 One arc of an embedded model: (target, keys, rate, immediate) (an immediate arc carries a weight). More...
class  EmbeddedEnvironment
 A LINE Environment embedded as a stage agent plus its stage networks (EmbeddedEnvironment). More...
class  EmbeddedNetwork
 A LINE Network embedded as one agent per node (EmbeddedNetwork). More...
class  EmbeddedPart
 An embedded LINE model seen by the LAL core (Python's EmbeddedNetwork / EmbeddedEnvironment duck type). More...
struct  Event
 One enabled joint event: successor, label indices, rate (weight if immediate), priority (Event). More...
class  EventKernel
 The legacy timed event kernel (event_kernel): the ordered event labels and a lazy joint-state transition generator yielding (target, label, rate). More...
class  Events
 The extended event kernel (events): the ordered labels and the enabled events of a joint state, in the Python iteration order: agents in order (an embedded agent's arcs, a hand agent's immediate events as met and its timed events of the top priority), passive choices in Cartesian-product order, then each minimum synchronisation. More...
struct  ExtSync
 Hand passives that join every event of an embedded part carrying a key matching pattern. More...
struct  GroupDistribution
 One group's joint distribution (diagnostics['group_distributions']). More...
struct  JacksonMatch
 The recognised Jackson structure (lal_jackson.recognize). More...
struct  LayeredModel
 A layered model built by build_layered. More...
struct  LoweredComposition
 A composition lowered for SolverMAM, with the map of lowered action labels to node-event labels. More...
struct  Lowering
 The lowering of a minimum-rate synchronisation (_lower_minimum). More...
struct  MAMOptions
 The options of SolverMAM on a LAL composition (SolverMAMOptions). More...
struct  MamResult
 The union of Python's LAL MAM result dataclasses. More...
struct  MapMatch
 The recognised MAP network (lal_map_network.recognize tuple). More...
struct  MddSolution
 The output of solve_mdd: the marginal table and the MCD aggregation. More...
struct  MinSync
 A minimum-rate synchronisation: at least two active endpoints and optional passive ones. More...
struct  Model
 A composition snapshot (core.Model): agents in declaration order plus synchronisations. More...
struct  Move
 One outgoing joint-state move of the legacy event kernel. More...
struct  NetworkSpec
 NetworkSpec: the network name and the declarations after the header line. More...
struct  NodeEvent
 Key of an embedded node action: (node, EventType, class | mode). More...
struct  NodeRef
 An action of a node of an embedded LINE model (NodeRef): key is the (node, EventType, class | mode) key, part the name of the embedded part that owns the node. More...
struct  QueueInfo
 Structured queue declaration retained while a queue agent is unmodified (queue_info). More...
struct  QueueRow
 One row of getQueueTable(): Agent, QLen, Busy, Util, ArvR, Tput, RespT. More...
struct  QueueTable
struct  Result
 The result container shared by the LAL solver paths (LALCTMCResult, the AG decomposition results, SSA). More...
struct  ServiceClock
 A PH service clock driving a queue (the clocks[q] dictionary). More...
class  SolverAG
 SolverAG on a finite LAL composition. More...
class  SolverCTMC
 Exact finite CTMC enumeration or MDD aggregation of a composition. More...
class  SolverMAM
 SolverMAM on a LAL composition. More...
class  SolverSSA
 Serial Gillespie (serial, ssa, default) and next-reaction (nrm) simulation of a composition. More...
struct  SSAOptions
 Options of the LAL arm of SolverSSA. More...
struct  SSAResult
 The SSA result (LALSSAResult). More...
struct  StateRow
 One row of a state table: Agent, State, Probability. More...
class  StateSpaceLimitError
 Raised when finite-state compilation exceeds a configured resource limit. More...
struct  StateTable
class  StateView
 Read-only view of a joint state, for functional rates and rewards (StateView). More...
struct  Support
 A support answer: (ok, reason). More...
struct  Sync
 An ordinary synchronisation: one active endpoint, hand passives and injected node arrivals. More...
struct  TableAttrs
 The attrs of a LAL result table. More...
struct  Traffic
 The traffic dictionary of a MAM result (result.traffic). More...
struct  TrafficFit
 Output of fit_traffic. More...
struct  TrafficFitBackend
 Replaceable numerical kernels of fit_traffic, so a test can intercept them as the Python tests monkeypatch mmap_ops.mmap_compress and m3a.m3pp2m_fitc_theoretical. More...
struct  Transition
 One labelled local transition source --(action, value)--> target. More...

Typedefs

typedef std::vector< std::pair< std::string, Matrix< double > > > NamedMatrices
typedef std::vector< std::pair< std::string, double > > NamedWeights
typedef std::map< std::string, long > Vars
 The valuation of the typed variables of an agent (v in a guard, update or rate).
typedef std::function< double(const StateView &)> ValueFn
 A functional rate or weight: a function of the joint-state view.
typedef std::function< double(const StateView &)> RewardFn
 A state reward: a function of the joint-state view (Composition::setReward).
typedef std::pair< std::string, std::string > Endpoint
 (agent, action).
typedef std::vector< Matrix< double > > MarkedMatrices
 A marked process as Python's list [D0, D1, D1_1, ..., D1_K].
typedef std::vector< std::pair< std::optional< std::pair< std::vector< double >, Matrix< double > > >, double > > NativeServices
 Per-queue service law handed to the native dec.source solve: a PH (alpha, T) or, when empty, an exponential with the given rate.
typedef std::function< std::pair< std::vector< double >, std::vector< double > >(const Matrix< double > &, const Matrix< double > &, const NativeServices &, const std::vector< long > &, const Matrix< double > &, std::size_t, const std::string &, const std::string &, double, long, double)> NativeDecSourceBackend
 The native dec.source solve behind map_network and marked_thinning (Python's SolverMAM(network, method='dec.source').getAvgTable()), with the arguments of detail::native_dec_source, returning per-queue (QLen, Tput).
using Declaration = std::pair<std::size_t, std::vector<std::string>>
 One declaration: its 1-based source line and its shell words.

Enumerations

enum class  Role { Active , Passive , Immediate }
 Transition role: active (rate), passive (weight) or immediate (weight, zero time). More...
enum class  LawClass { Timed , Immediate , Disabled }
 How a Markovian law is interpreted: a timed holding time, a zero-time step or no transition. More...

Functions

Lowering lower_minimum (const Model &snapshot)
 Lower a provably dominated minimum without changing its event law (_lower_minimum).
Support structural_support (const Model &original, const std::string &method="inaprc")
 Decomposition constraints checked without a global state space (structural_support).
Support certificate_support (const Model &original)
 The certificate's conservative structural prerequisites (certificate_support).
Support full_reachability (const Model &snapshot, std::size_t limit=10000)
 Whether one initial state reaches the whole Cartesian space (full_reachability).
std::pair< std::optional< Certificate >, std::string > certify (const Model &snapshot, const std::vector< double > &estimated_rates, double tol)
 Try a bounded exact certificate; failure is not a counterexample (certify).
AGResult rcat_solve (const Model &original, double tol=1e-4, long max_iter=100, const std::string &method="inaprc")
 Finite-agent RCAT fixed point (lal_rcat.solve_composition), method inap or inaprc.
std::pair< bool, std::string > certify_result (const Model &original, AGResult &result, double tol)
 Replace an approximate solution with an exactly verified RCAT solution (certify_result).
AGResult meanfield_solve (const Model &snapshot, double tol=1e-4, long max_iter=100, double damping=.5)
 Finite LAL mean-field approximation (lal_meanfield.solve_composition).
std::vector< std::vector< std::string > > group_partition (const Model &snapshot, const std::optional< std::vector< std::vector< std::string > > > &groups, long max_states)
 Validate and complete a user partition without enumeration (group_partition).
AGResult grouped_solve (const Model &snapshot, const std::optional< std::vector< std::vector< std::string > > > &groups, long max_states=256, double tol=1e-4, long max_iter=100, double damping=.5, bool source_truncated=false)
 Grouped decomposition (lal_grouped.solve_composition): exact within groups, mean-field across them.
nlohmann::json compare_with_ctmc (const Model &snapshot, const AGResult &result, std::optional< std::size_t > max_states=std::nullopt)
 Numerically compare the product of agent marginals with the exact finite CTMC (compare_with_ctmc).
Model parse (const std::string &source)
 Parse a .lal source into a validated model record (core.parse).
InputError value_error (const std::string &what)
 LINE:input:Unspecified, the C++ spelling of the Python ValueError raised throughout LAL.
const char * role_name (Role r)
std::string endpoint_label (const Endpoint &e)
std::string endpoint_repr (const Endpoint &e)
 Python's repr of an endpoint tuple, ('agent', 'action').
bool node_event_matches (const NodeEvent &key, const NodeEvent &pattern)
 True when key is pattern, or pattern leaves the index open.
std::string transition_label (const std::string &agent, const Transition &t)
 Primary label of a transition (its first label when it carries several).
std::vector< std::string > transition_labels (const std::string &agent, const Transition &t)
 All labels of a transition: a multi-label transition credits one firing to each.
double transition_value (const Transition &t, const StateView &view)
 The value of a transition in a joint state (_value).
std::string signature (const Model &m)
 A deterministic text signature of a model snapshot (Python's repr(model)), used by the solvers to cache a result against the composition it came from.
std::set< std::string > model_features (const Model &model)
 Features of a model that only the extended kernel interprets (model_features).
bool has_discrete (const Model &model)
 True when any agent of the model is discrete-time.
void validate_model (const Model &model, bool allow_unbounded=false)
 Validate the common agent model used by both frontends (validate_model).
std::vector< std::string > event_labels (const Model &model)
 Ordered event labels: hand active/immediate labels, then embedded node keys (event_labels).
std::vector< Event > selected (const std::vector< Event > &events)
 Apply maximal progress and immediate priorities to the enabled events (selected).
Compiled compile_model (const Model &model, const CompileOptions &opt=CompileOptions())
 Compile the Cartesian (or, with reachable_only, the reachable) finite state space and its event matrices (compile_model).
std::vector< CoverageRow > coverage_table ()
 The coverage matrix (coverage_table), one row per feature, in the reference order.
StateTable agent_state_rows (const Model &snapshot, const std::vector< std::vector< std::size_t > > &states, const std::vector< double > &probs)
 Marginal state probabilities of every agent (agent_state_rows): one row per local state of a hand agent; an embedded LINE model contributes one agent per stateful node, whose state is the node's row of LINE's state space, plus the stage agent of an embedded Environment.
StateTable marginal_table (const Model &snapshot, const Compiled &compiled, const std::vector< double > &probs)
 Agent-state marginals of a joint probability vector, in the Python row order.
std::vector< std::pair< std::string, double > > reward_values (const Model &snapshot, const std::vector< std::vector< std::size_t > > &states, const std::vector< double > &probs)
 Stationary expectation of every declared reward (reward_values).
ActionTable action_table (const Compiled &compiled, const std::vector< double > &probs, const Model *snapshot=nullptr)
 Labelled event throughputs probs @ rowsum(event), hidden labels left out.
Result solve_composition (const Model &snapshot, std::size_t max_states=0, std::size_t max_dense_bytes=kDefaultMaxDenseBytes)
 Solve a finite composition, respecting its initial state if reducible (solve_composition).
MddSolution solve_mdd (const Model &snapshot, std::size_t max_states=100000)
 MDD aggregation for finite active/passive compositions (solve_mdd).
Agent markov_process_agent (const lang::processes::MarkovChainModel< double > &mp, const std::string &prefix)
 One agent for a MarkovProcess: a timed action per generator entry (_markov_process_agent).
Agent markov_chain_agent (const lang::processes::MarkovChainModel< double > &mc, const std::string &prefix)
 One discrete-time agent for a MarkovChain (_markov_chain_agent).
Agent workflow_agent (workflow::Workflow< double > &wf, const std::string &prefix)
 One renewal agent for a Workflow, labelled by activity (_workflow_agent).
MamResult infinite_qbd (const Composition &model, double max_phases=64, double max_states=50000, const std::optional< std::string > &level_name=std::nullopt, long max_iter=100, double tol=1e-4)
 Infinite QBD solution of a composition (lal_infinite_qbd.solve_composition).
std::pair< std::optional< JacksonMatch >, std::string > recognize_jackson (const Model &snapshot)
 Conservatively recognise independent Poisson inputs and open M/M/c routing.
MamResult jackson (const Composition &model, double max_states=50000)
 Product-form solution of a recognised Jackson network (lal_jackson.solve_composition).
LoweredComposition lower (const Composition &composition)
 A Composition of plain agents equivalent to composition, or itself (lower).
ActionTable relabel_action_table (const ActionTable &table, const std::map< std::string, std::string > &mapping)
 Rename lowered action rows to their node-event labels, summing rows that share one (relabel_action_table).
std::pair< std::optional< MapMatch >, std::string > recognize_map (const Model &snapshot, bool allow_split=false)
 Recognise a restricted open MAP/PH network (lal_map_network.recognize).
std::pair< std::optional< MapMatch >, std::string > recognize_parallel (const Model &snapshot)
 Recognise independent stations with shared marked sources (lal_parallel_qbd.recognize).
MamResult map_network (const Composition &model, double tol=1e-4, long max_iter=100, double max_phases=64, const std::string &traffic_method="auto", const std::string &compress_method="exponential", double fit_time=1.0, double fit_tolerance=.05, const NativeDecSourceBackend &native_backend=NativeDecSourceBackend())
 Native MAM decomposition of a recognised MAP network (lal_map_network.solve_composition).
MamResult marked_thinning (const Composition &model, double tol=1e-4, long max_iter=100, double max_phases=64, const std::string &traffic_method="auto", const std::string &compress_method="exponential", double fit_time=1.0, double fit_tolerance=.05, const NativeDecSourceBackend &native_backend=NativeDecSourceBackend())
 Visit-thinning decomposition of a recognised MAP network (lal_marked_network.solve_composition).
MamResult parallel_qbd (const Composition &model, double max_phases=64, double max_states=50000, long max_iter=100, double tol=1e-4)
 Exact marginal QBDs of independent stations sharing marked sources (mam_parallel_qbd.h).
std::pair< std::optional< std::string >, std::string > qbd_structure (const Model &snapshot, double max_phases, double max_states, const std::optional< std::string > &level_name=std::nullopt)
 The level agent of a finite QBD, or nullopt and the refusal reason (structure).
MamResult finite_qbd (const Composition &model, double max_phases=64, double max_states=50000, const std::optional< std::string > &level_name=std::nullopt)
 Finite QBD solution of a composition (lal_qbd.solve_composition).
MamResult reachable_qbd (const Composition &model, double max_phases=64, double max_states=50000, const std::optional< std::string > &level_name=std::nullopt)
 Reachable QBD solution of a composition (lal_reachable_qbd.solve_composition).
MamResult solve_reduced (const Composition &model, const std::string &level_name, const std::string &method, const std::string &compress_method, double fit_time, double fit_tolerance, double max_phases, double max_states, long max_iter=100, double tol=1e-4)
 Fit the offered streams, then solve the reduced QBD (solve_reduced).
std::optional< Traffic > offered_traffic (const Model &snapshot, const std::string &level_name, bool materialize=true)
 Exact superposed offered MMAP and mark provenance, or nullopt (offered_traffic).
TrafficFit fit_traffic (const Traffic &traffic, const std::optional< MarkedMatrices > &original, const std::string &method, const std::string &compress_method, double fit_time, double fit_tolerance, const TrafficFitBackend &backend=TrafficFitBackend())
 Fit offered marked streams and enforce a finite-time counting budget (fit_traffic).
const char * nonmarkovian_kind ()
 The error kind of a refusal: LINE:unsupported:NonMarkovian.
const char * law_class_name (LawClass c)
const lang::Distrib< double > & declared_law (const lang::Distrib< double > &d)
 The declared law of a distribution (the original when a solver fitted a surrogate).
std::string law_name (const lang::Distrib< double > &d)
 A short readable name of a law for refusal messages (law_name).
LawClass classify (const lang::Distrib< double > &dist)
 Classify one law as timed, immediate or disabled (classify).
LawClass check_markovian (const lang::Distrib< double > &dist, const std::string &where)
 Classify dist and name where in the refusal when it is refused (check_markovian).
void check_network (const qn::NetworkStruct< double > &sn, const std::string &where=std::string())
 Refuse a network holding any non-Markovian specification (check_network).
void check_layered (const lqn::LqnStruct< double > &lsn, const std::string &name)
 Refuse a LayeredNetwork with a non-Markovian demand, think time, setup or arrival (check_layered).
void check_environment (const env::Environment< double > &e)
 Refuse an Environment with a non-Markovian holding law or stage model (check_environment).
void check_workflow (const workflow::Workflow< double > &wf)
 Refuse a Workflow with a non-Markovian activity law.
NetworkSpec parse_network (const std::string &text)
 parse_network(text): the header network NAME and the declarations after it.
qn::Network< double > build_network (const NetworkSpec &spec, const std::map< std::string, double > &parameters={})
 build_network(spec, parameters): the native network the declarations describe.
LayeredModel build_layered (const std::string &text)
 build_layered(text): processors, tasks, entries, activities and their calls.
env::Environment< double > build_environment (const std::string &text, const std::string &base)
 build_environment(text, base): one stage per stage NAME CATEGORY NODE CLASS RATE, each a fresh build of the base network text with the service of CLASS at NODE replaced by Exp(RATE), and switch FROM TO RATE for the exponential stage transitions.
Result solve_composition (const Composition &model, std::size_t max_states=0, std::size_t max_dense_bytes=kDefaultMaxDenseBytes)
 Solve a composition by exact finite CTMC (lal.ctmc.solve_composition(model)).
SSAResult simulate (const Model &snapshot, long events, unsigned long long seed, double warmupfrac=0.0, const std::string &method="ssa")
 Simulate event races without constructing the joint state space (simulate).

Variables

static const std::size_t kDefaultMaxDenseBytes = 256u * 1024u * 1024u
 Default dense-storage budget of the CTMC path: 256 MiB.
static const double kMamNoLimit = std::numeric_limits<double>::infinity()
 Limit value Python spells 10**100: no limit.

Typedef Documentation

◆ Declaration

using line::lal::Declaration = std::pair<std::size_t, std::vector<std::string>>

One declaration: its 1-based source line and its shell words.

Definition at line 58 of file network_decl.h.

◆ Endpoint

typedef std::pair<std::string, std::string> line::lal::Endpoint

(agent, action).

Definition at line 139 of file core.h.

◆ MarkedMatrices

typedef std::vector<Matrix<double> > line::lal::MarkedMatrices

A marked process as Python's list [D0, D1, D1_1, ..., D1_K].

Definition at line 54 of file mam_common.h.

◆ NamedMatrices

typedef std::vector<std::pair<std::string, Matrix<double> > > line::lal::NamedMatrices

Definition at line 76 of file builder.h.

◆ NamedWeights

typedef std::vector<std::pair<std::string, double> > line::lal::NamedWeights

Definition at line 77 of file builder.h.

◆ NativeDecSourceBackend

typedef std::function<std::pair<std::vector<double>, std::vector<double> >( const Matrix<double>&, const Matrix<double>&, const NativeServices&, const std::vector<long>&, const Matrix<double>&, std::size_t, const std::string&, const std::string&, double, long, double)> line::lal::NativeDecSourceBackend

The native dec.source solve behind map_network and marked_thinning (Python's SolverMAM(network, method='dec.source').getAvgTable()), with the arguments of detail::native_dec_source, returning per-queue (QLen, Tput).

Replaceable so a test can intercept it; an empty function keeps the native solver.

Definition at line 542 of file mam_map_network.h.

◆ NativeServices

typedef std::vector<std::pair<std::optional<std::pair<std::vector<double>, Matrix<double> > >, double> > line::lal::NativeServices

Per-queue service law handed to the native dec.source solve: a PH (alpha, T) or, when empty, an exponential with the given rate.

Definition at line 530 of file mam_map_network.h.

◆ RewardFn

typedef std::function<double(const StateView&)> line::lal::RewardFn

A state reward: a function of the joint-state view (Composition::setReward).

Definition at line 100 of file core.h.

◆ ValueFn

typedef std::function<double(const StateView&)> line::lal::ValueFn

A functional rate or weight: a function of the joint-state view.

Definition at line 97 of file core.h.

◆ Vars

typedef std::map<std::string, long> line::lal::Vars

The valuation of the typed variables of an agent (v in a guard, update or rate).

Definition at line 80 of file builder.h.

Enumeration Type Documentation

◆ LawClass

enum class line::lal::LawClass
strong

How a Markovian law is interpreted: a timed holding time, a zero-time step or no transition.

Enumerator
Timed 
Immediate 
Disabled 

Definition at line 50 of file markov.h.

◆ Role

enum class line::lal::Role
strong

Transition role: active (rate), passive (weight) or immediate (weight, zero time).

Enumerator
Active 
Passive 
Immediate 

Definition at line 88 of file core.h.

Function Documentation

◆ action_table()

ActionTable line::lal::action_table ( const Compiled & compiled,
const std::vector< double > & probs,
const Model * snapshot = nullptr )
inline

Labelled event throughputs probs @ rowsum(event), hidden labels left out.

Definition at line 238 of file ctmc.h.

References action_table(), line::Matrix< T >::cols(), line::lal::Compiled::events, line::lal::Compiled::labels, line::lal::ActionTable::rows, and line::Matrix< T >::rows().

Referenced by action_table(), and solve_composition().

◆ agent_state_rows()

StateTable line::lal::agent_state_rows ( const Model & snapshot,
const std::vector< std::vector< std::size_t > > & states,
const std::vector< double > & probs )
inline

Marginal state probabilities of every agent (agent_state_rows): one row per local state of a hand agent; an embedded LINE model contributes one agent per stateful node, whose state is the node's row of LINE's state space, plus the stage agent of an embedded Environment.

Definition at line 183 of file ctmc.h.

References agent_state_rows(), line::lal::Model::agents, line::lal::AgentRecord::embedded, line::lal::EmbeddedPart::has_stages(), line::lal::EmbeddedPart::node_state_label(), line::lal::EmbeddedPart::node_states(), line::lal::EmbeddedPart::prefix(), line::lal::StateTable::rows, line::lal::EmbeddedPart::stage_names(), line::lal::EmbeddedPart::stage_of(), and line::lal::AgentRecord::states.

Referenced by agent_state_rows(), marginal_table(), and solve_composition().

◆ build_environment()

env::Environment< double > line::lal::build_environment ( const std::string & text,
const std::string & base )
inline

◆ build_layered()

◆ build_network()

qn::Network< double > line::lal::build_network ( const NetworkSpec & spec,
const std::map< std::string, double > & parameters = {} )
inline

build_network(spec, parameters): the native network the declarations describe.

parameters overrides param defaults; naming a parameter the spec does not declare is an error.

Definition at line 695 of file network_decl.h.

References build_network().

Referenced by build_network().

◆ certificate_support()

◆ certify()

◆ certify_result()

◆ check_environment()

◆ check_layered()

void line::lal::check_layered ( const lqn::LqnStruct< double > & lsn,
const std::string & name )
inline

Refuse a LayeredNetwork with a non-Markovian demand, think time, setup or arrival (check_layered).

Definition at line 242 of file markov.h.

References check_layered(), and check_markovian().

Referenced by line::lal::Composition::add(), build_layered(), and check_layered().

◆ check_markovian()

LawClass line::lal::check_markovian ( const lang::Distrib< double > & dist,
const std::string & where )
inline

Classify dist and name where in the refusal when it is refused (check_markovian).

Definition at line 129 of file markov.h.

References check_markovian(), classify(), and line::lal::markov_detail::refusal().

Referenced by check_environment(), check_layered(), check_markovian(), check_network(), and check_workflow().

◆ check_network()

void line::lal::check_network ( const qn::NetworkStruct< double > & sn,
const std::string & where = std::string() )
inline

◆ check_workflow()

void line::lal::check_workflow ( const workflow::Workflow< double > & wf)
inline

Refuse a Workflow with a non-Markovian activity law.

Definition at line 271 of file markov.h.

References check_markovian(), and check_workflow().

Referenced by check_workflow(), and workflow_agent().

◆ classify()

LawClass line::lal::classify ( const lang::Distrib< double > & dist)
inline

Classify one law as timed, immediate or disabled (classify).

Accepted: Exp, Erlang, HyperExp, PH, APH, Coxian, Cox2, MAP (with MMPP and MMPP2), BMAP, MMAP (with MarkedMMPP) and MPH, Immediate and Disabled. Everything else, ME and RAP included, is refused with LINE:unsupported:NonMarkovian.

Definition at line 103 of file markov.h.

References line::lang::APH, line::lang::BMAP, classify(), line::lang::COX2, line::lang::COXIAN, declared_law(), line::lang::DISABLED, Disabled, line::lang::ERLANG, line::lang::EXP, line::lang::HYPEREXP, line::lang::IMMEDIATE, Immediate, line::lang::MAP, line::lang::MMAP, line::lang::MMPP2, line::lang::MPH, line::lang::PH, line::lal::markov_detail::refusal(), Timed, and line::lang::Distrib< T >::type.

Referenced by check_markovian(), and classify().

◆ compare_with_ctmc()

nlohmann::json line::lal::compare_with_ctmc ( const Model & snapshot,
const AGResult & result,
std::optional< std::size_t > max_states = std::nullopt )
inline

Numerically compare the product of agent marginals with the exact finite CTMC (compare_with_ctmc).

max_probability_error, total_variation and generator_residual compare the product CONDITIONED on the reachable states. Conditioning can hide product mass on states the CTMC never reaches, so that mass is reported separately as unreachable_product_mass, and unconditioned_total_variation compares the raw product, counting the unreachable mass as error.

Definition at line 1424 of file ag.h.

References line::lal::ActionRow::action, line::lal::Result::action_table, line::lal::StateRow::agent, line::lal::GroupDistribution::agents, line::lal::Model::agents, compare_with_ctmc(), line::lal::Result::compiled, line::lal::AGResult::group_distributions, line::lal::Model::index_of(), line::lal::GroupDistribution::probabilities, line::lal::Result::probabilities, line::lal::StateRow::probability, line::lal::ActionTable::rows, line::lal::StateTable::rows, solve_composition(), line::lal::StateRow::state, line::lal::Result::state_table, line::lal::GroupDistribution::states, line::lal::Result::states, line::lal::ActionRow::throughput, and value_error().

Referenced by compare_with_ctmc(), and line::lal::SolverAG::getAGDiagnostics().

◆ compile_model()

Compiled line::lal::compile_model ( const Model & model,
const CompileOptions & opt = CompileOptions() )
inline

Compile the Cartesian (or, with reachable_only, the reachable) finite state space and its event matrices (compile_model).

Matrices hold nonnegative event rates including observable self-events; the generator excludes those self-events. A composition with an embedded LINE model is always enumerated from its initial state. Vanishing states (an immediate event enabled, or a vanishing state of an embedded model) are eliminated by stochastic complementation.

Definition at line 1262 of file core.h.

References line::lal::Compiled::agent_names, line::lal::Compiled::agent_states, line::lal::Model::agents, compile_model(), line::lal::AgentRecord::embedded, line::lal::Compiled::events, line::lal::Compiled::generator, line::lal::AgentRecord::initial, line::lal::Compiled::initial, line::lal::AgentRecord::initial_distribution, line::lal::Compiled::initial_distribution, line::lal::Compiled::labels, line::lal::Events::labels, model_features(), line::lal::AgentRecord::name, line::lal::Events::outgoing(), selected(), line::lal::AgentRecord::state_index(), line::lal::AgentRecord::states, line::lal::Compiled::states, line::lal::StateSpaceLimitError::StateSpaceLimitError(), and validate_model().

Referenced by compile_model(), line::lal::Composition::get_struct(), and solve_composition().

◆ coverage_table()

std::vector< CoverageRow > line::lal::coverage_table ( )
inline

The coverage matrix (coverage_table), one row per feature, in the reference order.

Definition at line 35 of file coverage.h.

References coverage_table().

Referenced by coverage_table().

◆ declared_law()

const lang::Distrib< double > & line::lal::declared_law ( const lang::Distrib< double > & d)
inline

The declared law of a distribution (the original when a solver fitted a surrogate).

Definition at line 57 of file markov.h.

References line::lang::Distrib< T >::declared, and declared_law().

Referenced by check_network(), classify(), declared_law(), and law_name().

◆ endpoint_label()

std::string line::lal::endpoint_label ( const Endpoint & e)
inline

◆ endpoint_repr()

std::string line::lal::endpoint_repr ( const Endpoint & e)
inline

Python's repr of an endpoint tuple, ('agent', 'action').

Definition at line 144 of file core.h.

References endpoint_repr().

Referenced by endpoint_repr(), line::lal::Events::Events(), and validate_model().

◆ event_labels()

◆ finite_qbd()

◆ fit_traffic()

TrafficFit line::lal::fit_traffic ( const Traffic & traffic,
const std::optional< MarkedMatrices > & original,
const std::string & method,
const std::string & compress_method,
double fit_time,
double fit_tolerance,
const TrafficFitBackend & backend = TrafficFitBackend() )
inline

Fit offered marked streams and enforce a finite-time counting budget (fit_traffic).

Every check is RELATIVE to the magnitude of its reference quantity, per mark and per covariance entry, with floors at the smallest normal double (std::numeric_limits<double>::min()) only to keep an all-zero reference from dividing by zero: a floor of 1 would make the tolerance absolute for low-rate streams. Streams whose largest rate lies outside [1e-8, 1e8] are fitted on a normalised time scale and scaled back.

Definition at line 292 of file mam_traffic.h.

References line::lal::TrafficFit::after_cov, line::lal::TrafficFit::after_rate, line::lal::TrafficFit::before_cov, line::lal::TrafficFit::before_rate, line::lal::TrafficFit::covariance_error, line::eye(), fit_traffic(), line::lal::TrafficFit::fitted, line::InputError::InputError(), line::mam::m3pp2m_fitc_theoretical(), line::mam::m3pp2m_interleave(), line::lal::Traffic::marks, line::lal::TrafficFit::rate_error, line::Matrix< T >::rows(), and line::lal::Traffic::streams.

Referenced by fit_traffic(), map_network(), marked_thinning(), and solve_reduced().

◆ full_reachability()

Support line::lal::full_reachability ( const Model & snapshot,
std::size_t limit = 10000 )
inline

◆ group_partition()

std::vector< std::vector< std::string > > line::lal::group_partition ( const Model & snapshot,
const std::optional< std::vector< std::vector< std::string > > > & groups,
long max_states )
inline

Validate and complete a user partition without enumeration (group_partition).

Definition at line 1034 of file ag.h.

References line::lal::Model::agents, group_partition(), line::lal::Model::has_agent(), line::lal::AgentRecord::name, and value_error().

Referenced by group_partition(), grouped_solve(), and line::lal::SolverAG::supportsModelMethod().

◆ grouped_solve()

AGResult line::lal::grouped_solve ( const Model & snapshot,
const std::optional< std::vector< std::vector< std::string > > > & groups,
long max_states = 256,
double tol = 1e-4,
long max_iter = 100,
double damping = .5,
bool source_truncated = false )
inline

Grouped decomposition (lal_grouped.solve_composition): exact within groups, mean-field across them.

source_truncated marks a flattened truncated import, which keeps a one-group solution from being reported exact.

< model agent index

< position within the group

Definition at line 1062 of file ag.h.

References line::lal::Transition::action, line::lal::Result::action_table, Active, line::lal::MinSync::active, line::lal::Sync::active, line::lal::Model::agents, line::lal::ActionTable::attrs, line::lal::StateTable::attrs, line::lal::Result::converged, line::lal::Result::diagnostics, endpoint_label(), line::ErrorKind::ErrorKind(), line::lal::Result::exact, line::lal::AGResult::group_distributions, group_partition(), grouped_solve(), line::lal::Model::index_of(), line::lal::AgentRecord::initial, line::lal::AgentRecord::initial_distribution, line::lal::Result::iterations, line::lal::EventKernel::labels, line::lal::Result::method, line::lal::Model::min_syncs, line::lal::AgentRecord::name, Passive, line::lal::MinSync::passive, line::lal::Sync::passive, line::lal::Result::probabilities, line::lal::AGResult::residual, line::lal::Transition::role, line::lal::StateTable::rows, solve_composition(), line::lal::Transition::source, line::lal::AgentRecord::state_index(), line::lal::Result::state_table, line::lal::AgentRecord::states, line::lal::Result::states, line::lal::Model::syncs, line::lal::Transition::target, line::UnsupportedError::UnsupportedError(), validate_model(), line::lal::Transition::value, and value_error().

Referenced by grouped_solve(), and line::lal::SolverAG::runAnalyzer().

◆ has_discrete()

bool line::lal::has_discrete ( const Model & model)
inline

◆ infinite_qbd()

MamResult line::lal::infinite_qbd ( const Composition & model,
double max_phases = 64,
double max_states = 50000,
const std::optional< std::string > & level_name = std::nullopt,
long max_iter = 100,
double tol = 1e-4 )
inline

◆ jackson()

◆ law_class_name()

const char * line::lal::law_class_name ( LawClass c)
inline

Definition at line 52 of file markov.h.

References Immediate, law_class_name(), and Timed.

Referenced by law_class_name().

◆ law_name()

std::string line::lal::law_name ( const lang::Distrib< double > & d)
inline

A short readable name of a law for refusal messages (law_name).

Definition at line 62 of file markov.h.

References declared_law(), law_name(), and line::lang::process_to_text().

Referenced by law_name(), and line::lal::markov_detail::refusal().

◆ lower()

LoweredComposition line::lal::lower ( const Composition & composition)
inline

A Composition of plain agents equivalent to composition, or itself (lower).

lowered is set and labels filled when anything was lowered.

Definition at line 472 of file mam_lowering.h.

References lower().

Referenced by lower().

◆ lower_minimum()

◆ map_network()

MamResult line::lal::map_network ( const Composition & model,
double tol = 1e-4,
long max_iter = 100,
double max_phases = 64,
const std::string & traffic_method = "auto",
const std::string & compress_method = "exponential",
double fit_time = 1.0,
double fit_tolerance = .05,
const NativeDecSourceBackend & native_backend = NativeDecSourceBackend() )
inline

Native MAM decomposition of a recognised MAP network (lal_map_network.solve_composition).

Definition at line 625 of file mam_map_network.h.

References line::lal::Result::action_table, line::lal::TrafficFit::after_cov, line::lal::TrafficFit::after_rate, line::lal::Model::agents, line::lal::MamResult::approximation, line::lal::ActionTable::attrs, line::lal::QueueTable::attrs, line::lal::StateTable::attrs, line::lal::TrafficFit::before_cov, line::lal::TrafficFit::before_rate, line::lal::MapMatch::clocks, line::lal::Traffic::count_covariance_error, line::lal::TrafficFit::covariance_error, line::lal::Result::exact, line::lal::Traffic::exact, line::lal::MamResult::extra, line::lal::Result::fallback_reason, line::lal::Traffic::fallback_reason, line::lal::Traffic::feasible, line::lal::Traffic::fit_time, line::lal::Traffic::fit_tolerance, fit_traffic(), line::lal::TrafficFit::fitted, line::lal::Traffic::fitted_count_covariance, line::lal::Traffic::fitted_matrices, line::lal::Traffic::fitted_rates, line::lal::MamResult::has_converged, line::lal::Traffic::kind, map_network(), line::lal::MapMatch::marks, line::lal::Traffic::marks, line::lal::Traffic::matrices, line::lal::Result::method, line::lal::Traffic::method, line::mam::mmap_super(), line::lal::Composition::model(), line::lal::AgentRecord::name, line::lal::MamResult::native_internal_fitting, line::lal::MamResult::native_time_scale, line::lal::Traffic::original_count_covariance, line::lal::Traffic::original_matrices, line::lal::Traffic::original_rates, line::lal::Traffic::original_streams, line::lal::AgentRecord::queue_info, line::lal::MamResult::queue_measures, line::lal::MapMatch::queues, line::lal::Traffic::rate_error, line::lal::TrafficFit::rate_error, recognize_map(), line::lal::MamResult::residual, line::lal::MamResult::residual_kind, line::lal::ActionTable::rows, line::lal::QueueTable::rows, selected(), line::lal::MamResult::source_marks, line::lal::MamResult::source_matrices, line::lal::Composition::source_truncated, line::lal::MapMatch::sources, line::lal::Result::state_table, line::lal::AgentRecord::states, line::lal::Traffic::streams, line::lal::MapMatch::target, line::lal::MamResult::traffic, line::lal::Result::truncated, line::lal::MamResult::unavailable_busy_probabilities, and validate_model().

Referenced by map_network(), and line::lal::SolverMAM::runAnalyzer().

◆ marginal_table()

StateTable line::lal::marginal_table ( const Model & snapshot,
const Compiled & compiled,
const std::vector< double > & probs )
inline

Agent-state marginals of a joint probability vector, in the Python row order.

Definition at line 219 of file ctmc.h.

References agent_state_rows(), marginal_table(), and line::lal::Compiled::states.

Referenced by marginal_table().

◆ marked_thinning()

MamResult line::lal::marked_thinning ( const Composition & model,
double tol = 1e-4,
long max_iter = 100,
double max_phases = 64,
const std::string & traffic_method = "auto",
const std::string & compress_method = "exponential",
double fit_time = 1.0,
double fit_tolerance = .05,
const NativeDecSourceBackend & native_backend = NativeDecSourceBackend() )
inline

Visit-thinning decomposition of a recognised MAP network (lal_marked_network.solve_composition).

Definition at line 30 of file mam_marked_network.h.

References line::lal::Result::action_table, line::lal::TrafficFit::after_cov, line::lal::TrafficFit::after_rate, line::lal::Model::agents, line::lal::MamResult::approximation, line::lal::ActionTable::attrs, line::lal::QueueTable::attrs, line::lal::StateTable::attrs, line::lal::TrafficFit::before_cov, line::lal::TrafficFit::before_rate, line::lal::MapMatch::clocks, line::lal::TrafficFit::covariance_error, line::lal::Result::exact, line::lal::Traffic::exact, line::lal::MamResult::extra, line::lal::Traffic::extra, fit_traffic(), line::lal::TrafficFit::fitted, line::lal::MamResult::has_converged, line::lu_factor(), line::lu_solve(), marked_thinning(), line::lal::MapMatch::marks, line::lal::Traffic::marks, line::lal::Result::method, line::lal::Traffic::method, line::mam::mmap_super(), line::lal::Composition::model(), line::lal::AgentRecord::name, line::lal::MamResult::native_internal_fitting, line::lal::MamResult::native_time_scales, line::lal::MamResult::poissonised_visit_excess, line::lal::AgentRecord::queue_info, line::lal::MamResult::queue_measures, line::lal::MapMatch::queues, line::lal::TrafficFit::rate_error, recognize_map(), line::lal::MamResult::residual, line::lal::MamResult::residual_kind, line::lal::ActionTable::rows, line::lal::QueueTable::rows, selected(), line::Matrix< T >::size(), line::lal::Composition::source_truncated, line::lal::MapMatch::sources, line::lal::Result::state_table, line::lal::AgentRecord::states, line::lal::Traffic::streams, line::lal::MapMatch::sync, line::lal::MamResult::traffic, line::lal::Result::truncated, line::lal::MamResult::unavailable_busy_probabilities, and validate_model().

Referenced by marked_thinning(), and line::lal::SolverMAM::runAnalyzer().

◆ markov_chain_agent()

Agent line::lal::markov_chain_agent ( const lang::processes::MarkovChainModel< double > & mc,
const std::string & prefix )
inline

One discrete-time agent for a MarkovChain (_markov_chain_agent).

Transition probabilities become per-step weights, self-steps included as observable self-events. A DTMC with matrix P has the stationary law of the CTMC with generator P - I, so the CTMC solver returns its stationary distribution exactly and action throughputs read as per-step frequencies; every method with a time semantics refuses it.

Definition at line 1562 of file embed.h.

References line::lal::Agent::active(), line::Matrix< T >::cols(), line::ErrorKind::ErrorKind(), line::InputError::InputError(), markov_chain_agent(), line::Matrix< T >::rows(), line::Matrix< T >::size(), and line::lal::embed_detail::state_tags().

Referenced by line::lal::Composition::add(), and markov_chain_agent().

◆ markov_process_agent()

Agent line::lal::markov_process_agent ( const lang::processes::MarkovChainModel< double > & mp,
const std::string & prefix )
inline

One agent for a MarkovProcess: a timed action per generator entry (_markov_process_agent).

Action T_i_j carries the label <agent>.T[i->j] (state names come from the state-space rows when given). The chain starts uniformly over its states, as MarkovProcess does.

Definition at line 1533 of file embed.h.

References line::lal::Agent::active(), line::Matrix< T >::cols(), line::ErrorKind::ErrorKind(), line::InputError::InputError(), markov_process_agent(), line::lang::processes::MarkovChainModel< T >::mat, line::Matrix< T >::rows(), line::Matrix< T >::size(), line::lang::processes::MarkovChainModel< T >::state_space, and line::lal::embed_detail::state_tags().

Referenced by line::lal::Composition::add(), and markov_process_agent().

◆ meanfield_solve()

◆ model_features()

◆ node_event_matches()

bool line::lal::node_event_matches ( const NodeEvent & key,
const NodeEvent & pattern )
inline

True when key is pattern, or pattern leaves the index open.

Definition at line 176 of file core.h.

References line::lal::NodeEvent::event, line::lal::NodeEvent::index, line::lal::NodeEvent::model, line::lal::NodeEvent::node, and node_event_matches().

Referenced by line::lal::EmbeddedPart::matches(), and node_event_matches().

◆ nonmarkovian_kind()

const char * line::lal::nonmarkovian_kind ( )
inline

The error kind of a refusal: LINE:unsupported:NonMarkovian.

Definition at line 47 of file markov.h.

References nonmarkovian_kind().

Referenced by check_network(), nonmarkovian_kind(), and line::lal::markov_detail::refusal().

◆ offered_traffic()

std::optional< Traffic > line::lal::offered_traffic ( const Model & snapshot,
const std::string & level_name,
bool materialize = true )
inline

◆ parallel_qbd()

MamResult line::lal::parallel_qbd ( const Composition & model,
double max_phases,
double max_states,
long max_iter,
double tol )
inline

◆ parse()

Model line::lal::parse ( const std::string & source)
inline

Parse a .lal source into a validated model record (core.parse).

Definition at line 1296 of file builder.h.

References parse().

Referenced by line::lal::Composition::from_string(), and parse().

◆ parse_network()

NetworkSpec line::lal::parse_network ( const std::string & text)
inline

parse_network(text): the header network NAME and the declarations after it.

Definition at line 680 of file network_decl.h.

References line::lal::NetworkSpec::declarations, line::lal::NetworkSpec::name, parse_network(), line::lal::decl_detail::split_rows(), and value_error().

Referenced by build_environment(), and parse_network().

◆ qbd_structure()

std::pair< std::optional< std::string >, std::string > line::lal::qbd_structure ( const Model & snapshot,
double max_phases,
double max_states,
const std::optional< std::string > & level_name = std::nullopt )
inline

The level agent of a finite QBD, or nullopt and the refusal reason (structure).

Definition at line 36 of file mam_qbd.h.

References line::lal::Model::agents, line::lal::AgentRecord::name, qbd_structure(), and line::lal::AgentRecord::states.

Referenced by finite_qbd(), qbd_structure(), reachable_qbd(), line::lal::SolverMAM::runAnalyzer(), and line::lal::SolverMAM::supportsModelMethod().

◆ rcat_solve()

AGResult line::lal::rcat_solve ( const Model & original,
double tol = 1e-4,
long max_iter = 100,
const std::string & method = "inaprc" )
inline

◆ reachable_qbd()

◆ recognize_jackson()

◆ recognize_map()

std::pair< std::optional< MapMatch >, std::string > line::lal::recognize_map ( const Model & snapshot,
bool allow_split = false )
inline

Recognise a restricted open MAP/PH network (lal_map_network.recognize).

Definition at line 99 of file mam_map_network.h.

References line::lal::Transition::action, line::lal::Sync::active, line::lal::Model::agent(), line::lal::ServiceClock::agent, line::lal::Model::agents, line::lal::ServiceClock::alpha, line::lal::ServiceClock::busy_phases, line::lal::MapMatch::clocks, line::lal::ServiceClock::correlated_reset, line::lal::Model::has_agent(), line::lal::Model::index_of(), line::lal::ClockRoute::input, line::lu_factor(), line::lu_solve(), line::lal::MapMatch::marks, line::lal::ServiceClock::mean, line::lal::Model::min_syncs, line::lal::AgentRecord::name, line::lal::ClockRoute::partners, line::lal::Sync::passive, line::lal::ServiceClock::phase_dependent_routing, line::lal::AgentRecord::queue_info, line::lal::MapMatch::queues, recognize_map(), line::lal::ServiceClock::routes, line::lal::QueueInfo::service_inputs, line::lal::QueueInfo::service_phase, line::Matrix< T >::size(), line::lal::Transition::source, line::lal::MapMatch::sources, line::lal::AgentRecord::state_index(), line::lal::AgentRecord::states, line::lal::MapMatch::sync, line::lal::Model::syncs, line::lal::ServiceClock::T, line::lal::ClockRoute::target, line::lal::MapMatch::target, line::lal::Transition::target, line::lal::AgentRecord::transitions, line::Matrix< T >::transpose(), and line::lal::Transition::value.

Referenced by line::lal::SolverMAM::getCompositionCapabilities(), map_network(), marked_thinning(), recognize_map(), recognize_parallel(), line::lal::SolverMAM::runAnalyzer(), and line::lal::SolverMAM::supportsModelMethod().

◆ recognize_parallel()

◆ relabel_action_table()

ActionTable line::lal::relabel_action_table ( const ActionTable & table,
const std::map< std::string, std::string > & mapping )
inline

Rename lowered action rows to their node-event labels, summing rows that share one (relabel_action_table).

The attributes are kept.

Definition at line 478 of file mam_lowering.h.

References line::lal::ActionTable::attrs, relabel_action_table(), and line::lal::ActionTable::rows.

Referenced by relabel_action_table(), and line::lal::SolverMAM::runAnalyzer().

◆ reward_values()

std::vector< std::pair< std::string, double > > line::lal::reward_values ( const Model & snapshot,
const std::vector< std::vector< std::size_t > > & states,
const std::vector< double > & probs )
inline

Stationary expectation of every declared reward (reward_values).

Definition at line 224 of file ctmc.h.

References reward_values(), line::lal::Model::rewards, and line::lal::StateView::StateView().

Referenced by reward_values(), simulate(), and solve_composition().

◆ role_name()

const char * line::lal::role_name ( Role r)
inline

Definition at line 90 of file core.h.

References Active, Passive, and role_name().

Referenced by role_name(), signature(), and validate_model().

◆ selected()

std::vector< Event > line::lal::selected ( const std::vector< Event > & events)
inline

Apply maximal progress and immediate priorities to the enabled events (selected).

Definition at line 746 of file core.h.

References selected().

Referenced by compile_model(), map_network(), marked_thinning(), selected(), and simulate().

◆ signature()

◆ simulate()

SSAResult line::lal::simulate ( const Model & snapshot,
long events,
unsigned long long seed,
double warmupfrac = 0.0,
const std::string & method = "ssa" )
inline

◆ solve_composition() [1/2]

Result line::lal::solve_composition ( const Composition & model,
std::size_t max_states = 0,
std::size_t max_dense_bytes = kDefaultMaxDenseBytes )
inline

Solve a composition by exact finite CTMC (lal.ctmc.solve_composition(model)).

Definition at line 45 of file solvers.h.

References kDefaultMaxDenseBytes, line::lal::Composition::model(), and solve_composition().

◆ solve_composition() [2/2]

◆ solve_mdd()

MddSolution line::lal::solve_mdd ( const Model & snapshot,
std::size_t max_states = 100000 )
inline

MDD aggregation for finite active/passive compositions (solve_mdd).

Exact explicit-frontier reachability, an irreducibility check over the stored edges, then the Miner-Ciardo-Donatelli level aggregation.

Definition at line 366 of file ctmc.h.

References line::mdd::MddEvent< T >::a, line::lal::Transition::action, Active, line::lal::Sync::active, line::mdd::MddLocalMatrix< T >::Builder::add(), line::lal::Model::agents, line::mdd::MddEvent< T >::b, line::mdd::MddLocalMatrix< T >::Builder::build(), line::Matrix< T >::cols(), line::mdd::MddDescriptor< T >::domain, line::Matrix< T >::empty(), line::mdd::MDD::enumerate(), line::ErrorKind::ErrorKind(), line::mdd::MddDescriptor< T >::events, line::lal::Model::index_of(), line::mdd::MddDescriptor< T >::init, line::lal::AgentRecord::initial, line::lal::AgentRecord::initial_distribution, line::mdd::MddDescriptor< T >::K, line::mdd::MddEvent< T >::lev, line::lal::MddSolution::mcd, line::mdd::mdd_mcd(), line::mdd::mdd_reachset(), line::lal::Model::min_syncs, line::mdd::MddMcdResult< T >::Mrows, line::lal::AgentRecord::name, Passive, line::lal::Sync::passive, line::mdd::MddMcdResult< T >::pik, line::lal::Transition::role, line::lal::StateTable::rows, line::Matrix< T >::rows(), solve_mdd(), line::lal::Transition::source, line::lal::AgentRecord::state_index(), line::lal::AgentRecord::states, line::lal::Model::syncs, line::lal::MddSolution::table, line::lal::Transition::target, line::mdd::MDD::to_struct(), line::lal::AgentRecord::transitions, line::UnsupportedError::UnsupportedError(), validate_model(), line::lal::Transition::value, and line::mdd::MddEvent< T >::W.

Referenced by line::lal::SolverCTMC::runAnalyzer(), and solve_mdd().

◆ solve_reduced()

MamResult line::lal::solve_reduced ( const Composition & model,
const std::string & level_name,
const std::string & method,
const std::string & compress_method,
double fit_time,
double fit_tolerance,
double max_phases,
double max_states,
long max_iter = 100,
double tol = 1e-4 )
inline

Fit the offered streams, then solve the reduced QBD (solve_reduced).

Definition at line 39 of file mam_reduced.h.

References line::lal::Agent::action(), line::lal::Transition::action, line::lal::Result::action_table, Active, line::lal::TrafficFit::after_cov, line::lal::TrafficFit::after_rate, line::lal::StateRow::agent, line::lal::Composition::agents(), line::lal::Model::agents, line::lal::ActionTable::attrs, line::lal::StateTable::attrs, line::lal::TrafficFit::before_cov, line::lal::TrafficFit::before_rate, line::lal::Traffic::compression, line::lal::Traffic::count_covariance_error, line::lal::TrafficFit::covariance_error, line::lal::Result::exact, line::lal::Traffic::exact, line::lal::Traffic::feasible, finite_qbd(), line::lal::Traffic::fit_time, line::lal::Traffic::fit_tolerance, fit_traffic(), line::lal::TrafficFit::fitted, line::lal::Traffic::fitted_count_covariance, line::lal::Traffic::fitted_matrices, line::lal::Traffic::fitted_rates, line::lal::Model::has_agent(), infinite_qbd(), line::InputError::InputError(), line::InternalError::InternalError(), line::lal::Traffic::kind, line::lal::Traffic::marks, line::lal::Result::method, line::lal::Traffic::method, line::lal::Composition::model(), line::lal::AgentRecord::name, offered_traffic(), line::lal::Traffic::original_count_covariance, line::lal::Traffic::original_matrices, line::lal::Traffic::original_rates, line::lal::Traffic::original_streams, line::lal::Traffic::rate_error, line::lal::TrafficFit::rate_error, line::lal::Transition::role, line::lal::ActionTable::rows, line::lal::StateTable::rows, solve_reduced(), line::lal::Composition::source_truncated, line::lal::Result::state_table, line::lal::AgentRecord::states, line::lal::Composition::synchronize(), line::lal::MamResult::traffic, line::lal::AgentRecord::transitions, line::lal::Result::truncated, line::lal::Traffic::unavailable, and line::lal::Agent::unbounded_queue().

Referenced by line::lal::SolverMAM::runAnalyzer(), and solve_reduced().

◆ structural_support()

◆ transition_label()

std::string line::lal::transition_label ( const std::string & agent,
const Transition & t )
inline

Primary label of a transition (its first label when it carries several).

Definition at line 453 of file core.h.

References line::lal::Transition::action, line::lal::Transition::label, and transition_label().

Referenced by line::lal::Events::Events(), and transition_label().

◆ transition_labels()

std::vector< std::string > line::lal::transition_labels ( const std::string & agent,
const Transition & t )
inline

All labels of a transition: a multi-label transition credits one firing to each.

Definition at line 458 of file core.h.

References line::lal::Transition::action, line::lal::Transition::label, and transition_labels().

Referenced by event_labels(), line::lal::Events::Events(), and transition_labels().

◆ transition_value()

double line::lal::transition_value ( const Transition & t,
const StateView & view )
inline

The value of a transition in a joint state (_value).

Definition at line 463 of file core.h.

References line::lal::Transition::fn, transition_value(), and line::lal::Transition::value.

Referenced by line::lal::Events::outgoing(), and transition_value().

◆ validate_model()

◆ value_error()

InputError line::lal::value_error ( const std::string & what)
inline

LINE:input:Unspecified, the C++ spelling of the Python ValueError raised throughout LAL.

Definition at line 85 of file core.h.

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

Referenced by line::lal::Agent::action(), line::lal::Composition::add(), line::lal::Composition::add(), line::lal::Composition::add(), line::lal::Composition::add(), line::lal::Composition::add(), line::lal::Composition::add_part(), line::lal::Agent::Agent(), line::lal::Model::agent(), line::lal::Model::agent(), line::lal::Agent::array(), build_environment(), build_layered(), line::lal::decl_detail::build_network_impl(), line::lal::EmbeddedNetwork::check_injection(), line::lal::EmbeddedNetwork::class_name(), line::lal::Agent::command(), compare_with_ctmc(), line::lal::Composition::Composition(), line::lal::Compiled::event(), line::lal::Events::Events(), line::lal::Composition::from_file(), line::lal::Composition::from_string(), group_partition(), grouped_solve(), line::lal::StateView::jobs(), line::lal::decl_detail::json_arg(), line::lal::Events::label_index(), line::lal::decl_detail::lookup(), line::lal::decl_detail::lookup(), line::lal::decl_detail::matrix_arg(), line::lal::Composition::model(), line::lal::StateView::node(), line::lal::EmbeddedNetwork::node_jobs(), line::lal::EmbeddedNetwork::node_name(), line::lal::EmbeddedNetwork::node_row(), parallel_qbd(), parse_network(), line::lal::StateTable::probability(), rcat_solve(), line::lal::Agent::record(), line::lal::decl_detail::replacement_by_name(), line::lal::decl_detail::replayer_fit_aph(), line::lal::EmbeddedNetwork::resolve(), line::lal::decl_detail::routing_by_name(), line::lal::QueueTable::row(), line::lal::decl_detail::sched_by_name(), line::lal::Agent::set_initial_distribution(), line::lal::Agent::set_initial_distribution(), line::lal::Composition::setReward(), line::lal::decl_detail::shell_words(), simulate(), line::lal::decl_detail::split_rows(), line::lal::Composition::synchronize(), line::lal::Composition::synchronize(), line::lal::Composition::synchronize_min(), line::lal::ActionTable::throughput(), line::lal::decl_detail::to_count(), line::lal::decl_detail::to_float(), line::lal::decl_detail::to_int(), validate_model(), value_error(), line::lal::StateView::var(), line::lal::decl_detail::vector_arg(), and line::lal::Agent::with_vars().

◆ workflow_agent()

Agent line::lal::workflow_agent ( workflow::Workflow< double > & wf,
const std::string & prefix )
inline

One renewal agent for a Workflow, labelled by activity (_workflow_agent).

The series-parallel tree of the workflow is composed as a labelled automaton with the same operators to_ph() uses (serial, AND-parallel, OR-mixture, geometric loop), so its absorption law is the workflow's phase-type law. The completion of activity A is the event <agent>.A; the completion of the whole workflow also counts as <agent>.complete and restarts it from its initial law. Zero-time activities and skipped loop branches are immediate actions. A workflow that is not series-parallel carries LINE's block-reduction law with the completion as its only event.

Definition at line 1601 of file embed.h.

References line::workflow::SPNode< T >::act, line::workflow::PhLaw< T >::alpha, check_workflow(), line::workflow::SPNode< T >::count, line::lang::Distrib< T >::D0, line::ErrorKind::ErrorKind(), line::lal::embed_detail::Lph::exits, line::lang::GlobalConstants::FineTol, line::workflow::WorkflowActivity< T >::host_demand(), line::workflow::WorkflowActivity< T >::host_demand_mean(), line::lal::embed_detail::identifier_from(), line::lang::IMMEDIATE, line::lal::embed_detail::init_prob(), line::workflow::SPNode< T >::kids, line::lal::embed_detail::LphExit::labels, line::workflow::LEAF, line::lal::embed_detail::Lph::leaf(), line::workflow::LOOP, line::lal::embed_detail::lph_agent(), line::lal::embed_detail::Lph::mixture(), line::workflow::WorkflowActivity< T >::name(), line::workflow::SPTree< T >::nodes, line::workflow::OR, line::workflow::PAR, line::lal::embed_detail::Lph::parallel(), line::workflow::WorkflowActivity< T >::ph_representation(), line::workflow::SPNode< T >::probs, line::workflow::SPTree< T >::root, line::workflow::PhLaw< T >::S, line::workflow::SERIAL, line::lal::embed_detail::Lph::serial(), line::workflow::SPNode< T >::type, line::UnsupportedError::UnsupportedError(), and workflow_agent().

Referenced by line::lal::Composition::add(), and workflow_agent().

Variable Documentation

◆ kDefaultMaxDenseBytes

const std::size_t line::lal::kDefaultMaxDenseBytes = 256u * 1024u * 1024u
static

Default dense-storage budget of the CTMC path: 256 MiB.

Definition at line 114 of file ctmc.h.

Referenced by solve_composition(), and solve_composition().

◆ kMamNoLimit

const double line::lal::kMamNoLimit = std::numeric_limits<double>::infinity()
static

Limit value Python spells 10**100: no limit.

Definition at line 33 of file mam_qbd.h.