lang

class Environment

Bases: Ensemble

An environment model defined by a collection of network sub-models coupled with an environment transition rule that selects the active sub-model.

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

Constructor Summary
Environment(name, num_stages)

SELF = ENVIRONMENT(NAME, NUM_STAGES) NAME - Name of the environment NUM_STAGES - (Optional) Expected number of stages. If provided, used for validation only.

Stages can still be added/removed dynamically.

Property Summary
env
envGraph
holdTime

holding times

nodeFailures

cell array of node breakdown/repair descriptors recorded by addNodeBreakdown/addNodeRepair

num_stages

Expected number of stages (optional, for API consistency)

probEnv

steady-stage probability of the environment

probOrig

probability that a request originated from phase

proc

Markovian representation of each stage transition

resetEnvRatesFun

function implementing the reset policy for environment rates

resetFun

function implementing the reset policy for queue lengths

resetStateFun

function implementing the reset policy for the full state-probability vector (SolverENV statevec analyzer)

Method Summary
addNodeBreakdown(baseModel, nodeOrName, breakdownDist, downServiceDist, varargin)

SELF = ADDNODEBREAKDOWN(BASEMODEL, NODEORNAME, BREAKDOWNDIST, DOWNSERVICEDIST, RESETFUN) Adds UP and DOWN stages for a node that can break down and repair

Parameters:
  • baseModel - The base network model with normal (UP)

  • nodeOrName - Node object or name of the node that can break down

  • breakdownDist - Distribution for time until breakdown (UP->DOWN transition)

  • downServiceDist - Service distribution when the node is down

  • resetFun - (Optional) – Either a function handle @(q) -> q, or one of the named policies ‘keep’ (identity) and ‘clear’ (empty the queues). Default: ‘keep’. Only named policies are serializable.

Example

model = Network(‘MyNetwork’); queue = Queue(model, ‘Server1’, SchedStrategy.FCFS); class = ClosedClass(model, ‘Jobs’, 10, queue, 0); queue.setService(class, Exp(2)); % UP service rate

env = Environment(‘ServerEnv’); env.addNodeBreakdown(model, ‘Server1’, Exp(0.1), Exp(0.5)); % Or using node object: env.addNodeBreakdown(model, queue, Exp(0.1), Exp(0.5));

addNodeFailureRepair(baseModel, nodeOrName, breakdownDist, repairDist, downServiceDist, varargin)

SELF = ADDNODEFAILUREREPAIR(BASEMODEL, NODEORNAME, BREAKDOWNDIST, REPAIRDIST, DOWNSERVICEDIST, RESETBREAKDOWN, RESETREPAIR) Convenience method to add both breakdown and repair for a node

Parameters:
  • baseModel - The base network model with normal (UP)

  • nodeOrName - Node object or name of the node that can break down and repair

  • breakdownDist - Distribution for time until breakdown

  • repairDist - Distribution for repair time

  • downServiceDist - Service distribution when the node is down

  • resetBreakdown - (Optional)

  • resetRepair - (Optional)

Example

env = Environment(‘ServerEnv’); env.addNodeFailureRepair(model, ‘Server1’, Exp(0.1), Exp(1.0), Exp(0.5)); % Or using node object: env.addNodeFailureRepair(model, queue, Exp(0.1), Exp(1.0), Exp(0.5));

addNodeRepair(nodeOrName, repairDist, varargin)

SELF = ADDNODEREPAIR(NODEORNAME, REPAIRDIST, RESETFUN) Adds repair transition from DOWN to UP stage for a previously added breakdown

Parameters:
  • nodeOrName - Node object or name of the node that can be repaired

  • repairDist - Distribution for repair time (DOWN->UP transition)

  • resetFun - (Optional) – Either a function handle @(q) -> q, or one of the named policies ‘keep’ (identity) and ‘clear’ (empty the queues). Default: ‘keep’. Only named policies are serializable.

Example

env.addNodeRepair(‘Server1’, Exp(1.0)); % Or using node object: env.addNodeRepair(queue, Exp(1.0));

addStage(name, type, model)
addTransition(fromName, toName, distrib, resetFun, resetEnvRatesFun, resetStateFun)
findMethod(metric, showAll)

T = FINDMETHOD(METRIC, SHOWALL) Alias of FINDSOLVER; see Environment.findSolver.

findNodeFailure(nodeName)

IDX = FINDNODEFAILURE(NODENAME) Index of the node-failure descriptor for NODENAME, or 0 if absent.

findSolver(metric, showAll)

T = FINDSOLVER(METRIC, SHOWALL)

Which solvers and solver methods can analyze this random environment.

model.findSolver() every runnable (solver, method) pair model.findSolver(‘’, true) also the refused pairs, and why

One row per pair, with columns Solver, Method, Runnable, Class, Metrics and Reason; Method is the method name to pass as a solver method. FINDMETHOD and HELP are aliases.

The only family FAMILYACCEPTSMODELCLASS admits for an Environment is ‘env’, whose inner models are solved by the family its method name names (‘env.fluid’) or by LINE per submodel.

See also SolverAUTO.findSolver()

getEnv()
getRelT()

GETRELT Short alias for getReliabilityTable

getRelTable()

GETRELTABLE Short alias for getReliabilityTable

getReliabilityTable()

RT = GETRELIABILITYTABLE() Compute system-wide reliability metrics (MTTF, MTTR, MTBF, Availability)

Returns:

RT - Table with columns – Metric, Value, Unit, Description

Example

env = Environment(‘ServerEnv’); env.addNodeFailureRepair(model, ‘Server’, Exp(0.1), Exp(1.0), Exp(0.5)); env.init(); reliabilityTable = env.getReliabilityTable();

getStageT()

GETSTAGET Short alias for getStageTable

getStageTable()
help(metric, showAll)

T = HELP(METRIC, SHOWALL) Alias of FINDSOLVER; see Environment.findSolver. It shadows the builtin HELP for Environment objects, deliberately; the class documentation is still reached by name as help Environment.

init()
printStageTable()

PRINTSTAGETABLE Print a formatted table showing all stages, their properties, and transitions

Displays stage names, types, associated networks, and transition rates.

Example

env = Environment(‘MyEnv’); env.addStage(‘UP’, ‘operational’, model1); env.addStage(‘DOWN’, ‘failed’, model2); env.addTransition(‘UP’, ‘DOWN’, Exp(0.1)); env.printStageTable();

registerNodeFailure(nodeName, breakdownDist, repairDist, downServiceDist, breakdownPolicy, repairPolicy)

