lang.lal

lal_native_lang(options, defaults)

TF = LAL_NATIVE_LANG(OPTIONS, DEFAULTS) true when OPTIONS.lang lets a LAL Composition be solved natively.

A LAL composition is solved by the MATLAB LAL runners only; there is no Java, Python or C++ backend for it. Native Python refuses any lang other than its native ‘python’ with LINE:unsupported:Language, and the MATLAB twin of that native lang is ‘matlab’. The solver’s default lang (DEFAULTS.lang) is accepted as well: it follows the session-wide LINE_DEFAULT_LANG of a backend suite run, which the user did not request for this solver, and a composition solved under it is still solved here.

lal_transition(source, action, role, value, target, priority, label)

T = LAL_TRANSITION(SOURCE, ACTION, ROLE, VALUE, TARGET, PRIORITY, LABEL)

One LAL transition record with the field order of lal_empty_transitions. PRIORITY defaults to 0 and LABEL to [] (the default ‘Agent.action’).

lal_tables_lookup(composition, table, varargin)

VALUE = LAL_TABLES_LOOKUP(COMPOSITION, TABLE, ACTION…) throughput of one LAL action

MATLAB port of line_solver.lal.tables.act_value, behind getAvgAct on SolverCTMC, SolverSSA, SolverAG and SolverMAM. TABLE is the solver’s action table (Action, Throughput). The action is named as in lal_resolve_labels: a label (a trailing ‘[*]’ sums the family), an agent action, a node action, or NODE, EVENT[, CLASS], optionally followed by ‘mode’, M for a Petri-net mode. An open class or ‘[*]’ sums every row LABEL[…]. An unknown action raises LINE:input:Argument.

lal_signature_equal(a, b)

TF = LAL_SIGNATURE_EQUAL(A, B) compare two cache keys of a LAL solver run

A and B are the signature structs the LAL solver branches store with their results (a ‘model’ field holding the model record, plus options). As Python’s repr(snapshot), the embedded LINE models compare by identity (the same handle) and everything else by value (lal_model_signature); a Composition.refresh does not by itself invalidate a cached result.

lal_selected(imm, pri)

KEEP = LAL_SELECTED(IMM, PRI) maximal progress and immediate priorities

MATLAB port of line_solver.lal.core.selected. IMM and PRI flag the immediate events among the enabled ones and give their priorities; KEEP is the logical mask of the events that may fire: every event when none is immediate, otherwise the immediate events of the highest priority.

lal_reward_values(snapshot, S, probs)

[NAMES, VALUES] = LAL_REWARD_VALUES(SNAPSHOT, S, PROBS) expectation of each declared reward

MATLAB port of line_solver.lal.ctmc.reward_values. Each reward declared with Composition.setReward (snapshot.rewards) is evaluated on the LALStateView of every joint state (row of S) of nonzero probability and averaged with PROBS. NAMES is a column cellstr, VALUES a column vector.

lal_resolve_labels(composition, args, mode)

[LABEL, FAMILY] = LAL_RESOLVE_LABELS(COMPOSITION, ARGS, MODE) name of a LAL action

MATLAB port of line_solver.lal.tables.resolve_labels. ARGS is a cell naming one action in one of four ways:

{‘Label’} a label exactly as in getActTable (a trailing

‘[*]’ sums an index family, e.g. ‘Queue1.DEP[*]’);

{agent.action(‘x’)} an action of a hand-declared agent (LALActionRef); {comp.action(…)} a node action of an embedded model (LALNodeRef),

whose open class sums the family over classes;

{node, event[, cls]} resolved through COMPOSITION.action, with MODE a

Petri-net mode name ([] for none).

LABEL is the label (or the prefix of the family) and FAMILY is true when the rows LABEL[…] are summed.

lal_object_laws(obj, prefix)

LAWS = LAL_OBJECT_LAWS(OBJ, PREFIX) every distribution an object holds

MATLAB port of line_solver.lal.markov.object_laws. LAWS is an Nx2 cell {path, distribution} collecting every Distribution held in the properties of OBJ (all of them, read through struct(OBJ)), descending into cells, structs, containers.Map values and node sections (Section objects), at most five levels deep. Model objects (nodes, classes, networks, LQN elements) are not descended into: each is walked from its own entry, so that back-references do not loop.

lal_model_signature(model)

[MODEL, PARTS] = LAL_MODEL_SIGNATURE(MODEL) a model record fit for comparison

Python keys a LAL result on repr(snapshot), in which an embedded LINE model appears by identity. Here each embedded model (an EmbeddedNetwork or EmbeddedEnvironment handle) is taken out of the record and returned in the cell PARTS, its place holding only its class, so that the remaining record compares by value and the parts compare by handle identity (lal_signature_equal), never property by property.

lal_model_features(model)

FEATURES = LAL_MODEL_FEATURES(MODEL) features only the extended kernel interprets

MATLAB port of line_solver.lal.core.model_features. FEATURES is a sorted cellstr subset of {‘embedded’, ‘functional’, ‘immediate’, ‘multilabel’}: an embedded LINE model (or a hand passive joining its events), a rate or weight given as a function handle, an immediate action, and a transition crediting one firing to several labels. The legacy timed kernel (lal_event_kernel), NRM, the AG non-CTMC methods, MDD and the MAM recognizers refuse a model with any of them.

lal_markovian_distribution(dist, args, numeric)

D = LAL_MARKOVIAN_DISTRIBUTION(DIST, ARGS, NUMERIC) one Markovian law from a declaration

MATLAB port of line_solver.lal.network.markovian_distribution, shared by the declarative network subset (lal_build_network): ‘exp RATE’, ‘erlang RATE PHASES’, ‘erlang_mean_order MEAN PHASES’, ‘hyperexp P RATE1 RATE2’, ‘ph ALPHA T’, ‘aph ALPHA T’, ‘coxian RATES PROBS’, ‘map D0 D1’, ‘mmpp2 L0 L1 S0 S1’, ‘mmap D0 D1 D11 … D1K’, ‘bmap D0 D1 … DB’, ‘mph ALPHA S EXITS’, ‘immediate now’ and ‘disabled’. Vectors and matrices are written as JSON (‘[[-2,1],[0,-3]]’); EXITS is one row per mark. NUMERIC parses a scalar word (default lal_number). D is [] when DIST/ARGS match no form.

lal_markov_check(dist, where)

KIND = LAL_MARKOV_CHECK(DIST, WHERE) classify one law for LAL

MATLAB port of line_solver.lal.markov.classify / check_markovian. LAL captures the MARKOVIAN models LINE can declare, and nothing else. KIND is ‘timed’ (Exp, Erlang, HyperExp, PH, APH, Coxian, Cox2, MAP, MMPP2, MarkedMAP with its MPH and BMAP subclasses, MarkedMMPP), ‘immediate’ (Immediate) or ‘disabled’ (Disabled). Any other law raises LINE:unsupported:NonMarkovian naming the law and, when given, the place WHERE it was declared.