SELF = REGISTERNODEFAILURE(NODENAME, BREAKDOWNDIST, REPAIRDIST, DOWNSERVICEDIST, BREAKDOWNPOLICY, REPAIRPOLICY) Attach a node breakdown/repair descriptor to stages that already exist.

This is the counterpart of addNodeBreakdown/addNodeRepair for the case where the UP and DOWN_<node> stages and their transitions have already been built (for instance by linemodel_load reading the expanded stages/transitions form). It records the descriptor and applies the queue-length reset policies, which the expanded form cannot carry.

relT()

RELT Short alias for getReliabilityTable

relTable()

RELTABLE Short alias for getReliabilityTable

static resolveResetPolicy(spec)

[RESETFUN, RESETNAME] = RESOLVERESETPOLICY(SPEC) Resolve a queue-length reset policy given either a named policy or a function handle.

Named policies (the only serializable ones):

‘keep’ - carry the queue lengths across the transition, @(q) q ‘clear’ - empty the queues on the transition, @(q) 0*q

A function handle is returned unchanged and reported as ‘custom’: an arbitrary reset function cannot be reproduced from JSON.

setBreakdownResetPolicy(nodeOrName, resetFun)

SELF = SETBREAKDOWNRESETPOLICY(NODEORNAME, RESETFUN) Update the reset policy for breakdown transitions (UP -> DOWN) of a node

Parameters:
  • nodeOrName - Node object or name of the node

  • resetFun - Reset policy for queue lengths on breakdown. Either a – function handle, or one of the named policies ‘keep’ (identity) and ‘clear’ (empty the queues). Only named policies are serializable. Example: @(q) 0*q to clear queues, @(q) q to keep jobs

Example

env.setBreakdownResetPolicy(‘Server1’, @(q) 0*q); % Or using node object: env.setBreakdownResetPolicy(queue, ‘clear’);

setEnv(env)
setRepairResetPolicy(nodeOrName, resetFun)

SELF = SETREPAIRRESETPOLICY(NODEORNAME, RESETFUN) Update the reset policy for repair transitions (DOWN -> UP) of a node

Parameters:
  • nodeOrName - Node object or name of the node

  • resetFun - Reset policy for queue lengths on repair. Either a – function handle, or one of the named policies ‘keep’ (identity) and ‘clear’ (empty the queues). Only named policies are serializable. Example: @(q) q to keep jobs, @(q) 0*q to clear queues

Example

env.setRepairResetPolicy(‘Server1’, @(q) q); % Or using node object: env.setRepairResetPolicy(queue, ‘keep’);

setStageName(stageId, name)
setStageType(stageId, stageCategory)
class GlobalConstants

GlobalConstants System-wide constants and configuration parameters

GlobalConstants provides centralized access to global constants, tolerances, and configuration parameters used throughout the LINE framework. It manages numerical tolerances, verbosity levels, version information, and other system-wide settings through static methods and global variables.

@brief Centralized global constants and configuration management

Key characteristics: - Centralized constant management - Numerical tolerance configuration - System-wide parameter access - Version and build information - Debugging and verbosity controls

Global constants include: - Numerical tolerances (FineTol, CoarseTol) - Special values (Zero, MaxInt, Immediate) - System configuration (Verbose, DummyMode) - Version information and build details - Output stream redirection (StdOut)

GlobalConstants is used for: - Consistent numerical precision across LINE - Global configuration management - Debugging and verbosity control - Version compatibility checking - System-wide parameter standardization

Example: @code if abs(value) < GlobalConstants.FineTol()

% Handle near-zero values

end if GlobalConstants.Verbose() > 1

fprintf(‘Debug informationn’);

end @endcode

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

Method Summary
static ArcTol()

Magnitude above which an off-diagonal generator entry counts as an arc. Sign is NOT a criterion: an ME generator embeds genuinely negative off-diagonal entries – see _kb/11-conventions-and-gotchas.md

static CoarseTol()
static CubMaxEvals()

integrand-evaluation budget above which pfqn_nc prefers le over cub

static DummyMode()
static FineTol()
static Immediate()
static MaxInt()
static StdOut()
static Verbose()
static Version()
static Zero()
static getVerbose()
static isLibraryAttributionShown()
static isToolAckShown(name)

Per-tool registry of the wrapper-solver acknowledgements already printed in this session. Distinct from the single LINELibraryAttributionShown flag, which covers the native solvers collectively: each external tool must be acknowledged on its own.

static pushVerbose(val)

GUARD = PUSHVERBOSE(VAL) sets the verbosity for a bounded scope Sets the global verbosity to VAL and returns an onCleanup handle that restores the previous level when it goes out of scope. The caller MUST keep the handle alive for as long as VAL should hold: dropping the output restores immediately. Use this rather than setVerbose whenever the new level belongs to a nested activity (e.g. an ensemble stage solved at verbose=0), which must not silence its caller after it returns.

static setChecks(val)
static setCoarseTol(val)
static setDummyMode(val)
static setFineTol(val)
static setImmediate(val)
static setLibraryAttributionShown(val)
static setMaxInt(val)
static setStdOut(val)
static setToolAckShown(name)
static setVerbose(val)
static setVersion(val)
static setZero(val)
class OpenSignal

Bases: OpenClass

OpenSignal Signal class for open queueing networks

OpenSignal is a specialized OpenClass for modeling signals in open queueing networks. Unlike regular customers, signals can have special effects on queues they visit, such as removing jobs (negative signals) or unblocking servers (reply signals).

For closed networks, use ClosedSignal instead.

Signal types: - SignalType.NEGATIVE: Removes a job from the destination queue - SignalType.REPLY: Unblocks servers waiting for a reply

Example: @code model = Network(‘OpenModel’); source = Source(model, ‘Source’); sink = Sink(model, ‘Sink’); queue = Queue(model, ‘Queue’, SchedStrategy.FCFS); reqClass = OpenClass(model, ‘Request’); replySignal = OpenSignal(model, ‘Reply’, SignalType.REPLY).forJobClass(reqClass); @endcode

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

Constructor Summary
OpenSignal(model, name, signalType, prio)

OPENSIGNAL Create an open signal class instance

@param model Network model to add the signal class to @param name String identifier for the signal class @param signalType SignalType constant (default: SignalType.NEGATIVE) @param prio Optional priority level (default: 0) @return self OpenSignal instance

Property Summary
removalDistribution

DiscreteDistribution for number of removals (empty = remove exactly 1)

removalPolicy

RemovalPolicy constant (RANDOM, FCFS, LCFS)