The accepted set is EXPLICIT and deliberately narrower than ProcessType.isMarkovian, which also admits ME/CME and RAP (matrix-exponential laws with no CTMC representation in general), DMAP and MMDP (discrete time) and the time-inhomogeneous marked schedules; all of them are refused here even though ME, RAP and MMDP subclass Markovian. Classification reads the DECLARED distribution object, never sn.proc, which stores an Erlang fit of Gamma, Weibull, Lognormal, Pareto and Uniform that a matrix-based test would wrongly pass.

Copyright (c) 2012-2026, Imperial College London All rights reserved.

lal_is_hidden(hidden, label)

TF = LAL_IS_HIDDEN(HIDDEN, LABEL) true when Composition.hide removed LABEL

HIDDEN is the cellstr of hidden labels of the model record; an entry ‘X[*]’ hides X and every label X[…].

lal_events(model)

E = LAL_EVENTS(MODEL) event labels and the extended joint-state event kernel

MATLAB port of line_solver.lal.core.events / event_labels. Returns a struct with fields

E.labels 1xL event labels: hand active/immediate labels (a

transition’s ‘label’, else ‘Agent.action’; for a minimum synchronization only its first active endpoint names the event), then the node keys of every embedded LINE model and the node keys hand agents inject into it

E.names 1xA part names; E.nstates the number of local states of

each hand agent (0 for an embedded model)

E.isEmbedded 1xA logical; E.nameIndex containers.Map name -> column E.outgoing @(s) -> [T, LC, R, IMM, PRI]: from the joint state s (row

of 1-based local state indices, or global state indices of the embedded models) the enabled events, one per row: target states T, label index vectors LC (a cell, one firing may carry several labels), rates R (weights when immediate), immediate flags IMM and priorities PRI

Semantics, as in the Python reference: a synchronized active (or immediate) transition is blocked when any passive partner has no matching transition; passive weights are normalized within each partner’s current state; a hand action synchronized with a node ARV key injects an arrival of an open class (resolved by the node’s own state handler) and also carries that node key; hand passives joined to a node key (ext_syncs) join every event of the embedded model that carries a matching key and block it while disabled. Timed actions of one agent obey their priorities: a timed action is disabled while one of the same agent with a higher priority is enabled. Maximal progress among immediate events is applied by the caller (lal_selected). Rates and weights may be function handles of the joint-state view (LALStateView).

Copyright (c) 2012-2026, Imperial College London All rights reserved.

lal_embed_part(model, prefix, cutoff)

PART = LAL_EMBED_PART(MODEL, PREFIX, CUTOFF) turn a LINE model object into a LAL part

MATLAB port of line_solver.lal.embed.embed_part. PART is an Agent or an embedded model:

Network EmbeddedNetwork, one agent per node; Environment EmbeddedEnvironment, a stage agent plus its stage models; LayeredNetwork EmbeddedNetwork of LINE’s own LQN2QN translation; MarkovProcess one Agent with a timed action T_i_j per generator entry,

labelled ‘<agent>.T[i->j]’ (states named by the rows of its state space when given), starting uniformly;

MarkovChain one DISCRETE-time Agent: transition probabilities are

per-step weights, self-steps included; a DTMC with matrix P has the stationary law of the CTMC with generator P - I, so throughputs read as per-step frequencies;

Workflow one renewal Agent labelled by activity through the

series-parallel tree (Workflow.getSPTree), composed with the operators toPH uses (serial, AND-parallel, OR-mixture, geometric loop); the completion of activity A is the event ‘<agent>.A’ and the completion of the whole workflow ‘<agent>.complete’; zero-time activities and skipped loop branches are immediate actions. A workflow that is not series-parallel carries LINE’s block-reduced law with the completion as its only event.

PREFIX names the part (default: the model name when it is an identifier); CUTOFF bounds open classes and applies to Network, Environment and LayeredNetwork only. Every law must be Markovian (LINE:unsupported:NonMarkovian).

lal_coverage_table()

T = LAL_COVERAGE_TABLE() coverage matrix of LAL against the features LINE declares

MATLAB port of line_solver.lal.coverage.coverage_table. LAL captures ALL and ONLY the Markovian models LINE declares; this table is the checked-in record of that claim, one row per feature, so that a feature LINE gains and LAL does not cover shows up as a missing row rather than as a silent gap. Columns:

Family, Feature what LINE declares; Status ‘accepted’, ‘refused’ (outside the Markovian scope, with

LINE:unsupported:NonMarkovian or the named error) or ‘gap’ (Markovian, but not yet expressible);

Hand expressible by hand-declared agents; Embedded expressible by embedding the LINE object; Solvers LAL solver paths that interpret it; Reason the refusal or gap reason.

Copyright (c) 2012-2026, Imperial College London All rights reserved.

lal_complement(events, allrates, vanish, initDist)

[TANGIBLE, INITIAL, Q, EVENTS, P0, NV] = LAL_COMPLEMENT(EVENTS, ALLRATES, VANISH, INITDIST)

Eliminate the vanishing states of a labelled LAL chain by stochastic complementation (MATLAB port of line_solver.lal.core._complement). EVENTS is the 1xE cell of SxS label rate matrices, ALLRATES the SxS sum of the arc rates (immediate arcs carry their weights), VANISH the Sx1 logical mask of the vanishing states and INITDIST the 1xS initial distribution. With T the tangible and V the vanishing states, N = (-Q_VV)^-1 and Q the off-diagonal arc rates, the generator over T is Q_TT + Q_TV N Q_VT and the matrix of label a is

R_TT + R_TV N Q_VT + Q_TV N R_VT + Q_TV N R_VV N Q_VT,

so a firing inside a vanishing excursion is credited to the tangible state the excursion starts from and the one it ends in. The initial law is carried through the vanishing states the same way. Returns the 1-based TANGIBLE state indices, the INITIAL tangible index, the generator Q, the complemented EVENTS, the initial law P0 over T and the number NV of eliminated states. Refuses (LINE:unsupported:Model) a chain whose every state is vanishing, and immediate actions forming a cycle that never returns to a tangible state.

lal_check_network(network, where)

LAL_CHECK_NETWORK(NETWORK, WHERE) refuse a Network holding a non-Markovian specification

MATLAB port of line_solver.lal.markov.check_network. Walks every node and job class (lal_object_laws), so that service, arrival, setup, delay-off, patience, retrial, switchover, breakdown, heterogeneous-server and Petri-net mode laws are all covered without naming each property, and classifies each law with lal_markov_check. A Cache draws its item popularity, and a Fork its tasks per link, from discrete laws that are not holding times, so those are skipped there (a Replayer is still refused). Batch arrivals (a discrete batch-size law) and fluid Petri-net places are refused as well. Errors are LINE:unsupported:NonMarkovian.

lal_check_layered(lqn)

LAL_CHECK_LAYERED(LQN) refuse a LayeredNetwork with a non-Markovian demand, think time or arrival

MATLAB port of line_solver.lal.markov.check_layered: every host, task, entry and activity of LQN is walked (lal_object_laws) and each law it holds is classified with lal_markov_check (LINE:unsupported:NonMarkovian). An ItemEntry’s discrete popularity law is exempt, as a Cache’s is in lal_check_network; a Replayer is still refused.

lal_check_environment(env)

LAL_CHECK_ENVIRONMENT(ENV) refuse an Environment with a non-Markovian holding law or stage model

MATLAB port of line_solver.lal.markov.check_environment: every stage transition law of ENV and every stage model (lal_check_network) must be Markovian (LINE:unsupported:NonMarkovian).

lal_agent_state_rows(snapshot, S, probs)

[AGENTCOL, STATECOL, PROBCOL] = LAL_AGENT_STATE_ROWS(SNAPSHOT, S, PROBS)

Marginal state probabilities of every agent (MATLAB port of line_solver.lal.ctmc.agent_state_rows). S holds one joint state per row (1-based local indices; global state indices for an embedded model) and PROBS their probabilities. A hand agent contributes one row per state. An embedded LINE model contributes one agent per stateful node, whose state is the node’s row of LINE’s state space (‘[v1 v2 …]’), plus, for an embedded Environment, the stage agent ‘Env’; their names carry the embedding prefix.

lal_agent_record(name, states, initial, transitions, initialDistribution, unbounded, unboundedInitial, queueInfo, embedded, discrete, vars)
REC = LAL_AGENT_RECORD(NAME, STATES, INITIAL, TRANSITIONS, INITIALDISTRIBUTION,

UNBOUNDED, UNBOUNDEDINITIAL, QUEUEINFO, EMBEDDED, DISCRETE, VARS)

The immutable agent record read by the LAL compiler and solvers (MATLAB twin of line_solver.lal.core.Agent). Every record is built here so that struct arrays of records always share the same field order. Fields:

name, states (1xn cellstr), initial (char), transitions (see lal_empty_transitions), initial_distribution ([] or 1xn), unbounded_queue, unbounded_initial, queue_info ([] or struct), embedded ([] or an EmbeddedNetwork / EmbeddedEnvironment handle, whose states are global state indices), discrete (a discrete-time agent, an embedded MarkovChain) and vars ([] for named states, or a struct with fields names (1xv cellstr) and values (n x v cell, one row per state) for a typed-variable agent).

class LALStateView

LALSTATEVIEW Read-only view of a joint LAL state, for functional rates and rewards

MATLAB twin of line_solver.lal.core.StateView. A functional rate or weight (a function handle given to Agent.active/passive/immediate or Agent.command) and a reward declared with Composition.setReward receive one of these views:

view.get(AGENT) or view(AGENT) local state of AGENT: its state name

(char), a struct of its variables for a typed-variable agent, or the global state index of an embedded LINE model

view.has(AGENT) true when AGENT is a part of the view view.node(PART, NODE) state row of a stateful node of an

embedded LINE model, as in LINE’s state space

view.jobs(PART, NODE[, CLASS]) jobs at that node: total, or of one

class (object or name)

Copyright (c) 2012-2026, Imperial College London All rights reserved.

Constructor Summary
LALStateView(index, state, model)
Method Summary
get(name)

V = GET(AGENT) local state of an agent

has(name)

TF = HAS(AGENT)

jobs(agent, node, jobclass)

N = JOBS(PART, NODE[, CLASS]) jobs at a node of an embedded LINE model

node(agent, node)

ROW = NODE(PART, NODE) state row of a node of an embedded LINE model

subsref(s)

VIEW(AGENT) is VIEW.GET(AGENT)

class LALRecords

LALRECORDS Private record constructors of LAL agents (not part of the public API)

MATLAB twin of line_solver.lal._records._Records. LAL agents are declared action by action, or obtained by embedding LINE model objects (Composition.add). These constructors build the same finite agents for LAL’s own internal use: SolverMAM’s lowering of embedded Queue and Source nodes into the level and source agents its recognizers read (lal_mam_lower), and the synthetic marked stream its traffic fitting substitutes for a source (lal_traffic_solve_reduced). They were public Agent static methods (Agent.queue, mmap, phService, bufferedJoin, bufferedMapJoin, bufferedMmapJoin, fromMarkedMap, fromMap, fromNetworkProcess, fromGenerator) until 2026-11-15; internal regression tests of features with no LINE counterpart (unbounded queue records, buffered joins) still call them.

Name-value keys accept both camelCase and snake_case spellings (‘serviceRate’ or ‘service_rate’). Phase and state INDICES given to these constructors (‘initial’ of mmap/fromGenerator, station/jobclass of fromNetworkProcess) are 1-based.

Copyright (c) 2012-2026, Imperial College London All rights reserved.

Method Summary
static bufferedJoin(name, varargin)

AGENT = BUFFEREDJOIN(NAME, ‘leftRate’, L, ‘rightRate’, R, ‘capacity’, K, ‘output’, ‘complete’)

static bufferedMapJoin(name, left, right, varargin)

AGENT = BUFFEREDMAPJOIN(NAME, {D0,D1}, {D0,D1}, ‘capacity’, K, ‘output’, ‘complete’)

static bufferedMmapJoin(name, left, right, varargin)

AGENT = BUFFEREDMMAPJOIN(NAME, LEFT, RIGHT, ‘capacity’, K, ‘labels’, L) LEFT/RIGHT use the M3A layout {D0, D1, D1_1, …}.

static fromGenerator(name, generator, varargin)

AGENT = FROMGENERATOR(NAME, Q, ‘events’, E, ‘initial’, I) E is a struct or Nx2 cell label -> nonnegative rate matrix; unlabelled off-diagonal rates become ‘_internal’.

static fromMap(name, process, varargin)

AGENT = FROMMAP(NAME, MAP, [ACTION], ‘initial’, I) (MAP or MMPP2)

static fromMarkedMap(name, process, labels, varargin)

AGENT = FROMMARKEDMAP(NAME, MARKEDMAP, LABELS, ‘initial’, I)

static fromNetworkProcess(name, sn, station, jobclass, varargin)

AGENT = FROMNETWORKPROCESS(NAME, SN, IST, R, ‘labels’, L, ‘initial’, I) IST and R are 1-based station and class indices of SN.