signalType

SignalType constant (NEGATIVE, REPLY)

targetJobClass

JobClass that this signal is associated with

Method Summary
forJobClass(jobClass)

FORJOBCLASS Associate this signal with a job class

For REPLY signals, this specifies which job class’s servers will be unblocked when this signal arrives.

@param jobClass The JobClass to associate with this signal @return self The modified Signal instance (for chaining)

getRemovalDistribution()

GETREMOVALDISTRIBUTION Get the removal distribution

getRemovalPolicy()

GETREMOVALPOLICY Get the removal policy

getSignalType()

GETSIGNALTYPE Get the signal type

getTargetJobClass()

GETTARGETJOBCLASS Get the associated job class

getTargetJobClassIndex()

GETTARGETJOBCLASSINDEX Get the index of the associated job class

isCatastrophe()

ISCATASTROPHE Check if this is a catastrophe signal

@return b true if signalType is SignalType.CATASTROPHE

setRemovalDistribution(dist)

SETREMOVALDISTRIBUTION Set the removal distribution

setRemovalPolicy(policy)

SETREMOVALPOLICY Set the removal policy

class JNetwork

Bases: Model

JLINE extended queueing network model.

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

Constructor Summary
JNetwork(name)

SELF = NETWORK(MODELNAME)

Property Summary
obj

java object

Method Summary

ADDLINK(NODESLIST)

ADDLINKS(NODESLIST)

static cyclic(N, D, strategy, S)
static cyclicFcfs(varargin)
static cyclicFcfsInf(varargin)
static cyclicPs(varargin)
static cyclicPsInf(varargin)
getChecks()

BOOL = GETCHECKS() True if model validation is enabled on this model.

getClassByIndex(idx)

CLASS = GETCLASSBYINDEX(IDX)

getClassByName(name)

CLASS = GETCLASSBYNAME(NAME)

getClassIndex(name)

CLASSINDEX = GETCLASSINDEX(NAME)

getClassNames()

CLASSNAMES = GETCLASSNAMES()

getClassSwitchingMask()

MASK = GETCLASSSWITCHINGMASK()

getClasses()

CLASSES = GETCLASSES()

getConnectionMatrix()

CONNECTIONS = GETCONNECTIONMATRIX()

getDemands()

[D,Z] = GETDEMANDS()

getIndexClosedClasses()

INDEX = GETINDEXCLOSEDCLASSES()

getIndexOpenClasses()

INDEX = GETINDEXOPENCLASSES()

getIndexSinkNode()

INDEX = GETINDEXSINKNODE() Note: Java object does not support this method directly

getIndexSourceNode()

INDEX = GETINDEXSOURCENODE() Note: Java object does not support this method directly

getIndexSourceStation()

INDEX = GETINDEXSOURCESTATION() Note: Java object does not support this method directly

getIndexStatefulNodes()

LIST = GETINDEXSTATEFULNODES()

getLinkedRoutingMatrix()

P = GETLINKEDROUTINGMATRIX()

getNodeByIndex(idx)

NODE = GETNODEBYINDEX(IDX)

getNodeByName(name)

NODE = GETNODEBYNAME(NAME)

getNodeIndex(name)
getNodeNames()

NODENAMES = GETNODENAMES()

getNodeTypes()

NODETYPES = GETNODETYPES()

getNodes()

NODES = GETNODES()

getNumberOfChains()

C = GETNUMBEROFCHAINS()

getNumberOfClasses()

R = GETNUMBEROFCLASSES()

getNumberOfJobs()

N = GETNUMBEROFJOBS()

getNumberOfNodes()

I = GETNUMBEROFNODES()

getNumberOfStatefulNodes()

S = GETNUMBEROFSTATEFULNODES() Note: Java object does not support this method directly

getNumberOfStations()

M = GETNUMBEROFSTATIONS()

getProductFormParameters()

[LAMBDA,D,N,Z,MU,S] = GETPRODUCTFORMPARAMETERS()

getRoutingMatrix(arvRates)

[RT,RTNODES,CONNECTIONS,CHAINS,RTNODEBYCLASS,RTNODEBYSTATION] = GETROUTINGMATRIX(ARVRATES) Note: Java object does not support this method directly

getSink()

NODE = GETSINK()

getSize()

[M,R] = GETSIZE()

getSource()

NODE = GETSOURCE()

getStationByIndex(idx)

STATION = GETSTATIONBYINDEX(IDX)

getStationByName(name)

STATION = GETSTATIONBYNAME(NAME)

getStationIndex(name)

STATIONINDEX = GETSTATIONINDEX(NAME)

getStationIndexes()

LIST = GETSTATIONINDEXES()

getStationNames()

STATIONNAMES = GETSTATIONNAMES() Note: Java object does not support getStationNames method directly

getStruct(wantInitialState)

get abritrary representation

getUsedLangFeatures()

USED = GETUSEDLANGFEATURES()

hasClassSwitching()

BOOL = HASCLASSSWITCHING()

hasClosedClasses()

BOOL = HASCLOSEDCLASSES()

hasFork()

to be changed

hasJoin()

BOOL = HASJOIN()

hasOpenClasses()

BOOL = HASOPENCLASSES()

hasProductFormSolution()

BOOL = HASPRODUCTFORMSOLUTION()

initRoutingMatrix()
isJavaNative()

BOOL = ISJAVANATIVE()

Returns true for Java (JNetwork) implementation

isMatlabNative()

BOOL = ISMATLABNATIVE()

Returns false for Java (JNetwork) implementation

jsimgView()
jsimwView()

JSIMWVIEW()

modelView()

MODELVIEW() Open the model in ModelVisualizer

plot()

PLOT() - Display network as TikZ diagram in PDF viewer Requires pdflatex to be installed on the system

printRoutingMatrix(onlyclass)

PRINTROUTINGMATRIX(ONLYCLASS)

reset()
saveAsJMVA(filename)

SAVEASJMVA(FILENAME) Note: Java object does not support direct JMVA export

saveAsJSIM(filename)

SAVEASJSIM(FILENAME) Note: Java object does not support direct JSIM export

static serialRouting(varargin)
setChecks(bool)
summary()

SUMMARY()

static tandem(lambda, D, strategy, S)
static tandemFcfs(varargin)
static tandemFcfsInf(varargin)
static tandemPs(lambda, D, S)
static tandemPsInf(varargin)
view()

VIEW() Open the model in JSIMgraph

class RewardDescriptor

REWARDDESCRIPTOR Callable reward function carrying its own metadata