static mmap(name, D0, marks, varargin)

AGENT = MMAP(NAME, D0, MARKS, ‘initial’, I)

MARKS is a struct or an Nx2 cell {label, matrix}. ‘initial’ is a 1-based phase index (default 1) or a probability vector. Each off-diagonal D0 entry becomes an active ‘_phase’ transition.

static phService(name, alpha, T, varargin)

AGENT = PHSERVICE(NAME, ALPHA, T, ‘completion’, ‘complete’) ‘completion’ is an action name or a struct/Nx2 cell of routing probabilities.

static queue(name, varargin)

AGENT = QUEUE(NAME, ‘capacity’, C, ‘serviceRate’, MU, ‘arrivals’, A, …)

Single-class queue with states n_0..n_C. capacity = [] or Inf or ‘unbounded’ is unbounded (Python capacity=None). Optional keys: ‘departures’ (struct or Nx2 cell label->probability, default {‘departure’,1}), ‘servers’ (1), ‘initial’ (0 jobs), ‘serviceInput’/’serviceInputs’ and ‘servicePhase’ for an external passive service clock, which requires ‘serviceRate’ = [].

class LALNodeRef

LALNODEREF An action of a node of an embedded LINE model

Returned by Composition.action(node, event, jobclass); the MATLAB twin of line_solver.lal.builder.NodeRef. KEY is the LALNodeEvent (node, EventType, class | mode) and PART the name of the embedded part that owns the node. Used as an endpoint of Composition.synchronize and to name an action in getAvgAct / getActAvg / hide.

Copyright (c) 2012-2026, Imperial College London All rights reserved.

Constructor Summary
LALNodeRef(part, key)
Property Summary
key
part
Method Summary
label()

S = LABEL() the table label of the node action

class LALNodeEvent

LALNODEEVENT Key of a node action of an embedded LINE model

MATLAB twin of line_solver.lal.embed.NodeEvent: the triple a LINE synchronization record carries, (node, EventType, class | mode), plus the embedding prefix MODEL (’’ when none was given). INDEX is a class name, a Petri-net mode name, or ‘’ for an event with no class (an open class index matches every class, see MATCHES). Keys are rendered for the action tables as ‘Node.EVENT[index]’, prefixed by ‘model.’ when the model was embedded with a prefix.

Copyright (c) 2012-2026, Imperial College London All rights reserved.

Constructor Summary
LALNodeEvent(model, node, event, index)

SELF = LALNODEEVENT(MODEL, NODE, EVENT, INDEX)

Property Summary
event

EventType id (numeric)

index

class or mode name, ‘’ for none

model

embedding prefix

node

node name

Method Summary
char()
label()

S = LABEL() table label ‘model.Node.EVENT[index]’

matches(pattern)

TF = MATCHES(PATTERN) true when this key is PATTERN, or PATTERN leaves the class/mode index open

class EmbeddedNetwork

Bases: handle

EMBEDDEDNETWORK A LINE Network embedded in a LAL composition, one agent per node

MATLAB port of line_solver.lal.embed.EmbeddedNetwork. The joint behaviour of the nodes is not re-derived: SolverCTMC’s own state-space preparation and sync-action generator run on the network, and their per-event arcs are collected after the vanishing-row purge, before any solve (options.lal_collect in solver_ctmc). The embedded agents therefore reproduce LINE’s generator exactly, including vanishing states, true BAS blocking, Petri-net mode firings (sn.gsync) and fork firings (sn.fjsync).

Node actions use LINE’s own event vocabulary: a key is the triple a synchronization record carries, (node, EventType, class | mode) (LALNodeEvent), rendered ‘Node.EVENT[index]’. Each event of the network carries the keys of ALL its participants, so a departure is reported at its source node and the arrival it causes at its destination as two rows of the same rate. A DEP->ARV event is split over the routing paths it takes through non-stateful nodes (sn.rtnodes), each sub-event carrying the ARV/DEP keys of the nodes it crosses; a path through a Sink ends there (the Source ARV that closes it in sn.rt is LINE’s bookkeeping for the job leaving, so its key is dropped), and a cycle among non-stateful nodes is refused.

The record seen by the LAL core holds the network’s GLOBAL states (row indices of LINE’s enumerated space); node agents are projections of it, used for the state table, the state views and injection. The enumeration is lazy: it is built on first use and rebuilt after invalidate() (Composition.refresh) or a change of the injected classes. An injected class whose Source arrival is Disabled is enumerated with a placeholder Exp(1) arrival, temporarily set on the network and restored afterwards, and the placeholder’s own emissions are dropped: the hand agent drives those arrivals.

Copyright (c) 2012-2026, Imperial College London All rights reserved.

Constructor Summary
EmbeddedNetwork(network, prefix, cutoff)

SELF = EMBEDDEDNETWORK(NETWORK, PREFIX, CUTOFF)

Property Summary
cutoff

SolverCTMC cutoff of the open classes ([] = SolverCTMC default)

name

the prefix, else the network name

Type:

part name

network

the LINE Network

prefix

embedding prefix (’’ when none was given)

Method Summary
checkInjection(key)

CHECKINJECTION(KEY) refuse an injection a hand agent cannot drive

getHashed()

H = GETHASHED() hashed state space (global state x stateful node)

getInitial()

S = GETINITIAL() global index of the initial state

getKeys()

K = GETKEYS() the LALNodeEvent of each label, aligned with GETLABELS

getLabels()

L = GETLABELS() the node-event labels of the network’s events

getNumberOfStates()
getStruct()

SN = GETSTRUCT() the struct of the enumerated network

hasVanishing()
inject(s, key)

[NS, P] = INJECT(S, KEY) passive response of a node to an injected arrival in global state S. An empty result blocks the injection (no successor within LINE’s enumerated space, e.g. at the cutoff).

invalidate()

INVALIDATE() drop the enumeration; it is rebuilt on next use

isVanishing(s)
lookupGlobal(row)

Y = LOOKUPGLOBAL(ROW) global state of a hashed row, [] when none

nodeRow(s, node)

[SN, IND, ROW] = NODEROW(S, NODE) state row of a stateful node in global state S

nodeStateLabel(s, isf)

LABEL = NODESTATELABEL(S, ISF) ‘[v1 v2 …]’ of a node’s state row

nodeStates()

LIST = NODESTATES() Nx2 cell {node name, isf} of the stateful node agents

outgoing(s)

[NS, LID, RATE, IMM] = OUTGOING(S) arcs leaving global state S: targets, local label indices (cell), rates and immediate flags

resolve(node, event, jobclass, mode)

KEY = RESOLVE(NODE, EVENT, JOBCLASS, MODE) the key of a node action, validating names against the network

setInjected(classes)

SETINJECTED(CLASSES) record the classes hand agents inject (names); a change invalidates the enumeration

vanishingStates()

V = VANISHINGSTATES() logical mask over the global states

class EmbeddedEnvironment

Bases: handle

EMBEDDEDENVIRONMENT A LINE Environment embedded as a stage agent plus its stage models

MATLAB port of line_solver.lal.embed.EmbeddedEnvironment. The joint state is (clock, x): CLOCK is the stage together with the phases of its running stage clocks, X a global state of that stage’s network. In stage e the network evolves with stage e’s own arcs (the EmbeddedNetwork of that stage, so the semantics is SolverCTMC’s); a stage clock ringing moves to the destination stage, starts its clocks afresh, and carries the network state across under the arc’s reset policy:

‘keep’ every node’s state row is matched in the destination

stage’s space;

queue reset a resetFun q -> f(q) other than the identity moves to the

destination state with queue lengths f(q), keeping the service phases where such a state exists;

state reset a resetStateFun other than the identity gives the entry

law of the exit state as the image of its unit vector (over the tangible states, as SolverENV’s statevec analyzer reads them).

Competing arcs (addTransition) are racing phase-type clocks; kernel arcs (addKernelTransition) draw the destination on entry and then run that arc’s sojourn clock. Stage changes carry the key Env.STAGE[from->to], with 0-based stage numbers as in the Python reference. Injection into an embedded Environment is refused.

Copyright (c) 2012-2026, Imperial College London All rights reserved.

Constructor Summary
EmbeddedEnvironment(env, prefix, cutoff)

SELF = EMBEDDEDENVIRONMENT(ENV, PREFIX, CUTOFF)

Property Summary
cutoff
env

the LINE Environment

name
prefix

embedding prefix (the environment name when none was given)

Method Summary
checkInjection(~, ~)
getInitial()
getKeys()
getLabels()
hasVanishing()
invalidate()

INVALIDATE() drop the stage models and the enumeration

isVanishing(s)
nodeRow(s, node)
nodeStateLabel(s, isf)
nodeStates()
outgoing(s)

[NS, LID, RATE, IMM] = OUTGOING(S) arcs leaving the joint state S

resolve(node, event, jobclass, mode)

KEY = RESOLVE(NODE, EVENT, JOBCLASS, MODE) the key of a node action of the stage models, or of a stage change (EventType.STAGE, JOBCLASS then names the change ‘e->h’)

stageNames()

NAMES = STAGENAMES() the name of each stage model

stageOf(s)

E = STAGEOF(S) the stage (1-based) of the joint state S

lal_build_environment(text, base)

ENV = LAL_BUILD_ENVIRONMENT(TEXT, BASE) build a random Environment over a LAL network

MATLAB port of line_solver.lal.environment.build_environment. BASE is the text of a ‘network’ declaration (see lal_build_network); TEXT starts with ‘environment NAME’ followed by

stage NAME CATEGORY NODE CLASS RATE (a fresh copy of BASE with the

service of CLASS at NODE set to Exp(RATE))

switch FROM TO RATE (exponential stage transition)

Errors are LINE:input:Model prefixed with the offending line number.

Copyright (c) 2012-2026, Imperial College London All rights reserved.

lal_build_layered(text)

MODEL = LAL_BUILD_LAYERED(TEXT) build a LayeredNetwork from LAL declarations

MATLAB port of line_solver.lal.layered.build_layered. The first declaration is ‘layered NAME’; the others are

processor NAME MULTIPLICITY SCHED task NAME MULTIPLICITY SCHED PROCESSOR (MULTIPLICITY may be inf) think TASK MEAN entry NAME TASK activity NAME TASK MEAN bind ACTIVITY ENTRY | call ACTIVITY ENTRY MEANCALLS | reply ACTIVITY ENTRY

with exponential think and host demands given by their means. Words follow lal_shlex, so names may be quoted. Errors are LINE:input:Model prefixed with the offending line number.

Copyright (c) 2012-2026, Imperial College London All rights reserved.

lal_build_network(spec, parameters)

MODEL = LAL_BUILD_NETWORK(SPEC, PARAMETERS) build a LINE Network from a parsed spec

MATLAB port of line_solver.lal.network.build_network. SPEC comes from lal_parse_network (a text is also accepted and parsed first). PARAMETERS is an optional struct overriding ‘param NAME VALUE’ declarations; naming a parameter the file does not declare is an error. Declarations:

param NAME VALUE node NAME source|sink|delay|router|transition node NAME queue SCHED [SERVERS] | place [SCHED] | cache NITEMS CAP REPL class NAME open | class NAME closed POPULATION REFNODE arrival|service NODE CLASS LAW, LAW one of the Markovian forms of

lal_markovian_distribution (exp, erlang, erlang_mean_order, hyperexp, ph, aph, coxian, map, mmpp2, mmap, bmap, mph, immediate now, disabled; matrices as JSON), or replayer PATH | replayer_aph PATH | prior_gaussian LO HI COUNT MEAN SD, of which replayer and prior_gaussian are refused as non-Markovian once the network is built

route CLASS1 CLASS2 NODE1 NODE2 PROB (PROB may be a parameter or 1-param) link NODE1 NODE2 | dispatch NODE CLASS STRATEGY | region NODE CAP CLASSCAP completes CLASS true|false cache_read_zipf NODE CLASS S N | cache_read_discrete NODE CLASS W1 W2 … cache_hit|cache_miss NODE CLASS OUTCLASS | cache_retrieval NODE CLASS MISSCLASS QUEUE mode NODE NAME immediate | mode NODE NAME LAW (a Markovian form, as above) enable|inhibit|fire NODE MODE CLASS PLACE VALUE | weight NODE MODE W state NODE V1 [V2 …]

SCHED, STRATEGY and REPL name members of SchedStrategy, RoutingStrategy and ReplacementStrategy. route and link cannot be mixed. Errors are LINE:input:Model prefixed with the offending line number. The built network must be Markovian (lal_check_network), otherwise LINE:unsupported:NonMarkovian names the offending law.

Copyright (c) 2012-2026, Imperial College London All rights reserved.

lal_parse_network(text)

SPEC = LAL_PARSE_NETWORK(TEXT) parse the declarative queueing-network subset of LAL

MATLAB port of line_solver.lal.network.parse_network. Each line is one declaration; names are identifiers and strings can be quoted (see lal_shlex). The first declaration must be ‘network NAME’. SPEC has fields name and declarations (struct array with fields line and words), and is turned into a Network by lal_build_network. No code is evaluated.

Copyright (c) 2012-2026, Imperial College London All rights reserved.

lal_trace_path(name)

P = LAL_TRACE_PATH(NAME) resolve a replayer trace path

As given when it exists, else relative to the LINE repository root, since the tutorial files name traces relative to the root.