A RewardDescriptor wraps a reward function handle together with a structural description of what the reward measures. It is CALLABLE exactly like the bare function handle it replaces, so that

fn = Reward.queueLength(queue1); value = fn(state);

keeps working unchanged, while additionally exposing

fn.kind - ‘QLen’ | ‘Util’ | ‘Blocking’ | ‘Custom’ fn.node - Node object the reward refers to ([] if none) fn.jobclass - JobClass object the reward refers to ([] if none) fn.fn - the underlying function handle

The metadata is what allows setReward/linemodel_save to serialize the reward declaratively. A descriptor of kind ‘Custom’ wraps an arbitrary user function and is deliberately NOT serializable: the writer warns and omits it rather than emitting a reward it cannot reproduce.

See also: Reward, setReward, RewardState

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

Constructor Summary
RewardDescriptor(kind, node, jobclass, fn)

SELF = REWARDDESCRIPTOR(KIND, NODE, JOBCLASS, FN)

Property Summary
fn

function_handle actually evaluated

jobclass

JobClass object, or [] when the reward is not class-scoped

kind

‘QLen’ | ‘Util’ | ‘Blocking’ | ‘Custom’

Type:

char

node

Node object, or [] when the reward is not node-scoped

Method Summary
numArgumentsFromSubscript(s, indexingContext)

#ok<INUSD> NUMARGUMENTSFROMSUBSCRIPT A reward always produces exactly one value

subsref(s)

SUBSREF Make the descriptor callable as fn(state[, sn])

class Region

Bases: handle

A finite capacity region

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

Constructor Summary
Region(nodes, classes)
Property Summary
UNBOUNDED
classMaxJobs
classMaxMemory
classSize
classWeight
classes
constraintA

Linear constraint matrix A (C x K), An <= b

constraintB

Linear constraint vector b (C x 1)

dropRule
globalMaxJobs
globalMaxMemory
name
nodes
Method Summary
getDropRule(class)

STRATEGY = GETDROPRULE(CLASS) Get the drop strategy for a class.

getLinearConstraints()

[A, B] = GETLINEARCONSTRAINTS() — Linear admission constraint pair (A,b) with matrix A (C x K) and capacity vector b (C x 1), or empties if not set.

getName()
hasLinearConstraints()

TF = HASLINEARCONSTRAINTS() Returns true if linear constraints have been set.

setClassMaxJobs(class, njobs)
setClassMaxMemory(class, memlim)
setClassSize(class, size)
setClassWeight(class, weight)
setConstraint(A, b)

SELF = SETCONSTRAINT(A, B) — Alias of setLinearConstraints matching the JAR jline.lang.Region API.

setDropRule(class, dropStrategy)

SELF = SETDROPRULE(CLASS, DROPSTRATEGY) Set the drop rule for a class. dropStrategy can be:

  • A boolean: true = DROP, false = WAITQ (for backwards compatibility)

  • A DropStrategy enum value: DROP, WAITQ, BAS, BBS, RSRD

setGlobalMaxJobs(njobs)
setGlobalMaxMemory(memlim)
setLinearConstraints(A, b)

SELF = SETLINEARCONSTRAINTS(A, B) Set general linear admission constraints An <= b.

A: Constraint matrix (C x K) where C is the number of

constraints and K is the number of classes.

b: Capacity vector (C x 1) or (1 x C).

setName(name)
class NetworkElement

Bases: Element

A generic element of a Network model.

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

Constructor Summary
NetworkElement(name)

SELF = NETWORKELEMENT(NAME)

class Model

Bases: Copyable

Abstract parent class for all models in the LINE framework

This class provides the basic structure and common functionality for all LINE model types. It maintains model metadata such as name, version, and attributes.

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

Constructor Summary
Model(name)

Constructor: Creates a new Model instance

Input:

name - String name for the model

Output:

self - Model instance

This constructor ensures LINE is properly initialized, sets the model name, and records the LINE version.

Property Summary
name

Name of the model

Method Summary
getName()

Get the model name

Output:

out - String name of the model

getVersion()

Get the LINE version used to create this model

Output:

v - String version of LINE

setName(name)

Set the model name

Input:

name - String name for the model

Output:

self - Updated Model instance

setVersion(version)

Set the LINE version for this model

Input:

version - String version of LINE

Output:

self - Updated Model instance

class Mode

Bases: NetworkElement

An abstract class for a firing mode

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

Property Summary
index
transition
Method Summary
subsindex()

IND = SUBSINDEX()

class ItemEntry

Bases: Entry

Constructor Summary
ItemEntry(model, name, cardinality, distribution)

SELF = LAYEREDNETWORKELEMENT(NAME)

Property Summary
cardinality
popularity
Method Summary
on(parent)

SELF = ON(SELF, PARENT)

class Event

A generic event occurring in a Network.

Object of the Event class are not passed by handle.

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

Constructor Summary
Event(event, node, class, prob, state, t, job)

SELF = EVENT(EVENT, NODE, CLASS, PROB, STATE, TIMESTAMP, JOB)

Property Summary
class
event
job

job id (optional)

node
prob
state

state information when the event occurs (optional)

t

timestamp when the event occurs (optional)

Method Summary
print()

PRINT()

class Env

Bases: Environment

ENV is a deprecated alias for Environment.

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

Constructor Summary
Env(varargin)

SELF = ENV(VARARGIN)

class Element

Bases: Copyable

Abstract class for generic elements of a model.

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

Constructor Summary
Element(name)

SELF = ELEMENT(NAME)

Property Summary
name
obj
Method Summary
getName()

OUT = GETNAME()

setName(name)

SELF = SETNAME(NAME)

class DisabledClass

Bases: JobClass

A class of jobs that is permanently disabled.

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

Constructor Summary
DisabledClass(model, name, refstat)

SELF = DISABLEDCLASS(MODEL, NAME, REFSTAT)

Method Summary
setReferenceStation(class, source)

SETREFERENCESTATION(CLASS, SOURCE)

class Chain

Bases: NetworkElement

A service chain

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

Constructor Summary
Chain(name)

SELF = CHAIN(NAME)

Property Summary
classes
classnames
completes
index

index within model

njobs
visits
Method Summary
addClass(class, v, index)

SELF = ADDCLASS(CLASS, V, INDEX)

getClass(className)

IDX = GETCLASS(CLASSNAME)

hasClass(className)

BOOL = HASCLASS(CLASSNAME)

setName(name)

SELF = SETNAME(NAME)

setVisits(class, v)