lal_number(token, integer)

V = LAL_NUMBER(TOKEN, INTEGER) parse a numeric declaration word

Mirrors Python float(token) and, when INTEGER is true, int(token): the integer form accepts only an optionally signed run of digits.

lal_constant(className, name)

VALUE = LAL_CONSTANT(CLASSNAME, NAME) constant property NAME of CLASSNAME

Looks NAME up among the Constant properties of a LINE constant class (SchedStrategy, RoutingStrategy, ReplacementStrategy, TimingStrategy), the MATLAB counterpart of Python getattr(SchedStrategy, name), without eval.

lal_decl_rows(text)

ROWS = LAL_DECL_ROWS(TEXT) non-empty declaration lines of TEXT

ROWS is a struct array with fields line (1-based line number) and words (cellstr from lal_shlex). Shared by lal_parse_network, lal_build_layered and lal_build_environment.

class Composition

Bases: handle

COMPOSITION A collection of Markovian LAL parts with atomic synchronizations

MATLAB port of line_solver.lal.builder.Composition. A part is either a hand-declared Agent or an embedded LINE model (Network, Environment, LayeredNetwork, MarkovProcess, MarkovChain or Workflow), which contributes one agent per node, with node actions keyed by LINE’s EventType (LALNodeEvent). Parts are mixed freely. Agent changes are reflected on the next call to getStruct; no derived matrices are cached. SolverCTMC and SolverSSA interpret every construct; SolverAG and SolverMAM accept the timed hand-declared subset, and SolverMAM also lowers an embedded open queueing network.

Python -> MATLAB names:

Composition(*parts) Composition(p1, p2, …) or Composition({p1, p2}) Composition(name, *parts) Composition(‘name’, p1, …) add(model, prefix=, cutoff=) add(model, ‘prefix’, P, ‘cutoff’, C) action(node, event, cls, action(node, event, cls, ‘mode’, M, ‘part’, P)

mode=, part=)

synchronize(active, *passive) synchronize(activeRef, passiveRef1, …) synchronize_min(*a, passives) synchronizeMin(ref1, ref2, …, ‘passives’, {refs}) hide(*actions) hide(action1, …) (a cell {node, event, cls} names a node action) setReward(name, fn) setReward(name, fn) (fn of an LALStateView) refresh() refresh() _model() getModel() get_struct() getStruct() from_string / from_file Composition.fromString / Composition.fromFile

Synchronization forms:

synchronize(agent.action(a), other.action(p), …) hand agents; synchronize(agent.action(a), comp.action(node, EventType.ARV, cls))

the hand action injects an arrival of an open class at the node;

synchronize(comp.action(node, event, cls), agent.action(p), …)

the hand passives join every network event carrying that node key, and block it while they are disabled.

Copyright (c) 2012-2026, Imperial College London All rights reserved.

Constructor Summary
Composition(varargin)

COMPOSITION(P1, P2, …) or COMPOSITION({P1, P2, …}) COMPOSITION(NAME, P1, …) names the composition (default ‘LAL’). Each part is an Agent or a LINE model to embed (see ADD).

Property Summary
agents

1xA cell of hand-declared Agent handles

embedded

1xE cell of EmbeddedNetwork / EmbeddedEnvironment handles

ext_syncs

part (char), key (LALNodeEvent pattern), passives (cellstr)

Type:

struct array

hidden

cellstr of hidden labels (‘X[*]’ hides a family)

min_syncs

active (cellstr), passives (cellstr)

Type:

struct array

network

LINE Network owning the composition name

rewards

name, fn

Type:

struct array

source_event_order
source_state_space

Carried for SolverAG and SolverMAM provenance (empty otherwise)

source_sync
source_truncated
syncs

active (‘A.x’), passives (cellstr ‘B.y’), nodes (cell of struct part/key)

Type:

struct array

Method Summary
action(node, event, varargin)

REF = ACTION(NODE, EVENT, JOBCLASS, ‘mode’, M, ‘part’, P)

Reference to a node action of an embedded LINE model. NODE is the LINE node object or its name, EVENT an EventType member (EventType.ARV, DEP, PHASE, READ, ENABLE, FIRE, PRE, POST, RENEGE, RETRY, SWITCH, FAILURE, REPAIR, STAGE) or its name, JOBCLASS a class object or name, and M a Petri-net mode name for ENABLE/FIRE. Leaving the class out matches every class. P names the embedded part when there are several.

add(model, varargin)

ADD(MODEL, ‘prefix’, P, ‘cutoff’, C) add a part to the composition

MODEL is a Network, MarkovProcess, MarkovChain, Workflow, Environment or LayeredNetwork (each node of a network becomes an agent of the composition, its actions named by action(node, EventType.X, jobclass)), a LAL Agent, or another Composition (nested: its parts and synchronizations are merged). PREFIX names the embedded part (required when two parts would share node names); CUTOFF bounds open classes as in SolverCTMC. The model must be Markovian (LINE:unsupported:NonMarkovian).

static fromFile(path)

COMP = FROMFILE(PATH) load a LAL declaration from a UTF-8 text file

static fromString(source)

COMP = FROMSTRING(SOURCE) parse a LAL declaration into a Composition

getAgent(name)

A = GETAGENT(NAME) the hand-declared agent of the given name

getModel(syncs, extSyncs)

MODEL = GETMODEL() the model record

Fields: agents (struct array of records, see lal_agent_record: the hand agents, then one record per embedded part), syncs, min_syncs, ext_syncs, hidden and rewards. Embedded parts are told which classes hand agents inject before their records are taken.

getStruct(varargin)

C = GETSTRUCT() finite CTMC states, generator and labelled event matrices

Optional name-value pairs are those of lal_compile_model (‘reachableOnly’, ‘maxStates’, ‘maxDenseBytes’).

hide(varargin)

HIDE(ACTION1, …) make actions internal: they still occur, but leave the action tables. Each action is named as in getAvgAct (a label, an agent action, a node action, or a cell {node, event[, class]}); an open class hides the whole family.

refresh()

REFRESH() re-read every embedded LINE model after it was changed

setReward(name, fn)

SETREWARD(NAME, FN) declare a state reward FN(view), read back with solver.getAvgReward(). VIEW is an LALStateView: view(agent) is an agent’s local state, view.node(part, node) the state row of a node of an embedded LINE model.

synchronize(active, varargin)

SYNCHRONIZE(ACTIVEREF, PASSIVEREF1, PASSIVEREF2, …)

ACTIVEREF is an agent action (LALActionRef) or a node action (LALNodeRef); see the class help for the three forms.

synchronizeMin(varargin)

SYNCHRONIZEMIN(REF1, REF2, …, ‘passives’, {PREF1, …})