SELF = SETVISITS(CLASS, V)

NetworkStruct()

Data structure representation for a Network object

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

class Ensemble

Bases: Model

A model defined by a collection of sub-models.

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

Constructor Summary
Ensemble(models)

SELF = ENSEMBLE(MODELS)

Property Summary
ensemble
Method Summary
getEnsemble()

ENSEMBLE = GETENSEMBLE()

getModel(modelIdx)
static merge(ensemble)

MERGE Create a union Network from all Networks in an ensemble

UNIONNETWORK = MERGE(ENSEMBLE) returns a single Network containing all nodes and classes from each Network in the ensemble as disconnected subnetworks. Node and class names are prefixed with their originating model name to avoid collisions.

Input:

ensemble - Ensemble object or cell array of Network objects

Output:

unionNetwork - Network object containing merged subnetworks

setEnsemble(ensemble)

SELF = SETENSEMBLE(SELF,ENSEMBLE)

static toNetwork(ensemble)

TONETWORK Alias for merge

UNIONNETWORK = TONETWORK(ENSEMBLE) - see MERGE

class Reward

REWARD Factory class for common reward function templates

This class provides static methods for creating common reward functions. Used with model.setReward() to define metrics on queueing networks.

Static Methods:

queueLength(node, [jobclass]) - Queue length reward utilization(node, [jobclass]) - Server utilization reward blocking(node) - Blocking probability reward custom(fn) - Wrap a custom function

Usage:

model.setReward(‘QLen_Q1’, Reward.queueLength(queue1)); model.setReward(‘Util_Q1’, Reward.utilization(queue1)); model.setReward(‘Block_Q1’, Reward.blocking(queue1)); model.setReward(‘Cost’, Reward.custom(@(state) state.at(q1).total()^2));

See also: RewardState, RewardStateView, setReward

Method Summary
static blocking(node)

BLOCKING Blocking probability reward function

FN = BLOCKING(NODE) returns 1 if NODE is at capacity, 0 otherwise

This is useful for measuring congestion or capacity violations.

Example

model.setReward(‘Block’, Reward.blocking(queue1));

static custom(userFn)

CUSTOM Wrap a custom reward function

FN = CUSTOM(USERFN) wraps USERFN as a custom reward descriptor

The returned value is callable exactly like USERFN. It is marked as kind ‘Custom’, which is deliberately NOT serializable: an arbitrary user function cannot be reproduced from JSON, so linemodel_save warns and omits it rather than emitting a wrong reward.

Example

myReward = @(state) state.at(q1).total()^2 + state.at(q2).total(); model.setReward(‘Custom’, Reward.custom(myReward));

static queueLength(node, varargin)

QUEUELENGTH Queue length reward function

FN = QUEUELENGTH(NODE) returns function for total jobs at NODE FN = QUEUELENGTH(NODE, JOBCLASS) returns function for JOBCLASS jobs

The returned function is suitable for use with model.setReward()

Examples

% Total jobs at queue1 model.setReward(‘QLen’, Reward.queueLength(queue1));

% Class1 jobs at queue1 model.setReward(‘QLen_C1’, Reward.queueLength(queue1, class1));

static utilization(node, varargin)

UTILIZATION Server utilization reward function

FN = UTILIZATION(NODE) returns function for utilization at NODE FN = UTILIZATION(NODE, JOBCLASS) returns function for class utilization

Utilization is computed as min(jobs, nservers), representing the fraction of servers in use.

Note: For M/M/1 queues, this simplifies to min(jobs, 1)

Examples

model.setReward(‘Util’, Reward.utilization(queue1)); model.setReward(‘Util_C1’, Reward.utilization(queue1, class1));

class FiniteCapacityRegion

Bases: handle

A finite capacity region

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

Constructor Summary
FiniteCapacityRegion(nodes, classes)
Property Summary
UNBOUNDED
classMaxJobs
classMaxMemory
classSize
classWeight
classes
constraintA

Linear constraint matrix (C_f x K) or empty

constraintB

Linear constraint capacity (C_f x 1) or empty

dropRule
globalMaxJobs
globalMaxMemory
name
nodes
Method Summary
getDropRule(class)

STRATEGY = GETDROPRULE(CLASS) Get the drop strategy for a class.

getLinearConstraints()

[A, B] = GETLINEARCONSTRAINTS() — Linear admission constraint pair (A,b), or empties if not set.

getName()
hasLinearConstraints()
setClassMaxJobs(class, njobs)
setClassMaxMemory(class, memlim)
setClassSize(class, size)
setClassWeight(class, weight)
setConstraint(A, b)

SETCONSTRAINT(A, B) — Set the linear constraint A * x <= B where x is the per-class job count vector. A must be (C x K), B must be (C x 1) for some number of constraints C.

setDropRule(class, dropStrategy)

SELF = SETDROPRULE(CLASS, DROPSTRATEGY) Set the drop rule for a class. dropStrategy can be:

  • A boolean: true = DROP, false = WAITQ (for backwards compatibility)

  • A DropStrategy enum value: DROP, WAITQ, BAS, BBS, RSRD

setGlobalMaxJobs(njobs)
setGlobalMaxMemory(memlim)
setName(name)
class ClosedClass

Bases: JobClass

ClosedClass Job class with fixed population circulating in the network

ClosedClass represents a job class with a fixed number of jobs that perpetually circulate within the network. Jobs never leave the system and the total population remains constant. This is essential for modeling systems with limited resources or finite user populations.

@brief Job class with fixed population circulating within the network

Key characteristics: - Fixed finite population of jobs - Jobs never enter or leave the network - Constant total network population - Reference station for performance metrics - Priority-based service differentiation - Think time modeling for user behavior

Closed class features: - Fixed population constraint enforcement - Reference station designation for metrics - Think time specification for user delays - Priority assignment for service - Circulation-based performance analysis - Saturation and throughput modeling

ClosedClass is used for: - Terminal-based computer systems - Time-sharing system modeling - Manufacturing systems with fixed workpieces - Batch processing systems - Systems with resource constraints

Example: @code model = Network(‘ClosedSystem’); cpu = Queue(model, ‘CPU’, SchedStrategy.PS); disk = Queue(model, ‘Disk’, SchedStrategy.FCFS); think = Delay(model, ‘ThinkTime’); users = ClosedClass(model, ‘Users’, 20, think, 1); % 20 users think.setService(users, Exp(0.1)); % Think time @endcode

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

Constructor Summary
ClosedClass(model, name, njobs, refstat, prio, deadline)

CLOSEDCLASS Create a closed job class instance