Synchronize active actions at the minimum enabled total rate. Each participant’s enabled transition is sampled proportionally to its local rate or passive weight. All updates occur atomically; any disabled participant blocks the event. The first active action names the event.

lal_shlex(line)

WORDS = LAL_SHLEX(LINE) split one declaration line into words

MATLAB port of Python shlex.split(line, comments=True) in POSIX mode, as used by the network, layered and environment declarations: whitespace separates words, ‘#’ outside a word starts a comment, single quotes are literal, double quotes allow backslash escapes of ‘”’ and ‘', and a backslash outside quotes escapes the next character. An unclosed quotation raises LINE:input:Model.

lal_result_tables(snapshot, compiled, probs, method)

RESULT = LAL_RESULT_TABLES(SNAPSHOT, COMPILED, PROBS, METHOD)

Marginal state and action tables of a joint distribution PROBS over the joint states COMPILED.stateIndex. RESULT has fields states, probabilities, stateTable (Agent, State, Probability; embedded LINE models contribute one agent per stateful node, see lal_agent_state_rows), actionTable (Action, Throughput; labels hidden with Composition.hide are left out), rewards (struct with fields names and values, see lal_reward_values), discrete (true when the composition is a discrete-time MarkovChain part, whose throughputs are per-step frequencies) and method; both tables carry the provenance struct in Properties.UserData (method, exact, truncated, fallback_reason, and time = ‘discrete’ when discrete).

lal_parse(source)

MODEL = LAL_PARSE(SOURCE) parse LAL text into a model record

MATLAB port of line_solver.lal.core.Parser/parse. Grammar (see the Python README): ‘param N = v;’, ‘agent A { state s0, s1; initial s0; s0: (a, rate=r) -> s1; … }’, with transitions ‘(a, rate = r)’, ‘(a, passive[, weight = w])’ and ‘(a, immediate[, weight = w][, priority = p])’, and an initial state or an initial distribution ‘initial [p0, p1, …];’ over the declared states, and ‘system { synchronize A.a -> B.b, C.c; synchronize_min A.a, B.b -> C.c; }’. The ‘queue { … }’ and ‘mmap phases { … }’ blocks were removed on 2026-11-15: LAL agents are declared action by action, or obtained by embedding LINE models (Composition.add). Errors are LINE:input:Model with the Python ValueError message.

lal_pyfloat(tok)

[OK, V] = LAL_PYFLOAT(TOK) parse TOK as Python float() would

Accepts decimal literals and inf/infinity/nan with an optional sign, and nothing else (str2double would also accept e.g. ‘i’ as a complex number).

lal_compile_model(model, varargin)

C = LAL_COMPILE_MODEL(MODEL, ‘reachable_only’, B, ‘max_states’, N, ‘max_dense_bytes’, M)

MATLAB port of line_solver.lal.core.compile_model: the labelled finite CTMC of a LAL model record. Returns

C.agentNames 1xA cellstr C.states SxA cellstr of local state names (joint states;

an embedded LINE model shows its global state index)

C.stateIndex SxA local state indices (global state indices for

an embedded model), 1-based

C.initial 1-based index of the first initial joint state C.initialDistribution 1xS initial distribution (product of agents’) C.generator SxS generator, self-events excluded C.eventLabels 1xE labels, C.events 1xE cell of SxS rate matrices

(self-events included)

C.vanishingEliminated number of vanishing states eliminated

Matrices contain nonnegative event rates. Vanishing states (an immediate event enabled, or a vanishing state of an embedded LINE model) are eliminated by stochastic complementation (lal_complement): the generator and the label matrices are returned over the tangible states, each label matrix crediting the firings made inside vanishing excursions to the tangible state the excursion started from and the one it ends in. Without reachable_only the joint space is the full Cartesian product with the last agent varying fastest; an embedded model forces reachable_only. A resource limit raises LINE:unsupported:StateSpace with the Python StateSpaceLimitError message.

lal_event_kernel(model)

K = LAL_EVENT_KERNEL(MODEL) event labels and joint-state transition function

MATLAB port of line_solver.lal.core.event_kernel: the legacy interface of the timed finite kernel, built on the extended kernel lal_events. Returns a struct with

K.labels event labels in order of first appearance (a transition’s

label, else ‘Agent.action’; for a minimum synchronization only its first active endpoint names the event)

K.names agent names, K.nstates number of local states per agent K.outgoing @(s, include) -> [T, L, R]: from the joint state s (row of

1-based local state indices) the target states T (one row per move), the label indices L into K.labels and the rates R. INCLUDE is [] or a logical mask over K.labels restricting the events enumerated.

Models with immediate actions, embedded LINE models or multi-label transitions need the extended interface (lal_events) and are refused (LINE:unsupported:Model), so that a solver path built on this kernel cannot silently misread them.

lal_cartesian(sizes)

IDX = LAL_CARTESIAN(SIZES) all index tuples, last position fastest

Row order matches Python itertools.product. Any zero size gives no rows.

lal_endpoint_agents(endpoints)

OWNERS = LAL_ENDPOINT_AGENTS(ENDPOINTS) agent names of ‘Agent.action’ keys

lal_validate_model(model, allowUnbounded)

LAL_VALIDATE_MODEL(MODEL, ALLOWUNBOUNDED) validate a LAL model record

MATLAB port of line_solver.lal.core.validate_model. MODEL is the record returned by Composition.getModel or lal_parse:

model.agents struct array of records (lal_agent_record); a record

with a non-empty EMBEDDED field is an embedded LINE model

model.syncs struct array: active (‘A.x’), passives (cellstr of hand

endpoints) and nodes (cell of struct part/key: injected node arrivals)

model.min_syncs struct array: active (cellstr, >= 2) and passives model.ext_syncs struct array (optional): part, key (LALNodeEvent

pattern) and passives (cellstr of hand endpoints)

An unbounded queue raises LINE:unsupported:Model unless ALLOWUNBOUNDED. A passive endpoint may appear in several synchronizations; an active one in only one.

lal_named_list(x, msg)

[LABELS, VALUES] = LAL_NAMED_LIST(X, MSG) ordered name -> value pairs

Accepts a struct (field order), an Nx2 cell {name, value} or a containers.Map (key order). This is the MATLAB stand-in for the ordered Python dicts of the LAL builder (departures, marks, events). MSG is the error raised for any other input.

lal_empty_transitions()

T = LAL_EMPTY_TRANSITIONS() empty LAL transition struct array

Fields: source, action, role (‘active’, ‘passive’ or ‘immediate’), value (rate or weight: a number, or a function handle of the joint-state view LALStateView), target, priority (immediate actions, and timed actions of one agent: higher fires first) and label ([] for the default ‘Agent.action’, a char alias, or a cellstr crediting one firing to several labels). Build entries with lal_transition so that the field order always matches.