@brief Creates a ClosedClass with fixed population circulating in network @param model Network model to add the closed class to @param name String identifier for the job class @param njobs Number of jobs in the class (fixed population) @param refstat Reference station for performance measurement @param prio Optional priority level (default: 0) @param deadline Optional relative deadline from arrival (default: Inf, no deadline) @return self ClosedClass instance with specified population

Property Summary
population
Method Summary
setNumberOfJobs(njobs)

SELF = SETNUMBEROFJOBS(NJOBS) Alias of setPopulation, mirroring the JAR ClosedClass API.

setPopulation(njobs)

SELF = SETPOPULATION(NJOBS) Set the fixed circulating population of this closed class. Used by the line-opt JobPopulation decision variable.

setReferenceStation(class, source)

SETREFERENCESTATION(CLASS, SOURCE)

summary()

SUMMARY()

Table(varargin)

T = TABLE(VARARGIN)

class SelfLoopingClass

Bases: ClosedClass

A class of jobs that perpetually cycle at its reference station.

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

Constructor Summary
SelfLoopingClass(model, name, njobs, refstat, prio)

SELF = SELFLOOPINGCLASS(MODEL, NAME, NJOBS, REFSTAT, PRIO)

class SampledMetric

Bases: Copyable

Observed data for a metric

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

Constructor Summary
SampledMetric(type, ts, data, node, jobclass)
Property Summary
class
cond
data
format

‘timeseries’ (default) or ‘trace’ (per-request)

node
t
type
Method Summary
isAggregate()
isConditional()
isTrace()
setConditional(event)
setTrace()
class JLayeredNetwork

Bases: Model

JLINE extended layered queueing network model.

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

Constructor Summary
JLayeredNetwork(name)

SELF = JLAYEREDNETWORK(MODELNAME)

Property Summary
obj

java object

Method Summary
addActivity(activity)

SELF = ADDACTIVITY(ACTIVITY)

addEntry(entry)

SELF = ADDENTRY(ENTRY)

addHost(host)

SELF = ADDHOST(HOST)

addTask(task)

SELF = ADDTASK(TASK)

getNodeByName(name)

NODE = GETNODEBYNAME(NAME)

getNodeIndex(name)
getNumberOfActivities()

A = GETNUMBEROFACTIVITIES()

getNumberOfEntries()

E = GETNUMBEROFENTRIES()

getNumberOfHosts()

H = GETNUMBEROFHOSTS()

getNumberOfLayers()

E = GETNUMBEROFLAYERS()

getNumberOfModels()

E = GETNUMBEROFMODELS()

getNumberOfTasks()

T = GETNUMBEROFTASKS()

getStruct(wantInitialState)

get arbitrary representation

static parseXML(filename)

MODEL = PARSEXML(FILENAME)

reset()
sanitize()

SANITIZE() Validates the LayeredNetwork configuration. Ensures that if entries are defined, activities are also defined to serve those entries.

writeXML(filename)

WRITEXML(FILENAME)

class Signal

Bases: JobClass

Signal Job class representing a signal (e.g., negative customer in G-networks)

Signal is a placeholder class that automatically resolves to OpenSignal or ClosedSignal based on the network structure. Users can simply use Signal in both open and closed networks - the resolution happens when the model is finalized (during getStruct/refreshStruct).

@brief Job class for modeling signals in G-networks and related models

Key characteristics: - Automatically resolves to OpenSignal or ClosedSignal - Supports different signal types (NEGATIVE, REPLY, CATASTROPHE) - NEGATIVE signals remove jobs from destination queues - CATASTROPHE signals reset the state of queues - Used in G-networks (Gelenbe networks)

Signal types: - SignalType.NEGATIVE: Removes a job from the destination queue - SignalType.REPLY: Triggers a reply action - SignalType.CATASTROPHE: Resets destination queue to empty state

Example (Open Network): @code model = Network(‘GNetwork’); source = Source(model, ‘Source’); sink = Sink(model, ‘Sink’); queue = Queue(model, ‘Queue’, SchedStrategy.FCFS); posClass = OpenClass(model, ‘Positive’); % Normal customers negClass = Signal(model, ‘Negative’, SignalType.NEGATIVE); % Resolves to OpenSignal source.setArrival(posClass, Exp(1.0)); source.setArrival(negClass, Exp(0.3)); @endcode

Example (Closed Network): @code model = Network(‘ClosedGNetwork’); delay = Delay(model, ‘Think’); queue = Queue(model, ‘Queue’, SchedStrategy.FCFS); jobClass = ClosedClass(model, ‘Job’, 5, delay); replySignal = Signal(model, ‘Reply’, SignalType.REPLY).forJobClass(jobClass); % Resolves to ClosedSignal @endcode

Reference: Gelenbe, E. (1991). “Product-form queueing networks with

negative and positive customers”, Journal of Applied Probability

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

Constructor Summary
Signal(model, name, signalType, prio, removalDistribution, removalPolicy)

SIGNAL Create a signal class instance

@brief Creates a Signal class for G-network modeling @param model Network model to add the signal class to @param name String identifier for the signal class @param signalType SignalType constant (REQUIRED: NEGATIVE, REPLY, or CATASTROPHE) @param prio Optional priority level (default: 0) @param removalDistribution Optional discrete distribution for batch removals (default: []) @param removalPolicy Optional RemovalPolicy constant (default: RemovalPolicy.RANDOM) @return self Signal instance ready for arrival specification

Property Summary
model

Reference to the Network model

removalDistribution

DiscreteDistribution for number of removals (empty = remove exactly 1)

removalPolicy

RemovalPolicy constant (RANDOM, FCFS, LCFS)

signalType

SignalType constant (NEGATIVE, REPLY, CATASTROPHE)

targetJobClass

the class to unblock)

Type:

JobClass that this signal is associated with (for REPLY

Method Summary
forJobClass(jobClass)

FORJOBCLASS Associate this signal with a job class

self = FORJOBCLASS(self, jobClass) associates this signal with the specified job class. For REPLY signals, this specifies which job class’s servers will be unblocked when this signal arrives.

@param jobClass The JobClass to associate with this signal @return self The modified Signal instance (for chaining)

Example

replySignal = Signal(model, ‘Reply’, SignalType.REPLY).forJobClass(reqClass);

getRemovalDistribution()

GETREMOVALDISTRIBUTION Get the removal distribution

@return dist The discrete distribution for batch removals

getRemovalPolicy()

GETREMOVALPOLICY Get the removal policy

@return policy The RemovalPolicy constant

getSignalType()

GETSIGNALTYPE Get the signal type

@return type The SignalType of this signal class

getTargetJobClass()

GETTARGETJOBCLASS Get the associated job class

@return jobClass The JobClass associated with this signal

getTargetJobClassIndex()

GETTARGETJOBCLASSINDEX Get the index of the associated job class

@return idx Index of the associated JobClass, or -1 if none

isCatastrophe()

ISCATASTROPHE Check if this is a catastrophe signal

@return b true if signalType is SignalType.CATASTROPHE

resolve(isOpen, refstat)

RESOLVE Resolve this Signal placeholder to OpenSignal or ClosedSignal

@param isOpen true if the network is open (has Source node) @param refstat Reference station for closed networks (ignored for open) @return concrete OpenSignal or ClosedSignal instance

setRemovalDistribution(dist)

SETREMOVALDISTRIBUTION Set the removal distribution

@param dist DiscreteDistribution for number of removals

setRemovalPolicy(policy)

SETREMOVALPOLICY Set the removal policy

@param policy RemovalPolicy constant (RANDOM, FCFS, LCFS)

class JobClass

Bases: NetworkElement

An abstract class for a collection of indistinguishable jobs

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

Property Summary
completes

true if passage through reference station is a completion

deadline

relative deadline from arrival (Inf = no deadline)

immediateFeedback

true if this class uses immediate feedback on self-loops globally

Type:

Boolean

impatienceType

Global impatience type for this class (ImpatienceType.RENEGING or ImpatienceType.BALKING)

index

node index

isrefclass

is this a reference class within a chain?

patience

Global patience distribution for this class (customers abandon queues after patience time)

priority
refstat

reference station

replySignalClass

Signal class that will unblock servers waiting for reply (for synchronous call semantics)

spawnClass

Class of the job injected at the same station on each service completion of this class (LQN phase-2 continuation)

type
Method Summary
expectsReply()

EXPECTSREPLY Check if this class expects a reply signal

tf = EXPECTSREPLY(self) returns true if this class has been configured to expect a reply signal (via setReplySignalClass).

@return tf True if a reply signal is expected

getImpatienceType()

IMPATIENCETYPE = GETIMPATIENCETYPE()

Returns the global impatience type for this job class.

Returns:

impatienceType - The impatience type (ImpatienceType constant), or [] if not set

getPatience()

DISTRIBUTION = GETPATIENCE()

Returns the global patience distribution for this job class.

Returns:

distribution - The patience distribution, or [] if not set

getReplySignalClassIndex()

GETREPLYSIGNALCLASSINDEX Get the index of the reply signal class

idx = GETREPLYSIGNALCLASSINDEX(self) returns the index of the Signal class that will unblock servers waiting for this class, or -1 if no reply is expected.

@return idx Index of reply signal class, or -1 if none

hasImmediateFeedback()

HASIMMEDIATEFEEDBACK Check if immediate feedback is enabled

TF = HASIMMEDIATEFEEDBACK() returns true if immediate feedback is enabled

hasPatience()

TF = HASPATIENCE()

Returns true if this class has a patience distribution set.

setImmediateFeedback(value)

SETIMMEDIATEFEEDBACK Set immediate feedback for self-loops

SETIMMEDIATEFEEDBACK(true) enables immediate feedback for this class globally SETIMMEDIATEFEEDBACK(false) disables immediate feedback for this class

When enabled, a job of this class that self-loops at any station stays in service instead of going back to the queue.

setPatience(varargin)

SELF = SETPATIENCE(DISTRIBUTION) - Backwards compatible SELF = SETPATIENCE(IMPATIENCETYPE, DISTRIBUTION) - Explicit type

Sets the global impatience type and distribution for this job class. This applies to all queues unless overridden by queue-specific settings.

Parameters:
  • impatienceType - (Optional) ImpatienceType constant (RENEGING or BALKING) – If omitted, defaults to ImpatienceType.RENEGING

  • distribution - Any LINE distribution (Exp, Erlang, HyperExp, etc.) – excluding modulated processes (BMAP, MAP, MMPP2)

Examples

jobclass.setPatience(Exp(0.1)) % Defaults to RENEGING jobclass.setPatience(ImpatienceType.RENEGING, Exp(0.1)) jobclass.setPatience(ImpatienceType.BALKING, Det(5.0))

setPriority(priority)

SELF = SETPRIORITY(PRIORITY) Set the priority of this class (0 = highest). Used by the line-opt ClassPriority decision variable.

setReplySignalClass(replyClass)

SETREPLYSIGNALCLASS Set the Signal class for synchronous call reply

self = SETREPLYSIGNALCLASS(self, replyClass) configures this job class to expect a reply signal from the specified Signal class. When a job of this class completes service, the server will block until receiving a REPLY signal from the specified class.

This implements LQN-style synchronous call semantics where a client sends a request, blocks waiting for a reply, and then continues processing after the reply arrives.

@param replyClass Signal object with SignalType.REPLY that will unblock the server @return self The modified JobClass instance

setSpawnClass(spawnCls)

SELF = SETSPAWNCLASS(SPAWNCLS)

On each service completion of a job of this class, a new job of class SPAWNCLS is injected at the same station. Used for LQN phase-2 continuations, where the reply token returns to the caller while the served task continues its second phase.

subsindex()

IND = SUBSINDEX()

summary()

SUMMARY()

class ClosedSignal

Bases: ClosedClass

ClosedSignal Signal class for closed queueing networks

ClosedSignal is a specialized ClosedClass for modeling signals in closed queueing networks. Unlike regular customers, signals can have special effects on queues they visit, such as removing jobs (negative signals) or unblocking servers (reply signals).

For open networks, use OpenSignal instead.

ClosedSignal has zero population - signals are created dynamically through class switching from the target job class.

Signal types: - SignalType.NEGATIVE: Removes a job from the destination queue - SignalType.REPLY: Unblocks servers waiting for a reply

Example: @code model = Network(‘ClosedModel’); delay = Delay(model, ‘Think’); queue1 = Queue(model, ‘Client’, SchedStrategy.FCFS); queue2 = Queue(model, ‘Server’, SchedStrategy.FCFS); jobClass = ClosedClass(model, ‘Job’, 5, delay); replySignal = ClosedSignal(model, ‘Reply’, SignalType.REPLY, delay).forJobClass(jobClass); @endcode

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

Constructor Summary
ClosedSignal(model, name, signalType, refstat, prio, removalDistribution, removalPolicy)

CLOSEDSIGNAL Create a closed signal class instance

@param model Network model to add the signal class to @param name String identifier for the signal class @param signalType SignalType constant (default: SignalType.NEGATIVE) @param refstat Reference station (should match target job class) @param prio Optional priority level (default: 0) @param removalDistribution Optional discrete distribution for batch removals (default: []) @param removalPolicy Optional RemovalPolicy constant (default: RemovalPolicy.RANDOM) @return self ClosedSignal instance

Property Summary
removalDistribution

DiscreteDistribution for number of removals (empty = remove exactly 1)

removalPolicy

RemovalPolicy constant (RANDOM, FCFS, LCFS)

signalType

SignalType constant (NEGATIVE, REPLY)

targetJobClass

JobClass that this signal is associated with

Method Summary
forJobClass(jobClass)

FORJOBCLASS Associate this signal with a job class

For REPLY signals, this specifies which job class’s servers will be unblocked when this signal arrives.

@param jobClass The JobClass to associate with this signal @return self The modified Signal instance (for chaining)

getRemovalDistribution()

GETREMOVALDISTRIBUTION Get the removal distribution

getRemovalPolicy()

GETREMOVALPOLICY Get the removal policy

getSignalType()

GETSIGNALTYPE Get the signal type

getTargetJobClass()

GETTARGETJOBCLASS Get the associated job class

getTargetJobClassIndex()

GETTARGETJOBCLASSINDEX Get the index of the associated job class

isCatastrophe()

ISCATASTROPHE Check if this is a catastrophe signal

@return b true if signalType is SignalType.CATASTROPHE

setRemovalDistribution(dist)

SETREMOVALDISTRIBUTION Set the removal distribution

setRemovalPolicy(policy)

SETREMOVALPOLICY Set the removal policy

summary()

SUMMARY()

class OpenClass

Bases: JobClass

OpenClass Job class for external arrivals with infinite population

OpenClass represents a job class where jobs arrive from an external source with potentially infinite population. Jobs enter the network through a Source node, traverse the network according to routing probabilities, and exit through a Sink node. Open classes are essential for modeling systems with external arrival streams.

@brief Job class for modeling external arrivals with infinite population

Key characteristics: - Infinite external population - Jobs arrive from Source nodes - Jobs exit through Sink nodes - Variable network population over time - Arrival rate determines load intensity - Priority-based service differentiation

Open class features: - External arrival process modeling - Unlimited population size - Dynamic network population - Priority assignment for service - Integration with routing strategies - Performance metrics per class

OpenClass is used for: - Web server request modeling - Call center customer arrivals - Manufacturing job arrivals - Network packet flows - Service request streams

Example: @code model = Network(‘OpenSystem’); source = Source(model, ‘Arrivals’); sink = Sink(model, ‘Departures’); job_class = OpenClass(model, ‘WebRequests’, 1); % Priority 1 source.setArrival(job_class, Exp(2.0)); % Poisson arrivals, rate 2 @endcode

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

Constructor Summary
OpenClass(model, name, prio, deadline)

OPENCLASS Create an open job class instance

@brief Creates an OpenClass for external arrival modeling @param model Network model to add the open class to @param name String identifier for the job class @param prio Optional priority level (default: 0, lower = more priority; 0 is highest) @param deadline Optional relative deadline from arrival (default: Inf, no deadline) @return self OpenClass instance ready for arrival specification

Method Summary
setReferenceStation(class, source)

SETREFERENCESTATION(CLASS, SOURCE)

class RoutingMatrix

Bases: Copyable

Class for routing matrices

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

Constructor Summary
RoutingMatrix(par)
Method Summary
getCell()
print()
static rtnodes2rtorig(sn)
set(varargin)
subsasgn(s, varargin)

Allow subscripted assignment to uninitialized variable

subsref(s)
class Network

Bases: MNetwork

Main queueing network model class for LINE analysis

Provides methods for adding nodes, job classes, and links to create queueing networks.

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

Constructor Summary
Network(name, varargin)

NETWORK Create a new queueing network model

@brief Creates a Network instance for queueing model construction @param name String identifier for the network model @param varargin Optional implementation parameter (ignored for performance) @return self Network instance ready for model construction

For compatibility, accepts but ignores the implementation argument. Always uses MNetwork (MATLAB) implementation for optimal performance.

Method Summary
static cluster(lambda, D, strategy, S, dispatching)

MODEL = SERVERFARM(LAMBDA, D, STRATEGY, S, DISPATCHING)

Generates an open server-farm queueing network: Source -> Dispatcher (Router) -> Server[1..M] -> Sink

static clusterClosed(N, Z, D, strategy, S, dispatching)

MODEL = SERVERFARMCLOSED(N, Z, D, STRATEGY, S, DISPATCHING)

Generates a closed server-farm queueing network: Think (Delay) -> Dispatcher (Router) -> Server[1..M] -> Think

static clusterFcfs(lambda, D, S, dispatching)

MODEL = SERVERFARMFCFS(LAMBDA, D, S, DISPATCHING)

Open FCFS cluster

static clusterPs(lambda, D, dispatching)

MODEL = SERVERFARMPS(LAMBDA, D, DISPATCHING)

Open PS cluster with one server per queue

static cyclic(N, D, strategy, S)

MODEL = CYCLIC(N, D, STRATEGY, S)

Generates a cyclic queueing network

static tandem(lambda, D, strategy)

MODEL = TANDEM(LAMBDA, D, STRATEGY)

Generates a tandem queueing network

class ModeEvent

A mode event occurring in a Network.

Object of the Event class are not passed by handle.

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

Constructor Summary
ModeEvent(event, node, mode, weight, prob, state, t, job)

SELF = MODEEVENT(EVENT, NODE, MODE, WEIGHT, PROB, STATE, TIMESTAMP, JOB)

Property Summary
event
job

job id (optional)

mode
node
prob
state

state information when the event occurs (optional)

t

timestamp when the event occurs (optional)

weight
Method Summary
print()

PRINT()

Metric(type, class, station)

An output metric of a Solver, such as a performance index

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

class ItemSet

Bases: NetworkElement

A set of cacheable items

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

Constructor Summary
ItemSet(model, name, nitems, reference)

SELF = ITEMSET(MODEL, NAME, NITEMS, REFERENCE)

Property Summary
index
nitems
reference
replicable
Method Summary
getName()

NAME = GETNAME()

getNumberOfItems()

NTYPES = GETNUMBEROFITEMS()

hasReplicableItems()

BOOL = HASREPLICABLEITEMS()