lal_getfield(s, f, default)

V = LAL_GETFIELD(S, F, DEFAULT) field F of S, or DEFAULT when absent

lal_isint(x)

TF = LAL_ISINT(X) true for a finite integer-valued real numeric scalar

MATLAB has no separate integer literal, so an integer-valued double is accepted where Python requires an int (and rejects 2.0 or True).

lal_identifier(value, kind)

VALUE = LAL_IDENTIFIER(VALUE, KIND) validate a LAL identifier

Identifiers match [A-Za-z_][A-Za-z_0-9]*, as in the Python LAL builder.

class Agent

Bases: handle

AGENT Markovian LAL agent with active, weighted passive and immediate transitions

MATLAB port of the native Python line_solver.lal.builder.Agent (LINE Agent Language). An agent is declared in one of two ways:

  • by NAMED STATES: Agent(name, ‘states’, S, ‘initial’, s0), with transitions added by active / passive / immediate;

  • by TYPED VARIABLES: Agent(name, ‘vars’, V, ‘initial’, v0), with guarded commands added by command; the local state is then the valuation of the variables, enumerated from the initial valuation.

An ACTIVE transition carries a rate; a PASSIVE transition carries a positive weight and fires only when an active partner it is synchronized with fires (Composition.synchronize); an IMMEDIATE transition fires in zero time with maximal progress: in a state where any immediate event is enabled, only those of the highest priority fire, chosen in proportion to their weights, and the vanishing states this creates are eliminated by the solvers. A rate or weight may be a function handle of the joint-state view (LALStateView), a FUNCTIONAL rate. Embedded LINE models (Composition.add) are parts of their own.

Name mapping to Python (line_solver.lal.builder):

Agent(name,’states’,S,’initial’,s0) Agent(name, states=S, initial=s0) Agent(name,’vars’,V,’initial’,v0) Agent(name, vars=V, initial=v0) a.active(src,act,’rate’,r,’target’,t, a.active(src, act, rate=r, target=t,

‘label’,l,’priority’,p) label=l, priority=p)

a.passive(src,act,’target’,t,’weight’,w) a.passive(src, act, target=t, weight=w) a.immediate(src,act,’target’,t,’weight’,w, a.immediate(src, act, target=t, weight=w,

‘priority’,p,’label’,l) priority=p, label=l)

a.command(act,’role’,r,’rate’,x,’weight’,w, a.command(act, role=r, rate=x, weight=w,

‘guard’,g,’update’,u,…) guard=g, update=u, …)

a.setInitialDistribution(p) a.set_initial_distribution(p) Agent.array(proto, n) Agent.array(proto, n) a.action(name) a.action(name) a.record() a._record()

Typed variables: V is a struct (field order) or an Nx2 cell {name, domain}, each domain a numeric/logical vector or a cell of distinct values; v0 is a struct giving every variable a value. A command’s guard(v) and update(v) take the struct of the agent’s variables, update returning a struct of the variables it changes; a command is disabled where its guard is false or its update leaves a domain. Its rate or weight is a number, a function handle f(v) of the local variables, or f(v, view) that also reads other agents. The state of a typed agent is named ‘x=1,y=0’.

The record constructors once exposed as Agent.queue, mmap, phService, bufferedJoin, … are private since 2026-11-15 (LALRecords): agents are declared action by action or obtained by embedding LINE models.

Copyright (c) 2012-2026, Imperial College London All rights reserved.

Constructor Summary
Agent(name, varargin)

AGENT(NAME, ‘states’, S, ‘initial’, S0) AGENT(NAME, ‘vars’, V, ‘initial’, V0)

Property Summary
initial
name
states
Method Summary
action(name)

REF = ACTION(NAME) reference to an action of this agent

active(source, action, varargin)

ACTIVE(SOURCE, ACTION, ‘rate’, R, ‘target’, T, ‘label’, L, ‘priority’, P)

A timed action at rate R (a number, or a function handle of the joint-state view). PRIORITY orders the timed actions of this agent: an action is disabled while one of the same agent with a higher priority is enabled. LABEL renames the event in the action tables (default ‘Agent.action’).

static array(prototype, n)

COPIES = ARRAY(PROTOTYPE, N) N copies of PROTOTYPE named <name>_0 … <name>_{N-1}; a transition or command label L becomes L[i] in copy i.

command(action, varargin)

COMMAND(ACTION, ‘role’, R, ‘rate’, X, ‘weight’, W, ‘guard’, G, ‘update’, U, ‘priority’, P, ‘label’, L)

A guarded command of a typed-variable agent. ROLE is ‘active’ (default, needs RATE), ‘passive’ or ‘immediate’ (WEIGHT, default 1). GUARD(v) and UPDATE(v) take the struct of the agent’s variables; UPDATE returns the struct of the variables it changes.

getInitialDistribution()
getTransitions()

T = GETTRANSITIONS() struct array (see lal_empty_transitions)

immediate(source, action, varargin)

IMMEDIATE(SOURCE, ACTION, ‘target’, T, ‘weight’, W, ‘priority’, P, ‘label’, L)

A zero-time action. Immediate actions have maximal progress: in a state where any is enabled, only those of the highest PRIORITY fire, chosen in proportion to WEIGHT (default 1), and timed actions wait. The vanishing states this creates are eliminated by the solvers.

passive(source, action, varargin)

PASSIVE(SOURCE, ACTION, ‘target’, T, ‘weight’, W) (W defaults to 1)

record()

REC = RECORD() immutable record used by the compiler and solvers

See lal_agent_record for the fields. A typed-variable agent is expanded here: its reachable valuations become its states and its commands become transitions.

setInitialDistribution(distribution)

SETINITIALDISTRIBUTION(P) start from a law over the states: a struct or containers.Map state -> probability, or a vector in state order.

lal_nv(args, allowed, required)

OPTS = LAL_NV(ARGS, ALLOWED, REQUIRED) parse LAL name-value arguments

Keys are matched case-insensitively with underscores removed, so ‘serviceRate’, ‘service_rate’ and ‘servicerate’ are the same key. ALLOWED and REQUIRED list canonical keys (lower case, no underscores). A single struct argument is accepted in place of name-value pairs.

class LALActionRef

LALACTIONREF A named action belonging to a particular Agent instance

Returned by Agent.action(name); the MATLAB twin of the Python line_solver.lal.builder.ActionRef. Used as an endpoint of Composition.synchronize and Composition.synchronizeMin.

Copyright (c) 2012-2026, Imperial College London All rights reserved.

Constructor Summary
LALActionRef(agent, name)
Property Summary
agent
name
Method Summary
endpoint()

KEY = ENDPOINT() endpoint key ‘Agent.action’