Skip to content

Quisim Block API Reference ​

Overview ​

This reference lists every block of the Quisim modeling language with its attributes, sockets and measures. It complements the Quisim Simulation Modeling Handbook, which explains the concepts (entities, blocks, pipes and wires) and walks through complete models. Terms such as replication, renege or warm-up are explained in the Glossary.

Note: This page is generated automatically from Quisim itself. It describes Quisim 0.22 (16 Oct 2026).

Contents ​

  • How to Read an Entry
  • Attribute Types
  • Common Attributes
  • Entity Attributes
  • Connectors
  • Entity Blocks
    • Arrive — Creates entities at outlet with interarrival times given by duration.
    • Provide — Provisions an entity at outlet at all times, indefinitely.
    • Leave — Deletes any entity incoming at the inlet.
    • Perform — Delays any entity incoming at the inlet by the given duration.
    • Queue — Temporarily stores entities incoming at the inlet.
    • Meter — Counts the number of passed entities from inlet to outlet.
    • Decide — An incoming entity is sent to outlets[S] where S is the selectedOutlet number, which is always rounded down to the next integer.
    • Select — The incoming entity is taken from inlets[S] where S is the selectedInlet number, which is always rounded down to the next integer.
    • Pack — Packs entities incoming at the inlet into the packet entity.
    • Unpack — Unpacks a packet entity incoming at the inlet.
    • Set — Sets the attribute named attribute of a passing entity to value.
    • Get — Gets the value of attribute named attribute of an entity that is being evaluated for being passed through.
    • Lineup — Synchronizes multiple entities.
  • Value Blocks
    • Explorer — Explores simulation runs in a loop by configuring and evaluating them.
    • Note — Displays a text note.
    • Number — Shows a number, either fixed or from the inlet, and provides it at the output.
    • NumberInput — Editable number that is provided at the output.
    • Function — Calls the stated function code, reading the parameter array P and writing to the measure array M.
    • Aggregate — Reduces incoming value to an aggregate value, initialized with init.
    • BrentOptimize — The Brent algorithm optimizes the given objective locally in the range [lower,upper].
  • Random Number Blocks
    • RandomUniform — Generates uniformly distributed random variates in the range [lower,upper).
    • RandomExponential — Generates exponentially distributed random variates adhering to the given mean µ, which is the inverse of the rate λ.
    • RandomPoisson — Generates Poisson distributed random variates adhering to the given mean µ.
    • RandomDiscrete — Generates discrete random variates: outcome i is drawn with probability probabilities[i] and yields values[i], or i itself if values is empty, i.e., 0,1,…,n-1 for n probabilities.
    • RandomContinuous — Generates continuous random variates from an empirical distribution by the inversion method: the cumulative distribution function F is linear between support points, and each variate is F⁻¹(u) for a uniform u.
    • RandomPiecewiseLinear — Generates continuous random variates whose density is piecewise linear: values are k+1 non-decreasing points and densities the density at each point, linear in between and normalized by the total area.
    • RandomGamma — Generates gamma distributed random variates adhering to the given shape k and scale θ.
    • RandomWeibull — Generates Weibull distributed random variates adhering to the given shape k and scale θ.
    • RandomNormal — Generates normally distributed random variates adhering to the given mean µ and standard deviation stddev σ.
    • RandomLognormal — Generates log-normally distributed random variates adhering to the given mean µ and standard deviation stddev σ.
    • RandomPERT — Generates PERT distributed random variates in the range [lower,upper] for an expert estimate: at least lower, most likely mode, at most upper, where lower≤mode≤upper.
  • Report Blocks
    • Chart — Shows a stairstep line chart of the given input parameters P.
    • Histogram — Displays a histogram of the given input parameters P.
    • Report — Collects a protocol of the given input parameters P.
    • Statistics — Computes mean values and confidence intervals of the given input parameters P.
    • SummaryStatistics — Estimates the mean and confidence interval of a sample of results, such as the batch means M of a Statistics block wired into its input V.
    • EnsemblePlot — Displays a Welch plot of the given input parameters P, used to identify the warm-up (transient) phase before steady state.
  • Steering
  • Glossary

How to Read an Entry ​

Each block section starts with the description shown in Quisim's info tab, followed by a short example in the modeling language and up to five tables. Tables that would be empty are left out.

  • Attributes are the properties you set inside the braces of a block, for example Queue { id: queue0; capacity: 5 }. Default is the value used when you set nothing (— means there is no fixed default; “same as x” means the default follows attribute x). If an attribute also has a Wire input, its value can instead be driven during the run by a wire into that connector.
  • Entity inputs and Entity outputs are the green entity sockets: inputs on the left, outputs on the right. Their connector names are the endpoints of a Pipe.
  • Data inputs are the silver data sockets on the left. Their connector names (parameter…) are the targets of a Wire. An input marked wire only has no attribute that could be set as a constant.
  • Measures are the silver data sockets on the right, the values a block reports. Their connector names (measure…) are the sources of a Wire.
  • Label is the short symbol drawn next to a socket in the editor, such as C, L or RD. Labels never appear in model code; use the Connector name instead.
  • Name (measures only) is the descriptive name of a measure, which is usually also a property of the block, such as load for queue0.load. A Wire still uses the Connector name. The column is left out when no measure of the block has a name.

A constant is assigned by the attribute name, as in Queue { id: queue0; renegeDuration: 60 }. To vary the value during the run, a wire goes into the data input of that attribute instead, named by its connector, here queue0.parameterRenegeDuration. For a given attribute, use either a constant or a wire, not both.

Indexed connectors ​

Some blocks have a variable number of sockets. These form zero-indexed arrays that are written inlets[0], outlets[1], parameters[0] or measures[2] in the modeling language. In the editor the same sockets are labelled I0, O1, P[0] or M[2]. The number of sockets is set by a count attribute such as numParameters, numOutlets (Decide), numInlets (Select), numConnectors (Lineup) or numMeasures (Function, Explorer); raise it before you connect a further index. See also Block Sockets in the handbook.

Inside the code of a Function block (its code, context and init attributes) and of an Explorer block (its code attribute), P and M are the JavaScript arrays themselves, so M[0]=P[0]+P[1] is correct there. The code of an Aggregate block uses A (the aggregate) and V (the incoming value) instead, as in A+=V.

Statistics column ​

The Statistics column of the measures table tells how a downstream Statistics block should aggregate the measure:

  • time-weighted: a level that varies over time, such as a queue length. Set timeAverage: true on the Statistics block.
  • cumulative: a running total, such as a count of passed entities. Set cumulative: true to report its increase over the run.
  • —: a plain value per observation. Leave both off.

Special values ​

In the tables, ∞ stands for Infinity (unlimited), −∞ for -Infinity, and NaN for “not a number”, which several blocks use to mean “determine automatically”. In model code, write Infinity, -Infinity or NaN, for example Perform { id: perform0; capacity: Infinity }.

Attribute Types ​

Every attribute and data input has a type that determines which values Quisim accepts. Quisim checks the values you enter in the properties pane against this type.

TypeMeaningExamples
PositiveIntWhole number ≥ 1 (ℕ⁺).1, 2, 100
NonNegativeIntWhole number ≥ 0 (ℕ₀).0, 1, 42
IntWhole number, may be negative (ℤ).-3, 0, 7
Real01Number strictly between 0 and 1, i.e. in the open interval (0, 1).0.05, 0.5
Real01ClosedNumber from 0 to 1 inclusive, i.e. in the closed interval [0, 1].0, 0.95, 1
RealAny number, including Infinity and -Infinity.-2.5, 1e6, Infinity
FiniteRealAny finite number (no infinity).-2.5, 0, 120
PositiveRealNumber > 0; Infinity is allowed.0.5, 100, Infinity
NonNegativeRealNumber ≥ 0; Infinity is allowed.0, 12.5, Infinity
NonNegativeFiniteRealFinite number ≥ 0.0, 12.5
PositiveFiniteRealFinite number > 0.0.5, 40
PositiveIntWithInfinityWhole number ≥ 1, or Infinity for “unlimited”.1, 5, Infinity
NonNegativeIntWithInfinityWhole number ≥ 0, or Infinity for “unlimited”.0, 5, Infinity
BoolTruth value.true, false
IdIdentifier of a block: a letter or _, followed by letters, digits or _.queue0
VariantAny value: number, truth value, string or array.3, true, "red"
ReadOnlySet by Quisim; can be read but not assigned.—
ArrayList of values.[1, 2, 3]
FunctionJavaScript function.—
FunctionWithParamsJavaScript function with parameters.—
DistributionProbability distribution.—
QueuingDisciplineOrdering rule of a queue.—
ColorColour as a hex code #rgb, #rrggbb or #aarrggbb, or a colour name."#ff8800", "red"
StringSingle-line text."Station A"
MultiLineStringText that may span several lines (use \n for a line break)."line 1\nline 2"
SymbolSymbol drawn for an entity, given as a short text such as a letter or emoji."A"
AttributeNameName of an entity attribute, written as a string."lastWait"
CodeJavaScript code, written as a string; separate statements with ;."M[0]=P[0]*2"

Common Attributes ​

These attributes are understood by all blocks or by all connectors (Pipe and Wire). They are not repeated in the block sections below.

AttributeTypeApplies toDescription
labelStringblocksCaption shown on the block.
activeBoolblocksWhether the block takes part in the simulation. It can also be wired into parameterActive, but only on blocks whose Data inputs table lists that connector.
xFiniteRealblocksHorizontal position on the canvas.
yFiniteRealblocksVertical position on the canvas.
widthPositiveFiniteRealblocksWidth of the block on the canvas.
heightPositiveFiniteRealblocksHeight of the block on the canvas.
inclineFiniteRealPipe, WireHorizontal offset of both control points: how far the line runs out of the source socket before it turns.
declineFiniteRealPipe, WireMoves the second control point to the left: how far the line runs into the target socket. Defaults to twice incline.
bendFiniteRealPipe, WireMoves the curve vertically: shifts both control points of the line down (negative values: up), so the line bows. Dragging the line in the editor sets it.
debendFiniteRealPipe, WireMoves the end of the curve vertically: shifts the second control point up, against bend, so the line enters the target from another angle.
offLayoutBoolblocksIf true, the block is excluded from the automatic layout.
colorColorblocks, Pipe, WireColour of the block or of the connector line.
fillColorColorblocksBackground colour of the block.
borderColorColorblocksBorder colour of the block.
visibleBoolblocksWhether the block is drawn.
inPriorityReadOnlyPipe, WireSet by Quisim: rank among the connectors at the same receiving socket. 1 comes first, and that is the connector defined last in the code.
outPriorityReadOnlyPipe, WireSet by Quisim: rank among the connectors at the same sending socket. 1 is tried first, and that is the connector defined last in the code.
noPushBoolWireIf true, a value sent through the wire updates the data input quietly: it triggers no computation and counts as no observation, the block uses it when it computes anyway. Breaks feedback loops, or lets only one of several inputs trigger.
noPullBoolWireIf true, a read of the data input is not passed on to the measure, so the measure does not compute a fresh value for it.
noPushRepeatsBoolWireIf false (default), every value sent through the wire reaches the data input as a new value, also if it equals the current one, so a Function computes again on two equal results in a row. true passes a value on only if it differs from the current one.

Entity Attributes ​

Every entity carries attributes. Besides the built-in ones below, you can define your own with a Set block, under any name: priority in the examples of this page is such a self-defined attribute. Entity attributes are read with the Get block. See also Entity Attributes in the handbook.

AttributeSet byMeaning
numberQuisim, when the entity is createdUnique number of the entity. Read-only.
colorArrive or Provide (their color attribute), or a Set blockColour in which the entity is drawn.
symbolArrive or Provide (their symbol attribute), or a Set blockSymbol drawn for the entity.
innerEntitiesLengthQuisimNumber of entities packed into this entity. Read-only.
lastWaitQueueTime the entity waited in the last queue it left.
lastDurationPerformDuration of the last Perform activity.
meterTimeMeterSimulation time at which the entity passed the last Meter.

lastEntryTime is not an attribute: it is the keyword for arrival order in the criterion of the Queue and Pack blocks, and their default.

While a model runs, the Entities page of Quisim's Monitor tab lists the entities in the selected block together with their attributes.

Connectors ​

Blocks are connected by two kinds of connectors. Each one names its source with from and its target with to, written as blockId.connector.

Pipe ​

Transports an entity from an outlet to an inlet.

If several pipes leave the same outlet, an entity is offered to them one after the other, starting with the pipe defined last in the code. Quisim numbers the pipes at a socket in that order as their priority (1 is tried first), see outPriority and inPriority.

diagramdiagram

Wire ​

Transmits a value from a measure to a parameter (data input).

If several wires are connected to the same socket, the wire defined last in the code has priority. Quisim numbers the wires at a socket in that order as their priority (1 comes first), see outPriority and inPriority.

Every value sent is passed on, also if it equals the current value of the data input: a Function there computes again, so two equal results in a row stay two. A value sent in answer to a read, or one that returns unchanged around a feedback loop, counts as unchanged. With noPushRepeats, only a changed value is passed on.

With noPush, a value sent updates the data input quietly: it triggers no computation and counts as no observation, the block uses it when it computes anyway (e.g. a Function triggered by another input). Use it to break a feedback loop or to let only one of several inputs trigger. With noPull, a read of the data input is not passed on to the measure, which then does not compute a fresh value.

diagramdiagram

Entity Blocks ​

Entity blocks create, process, route and dispose of entities. Entities travel along pipes between their entity sockets.

Arrive Block ​

Creates entities at outlet with interarrival times given by duration.

If a created entity is still there when the next entity arrives, the arrival is blocked until the entity is gone, which delays the next interarrival time correspondingly.

When beginAtZero is set, the first entity arrives at time 0, otherwise when passing the first duration. If duration is negative, it is ‘rounded up’ to 0.

diagramdiagram

Attributes

AttributeTypeDefaultWire inputDescription
durationNonNegativeReal1000parameterDurationInterarrival time
beginAtZeroBooltrue—The first entity arrives at time 0 instead of after the first duration.
colorColor"#000000"—Colour given to each created entity (its color attribute).
symbolSymbol""—Symbol given to each created entity (its symbol attribute).

Entity outputs (green sockets on the right)

ConnectorLabelDescription
outletOOutlet

Data inputs (silver sockets on the left)

ConnectorLabelAttributeTypeDefaultDescription
parameterDurationDdurationNonNegativeReal1000Interarrival time

Measures (silver sockets on the right)

ConnectorLabelNameDescriptionStatistics
measureNumPassedNnumPassedPassed entity countcumulative

↑ Contents

Provide Block ​

Provisions an entity at outlet at all times, indefinitely. The next entity is created as soon as the previous one is transported away.

diagramdiagram

Attributes

AttributeTypeDefaultWire inputDescription
colorColor"#000000"—Colour given to each created entity (its color attribute).
symbolSymbol""—Symbol given to each created entity (its symbol attribute).

Entity outputs (green sockets on the right)

ConnectorLabelDescription
outletOOutlet

Measures (silver sockets on the right)

ConnectorLabelNameDescriptionStatistics
measureNumPassedNnumPassedPassed entity countcumulative

↑ Contents

Leave Block ​

Deletes any entity incoming at the inlet.

diagramdiagram

Entity inputs (green sockets on the left)

ConnectorLabelDescription
inletIInlet

Measures (silver sockets on the right)

ConnectorLabelNameDescriptionStatistics
measureNumPassedNnumPassedPassed entity countcumulative
measureSojournLSlastSojournSojourn time between entry and leave of last exited entity—

↑ Contents

Perform Block ​

Delays any entity incoming at the inlet by the given duration.

If the delayed entity is not transported away instantly from outlet, then the entity takes up capacity as long as it waits.

The activity has a given capacity of entities in parallel, which is unlimited if set to Infinity. Then, multiple entities are processed in parallel, each using the given duration (the value is taken on arrival of the entity), which is ‘rounded up’ to 0 if a negative duration is given.

Two triggers make processed entities excess. With haltExcess, reducing capacity below the number of processed entities makes those ranked last excess; otherwise they keep being processed (soft cap). With preemptive, an arriving entity that strictly outranks the processed entity ranked last is admitted even at full capacity, and that entity becomes excess; an arriving entity that does not outrank it waits upstream.

An excess entity stops being processed. If outEvict (E) can take it right away, it leaves there, with its remaining work in the attribute remainingDuration; otherwise it is halted. A halted entity resumes, best-ranked first, as soon as capacity frees up, or leaves through E as soon as E opens. So piping E decides whether excess entities leave or wait. Finished entities waiting at the outlet are never touched. The load counts halted entities, too.

Entities are ranked according to the criterion in ascending (otherwise descending) order. The default criterion remainingDuration is a keyword for the work still to do (an arriving entity's full duration), so the entity with the most remaining work is ranked last, and preemptive gives shortest remaining processing time first (SRPT). The keyword lastEntryTime is the time of entering the block: not ascending, it gives preemptive LIFO; ascending, it never preempts. Any other criterion names an entity attribute, e.g. a priority.

The E outlet is shown if haltExcess or preemptive is set or it is piped.

diagramdiagram

Attributes

AttributeTypeDefaultWire inputDescription
capacityNonNegativeIntWithInfinity1parameterCapacityParallel processing capacity
durationNonNegativeReal1000parameterDurationProcessing duration
criterionAttributeName"remainingDuration"—Ranking of the entities in service, the last ranked stops first: the keyword remainingDuration for the work still to do, lastEntryTime for the entry time, otherwise the name of an entity attribute.
ascendingBooltrue—Ascending ranking (the entity with most remaining work is ranked last by default); false reverses it.
haltExcessBoolfalse—When the capacity drops below the number in service, the entities ranked last stop: they leave through outEvict if it can take them, else they are halted until capacity frees up; false keeps them running (soft cap).
preemptiveBoolfalse—An arriving entity that strictly outranks the entity in service ranked last takes its place, which leaves through outEvict if it can take it, else is halted.

Entity inputs (green sockets on the left)

ConnectorLabelDescription
inletIInlet

Entity outputs (green sockets on the right)

ConnectorLabelDescription
outletOOutlet
outEvictEEvict

Data inputs (silver sockets on the left)

ConnectorLabelAttributeTypeDefaultDescription
parameterCapacityCcapacityNonNegativeIntWithInfinity1Parallel processing capacity
parameterDurationDdurationNonNegativeReal1000Processing duration

Measures (silver sockets on the right)

ConnectorLabelNameDescriptionStatistics
measureLoadLloadNumber of held entities: processed, halted, and finished but blockedtime-weighted

↑ Contents

Queue Block ​

Temporarily stores entities incoming at the inlet.

Outgoing entities are ordered according to the criterion attribute in ascending (otherwise in descending) order. The default criterion lastEntryTime is a keyword, not an entity attribute: it means arrival order, i.e. first in, first out (FIFO), or last in, first out (LIFO) when ascending is false. Any other criterion names an entity attribute (for example one written by a Set block), and entities are sorted by its numeric value.

If the outlet is blocked and renegeDuration is set, the entity is instead sent to outRenege after renegeDuration (the value is taken on arrival of the entity, and ‘rounded up’ to 0 if negative) has passed.

If the capacity is reached, an incoming entity waits upstream, even while the outlet is open. With capacity 0 there is no waiting room: an entity passes straight through only if the next block takes it at once, otherwise it waits upstream. If capacity drops below the load, no entity is removed: the queue just drains (soft cap). With evictExcess, the entity served last is sent to outEvict (E) instead, one at a time until the load fits the capacity. With preemptive, at exactly full capacity, an incoming entity pushes the entity served last out to E if it would be served before it: never with FIFO, always with LIFO, and with any other criterion only if its value is strictly lower (strictly higher if not ascending). While E is blocked or not piped, nothing is removed; removal resumes as soon as E opens.

Outlets are numbered in the order shown: outlet is 0, then R (outRenege) if reneging is enabled – renegeDuration is finite or wired – or R is piped, then E if evictExcess or preemptive is set or E is piped.

diagramdiagram

Attributes

AttributeTypeDefaultWire inputDescription
capacityNonNegativeIntWithInfinity∞parameterCapacityMaximum number of enqueued entities
renegeDurationNonNegativeReal∞parameterRenegeDurationRenege wait duration
criterionAttributeName"lastEntryTime"—Ordering: the keyword lastEntryTime for arrival order, otherwise the name of an entity attribute to sort by.
ascendingBooltrue—Ascending order (FIFO with lastEntryTime); false reverses it (LIFO).
evictExcessBoolfalse—On a capacity drop, send the entities served last to outEvict until the load fits the capacity; false keeps a soft cap.
preemptiveBoolfalse—At full capacity, an arriving entity that would be served earlier pushes the entity served last out to outEvict.

Entity inputs (green sockets on the left)

ConnectorLabelDescription
inletIInlet

Entity outputs (green sockets on the right)

ConnectorLabelDescription
outletOOutlet
outRenegeRRenege
outEvictEEvict

Data inputs (silver sockets on the left)

ConnectorLabelAttributeTypeDefaultDescription
parameterCapacityCcapacityNonNegativeIntWithInfinity∞Maximum number of enqueued entities
parameterRenegeDurationRDrenegeDurationNonNegativeReal∞Renege wait duration

Measures (silver sockets on the right)

ConnectorLabelNameDescriptionStatistics
measureLoadLloadNumber of enqueued entitiestime-weighted
measureWaitLW—Wait time of last exited entity—

↑ Contents

Meter Block ​

Counts the number of passed entities from inlet to outlet. If a capacity is set, the meter stops passing entities if reaching this load. The load is reset when the reset parameter is changed to a non-zero value.

The count is the measure measureNumPassed; its name is load, the block property that holds it. Since a reset sets it back to 0, a Statistics block with cumulative set reports the increase since the last reset only if no reset happens during the run.

diagramdiagram

Attributes

AttributeTypeDefaultWire inputDescription
capacityNonNegativeIntWithInfinity∞parameterCapacityMaximum number of passed entities
activeBooltrueparameterActiveActivates this block

Entity inputs (green sockets on the left)

ConnectorLabelDescription
inletIInlet

Entity outputs (green sockets on the right)

ConnectorLabelDescription
outletOOutlet

Data inputs (silver sockets on the left)

ConnectorLabelAttributeTypeDefaultDescription
parameterActive—activeBooltrueActivates this block
parameterCapacityCcapacityNonNegativeIntWithInfinity∞Maximum number of passed entities
parameterResetR— (wire only)Int0Reset when changed to a non-zero value

parameterReset is only driven by a wire; there is no attribute to set as a constant.

Measures (silver sockets on the right)

ConnectorLabelNameDescriptionStatistics
measureNumPassedNloadPassed entity count since the last resetcumulative
measureLastIntervalLI—Time interval between the two last passing entities—
measureLastTimeLT—Time that the last entity passed—

↑ Contents

Decide Block ​

An incoming entity is sent to outlets[S] where S is the selectedOutlet number, which is always rounded down to the next integer. Is blocked if all outlets are blocked.

The default selectedOutlet -1 selects no outlet, and so does any number without a matching outlet: the entity then waits until a valid outlet is selected.

diagramdiagram

Attributes

AttributeTypeDefaultWire inputDescription
numOutletsPositiveInt2—Number of outlets.
selectedOutletInt-1parameterSelectedOutletOutlet choice; -1 selects none

Entity inputs (green sockets on the left)

ConnectorLabelDescription
inletIInlet

Entity outputs (green sockets on the right)

ConnectorLabelDescription
outlets[0]O0Outlet 0
outlets[1]O1Outlet 1

There are numOutlets indexed outlets[…], numbered from 0; the table shows the default numOutlets = 2.

Data inputs (silver sockets on the left)

ConnectorLabelAttributeTypeDefaultDescription
parameterSelectedOutletSselectedOutletInt-1Outlet choice; -1 selects none

↑ Contents

Select Block ​

The incoming entity is taken from inlets[S] where S is the selectedInlet number, which is always rounded down to the next integer. An inlet is blocked if it is not selected or the outlet is blocked.

The default selectedInlet -1 selects no inlet, and so does any number without a matching inlet: then all inlets are blocked.

diagramdiagram

Attributes

AttributeTypeDefaultWire inputDescription
numInletsPositiveInt2—Number of inlets.
selectedInletInt-1parameterSelectedInletSelected inlet; -1 selects none

Entity inputs (green sockets on the left)

ConnectorLabelDescription
inlets[0]I0Inlet 0
inlets[1]I1Inlet 1

There are numInlets indexed inlets[…], numbered from 0; the table shows the default numInlets = 2.

Entity outputs (green sockets on the right)

ConnectorLabelDescription
outletOOutlet

Data inputs (silver sockets on the left)

ConnectorLabelAttributeTypeDefaultDescription
parameterSelectedInletSselectedInletInt-1Selected inlet; -1 selects none

↑ Contents

Pack Block ​

Packs entities incoming at the inlet into the packet entity.

This entity is sent to the outlet as soon as possible, i.e., as soon as the sufficiency number of loaded entities is attained. There are no further entities packed into the container when the capacity limit is reached. By default, sufficiency=capacity, and capacity is ∞.

Inside the packet, the entities are kept in arrival order with the default criterion lastEntryTime, which is a keyword, not an entity attribute. Any other criterion names an entity attribute, and the packed entities are ordered by its numeric value, lowest first.

diagramdiagram

Attributes

AttributeTypeDefaultWire inputDescription
capacityNonNegativeIntWithInfinity∞parameterCapacityUpper load that is acceptable
sufficiencyNonNegativeIntWithInfinitysame as capacityparameterSufficiencyBottom load for sending a packet
criterionAttributeName"lastEntryTime"—Order inside the packet: the keyword lastEntryTime for arrival order, otherwise the name of an entity attribute to sort by.

Entity inputs (green sockets on the left)

ConnectorLabelDescription
inletIInlet
inPacketPPacket

Entity outputs (green sockets on the right)

ConnectorLabelDescription
outletOOutlet

Data inputs (silver sockets on the left)

ConnectorLabelAttributeTypeDefaultDescription
parameterCapacityCcapacityNonNegativeIntWithInfinity∞Upper load that is acceptable
parameterSufficiencyBsufficiencyNonNegativeIntWithInfinitysame as capacityBottom load for sending a packet

Measures (silver sockets on the right)

ConnectorLabelNameDescriptionStatistics
measureLoadLloadLoadtime-weighted
measureLastLoadLLlastLoadLoad of last sent packet entity—
measureHasPackageHPhasPackageHas a packet for packing?time-weighted

↑ Contents

Unpack Block ​

Unpacks a packet entity incoming at the inlet. It is sent to the packet outlet, but only after unpacking, which involves enqueuing and sending at most capacity inner entities to the outlet. See Queue for how to handle the queue, except that its wait measure – relabelled LD here and wired as measureWait – measures elapsed time from the entity's enqueuing in the Pack block until exiting here.

The capacity is read when a packet arrives only. Unpack has no E outlet and ignores criterion: it takes a packet only when empty, and inner entities beyond capacity stay in the packet. R is shown if reneging is enabled or R is piped.

diagramdiagram

Attributes

AttributeTypeDefaultWire inputDescription
capacityNonNegativeIntWithInfinity∞parameterCapacityMaximum number of enqueued entities
renegeDurationNonNegativeReal∞parameterRenegeDurationRenege wait duration
ascendingBooltrue—Release the inner entities in packing order; false reverses it.

Entity inputs (green sockets on the left)

ConnectorLabelDescription
inletIInlet

Entity outputs (green sockets on the right)

ConnectorLabelDescription
outletOOutlet
outRenegeRRenege
outPackPPacket

Data inputs (silver sockets on the left)

ConnectorLabelAttributeTypeDefaultDescription
parameterCapacityCcapacityNonNegativeIntWithInfinity∞Maximum number of enqueued entities
parameterRenegeDurationRDrenegeDurationNonNegativeReal∞Renege wait duration

Measures (silver sockets on the right)

ConnectorLabelNameDescriptionStatistics
measureLoadLloadNumber of enqueued entitiestime-weighted
measureWaitLD—Pack (containment) duration of last exited entity—
measureHasPackageHPhasPackageHas a package for unpacking?time-weighted

↑ Contents

Set Block ​

Sets the attribute named attribute of a passing entity to value. You may choose the attribute name freely, but the read-only attributes number and innerEntitiesLength cannot be set.

See Entity Attributes for the attributes every entity has.

diagramdiagram

Attributes

AttributeTypeDefaultWire inputDescription
attributeAttributeName""parameterAttributeAttribute name
valueVariant—parameterValueAttribute value

Entity inputs (green sockets on the left)

ConnectorLabelDescription
inletIInlet

Entity outputs (green sockets on the right)

ConnectorLabelDescription
outletOOutlet

Data inputs (silver sockets on the left)

ConnectorLabelAttributeTypeDefaultDescription
parameterAttributeAattributeAttributeName""Attribute name
parameterValueVvalueVariant—Attribute value

↑ Contents

Get Block ​

Gets the value of attribute named attribute of an entity that is being evaluated for being passed through.

See Entity Attributes for the attributes every entity has.

diagramdiagram

Attributes

AttributeTypeDefaultWire inputDescription
attributeAttributeName""parameterAttributeAttribute name

Entity inputs (green sockets on the left)

ConnectorLabelDescription
inletIInlet

Entity outputs (green sockets on the right)

ConnectorLabelDescription
outletOOutlet

Data inputs (silver sockets on the left)

ConnectorLabelAttributeTypeDefaultDescription
parameterAttributeAattributeAttributeName""Attribute name

Measures (silver sockets on the right)

ConnectorLabelDescriptionStatistics
measureValueVAttribute value—

↑ Contents

Lineup Block ​

Synchronizes multiple entities. There are numConnectors inlets and outlets. Transports an entity from inlets[i] to outlets[i] for each 0≤i<numConnectors whereby the block waits until neededEntities have arrived at distinct inlets (so the entities line up), then waits again until all entities can be sent out at once, each at its corresponding outlet. There must be 1≤neededEntities≤numConnectors. By default, neededEntities=numConnectors.

diagramdiagram

Attributes

AttributeTypeDefaultWire inputDescription
numConnectorsPositiveInt2—Number of inlet/outlet pairs.
neededEntitiesPositiveIntsame as numConnectorsparameterNeededEntitiesNumber of needed entities per gathering

Entity inputs (green sockets on the left)

ConnectorLabelDescription
inlets[0]I0Inlet 0
inlets[1]I1Inlet 1

There are numConnectors indexed inlets[…], numbered from 0; the table shows the default numConnectors = 2.

Entity outputs (green sockets on the right)

ConnectorLabelDescription
outlets[0]O0Outlet 0
outlets[1]O1Outlet 1

There are numConnectors indexed outlets[…], numbered from 0; the table shows the default numConnectors = 2.

Data inputs (silver sockets on the left)

ConnectorLabelAttributeTypeDefaultDescription
parameterNeededEntitiesCneededEntitiesPositiveIntsame as numConnectorsNumber of needed entities per gathering

Measures (silver sockets on the right)

ConnectorLabelNameDescriptionStatistics
measureNumAvailableLnumAvailableAvailable entity counttime-weighted

↑ Contents


Value Blocks ​

Value blocks set values, compute functions and run experiments. They have data sockets only.

Explorer Block ​

Explores simulation runs in a loop by configuring and evaluating them. Use the parameter array P and set the measure array M. The yield command starts the next run and returns when finished. The return value is true unless the last experiment is done.

diagramdiagram

Attributes

AttributeTypeDefaultWire inputDescription
codeCode"while(true)\n{ yield }"—JavaScript code of the exploration loop: reads P, sets M, and calls yield to start the next run.
numParametersPositiveInt1—Number of data inputs parameters[0], parameters[1], ….
numMeasuresPositiveInt1—Number of measures measures[0], measures[1], ….
plotLogScaledBoolfalse—Logarithmic plot scale (currently has no effect).

Data inputs (silver sockets on the left)

ConnectorLabelAttributeTypeDefaultDescription
parameters[0]P[0]—Variant—Parameter 0

There are numParameters indexed parameters[…], numbered from 0; the table shows the default numParameters = 1.

Measures (silver sockets on the right)

ConnectorLabelDescriptionStatistics
measures[0]M[0]Measure 0—

There are numMeasures indexed measures[…], numbered from 0; the table shows the default numMeasures = 1.

↑ Contents

Note Block ​

Displays a text note.

diagramdiagram

Attributes

AttributeTypeDefaultWire inputDescription
textMultiLineString""—Text of the note.
fontBoldBoolfalse—Bold text.
fontSizePositiveInt11—Font size in pixels.
fontColorColor"#000000"—Text colour.

↑ Contents

Number Block ​

Shows a number, either fixed or from the inlet, and provides it at the output.

diagramdiagram

Attributes

AttributeTypeDefaultWire inputDescription
valueReal0parameterValueNumber value

Data inputs (silver sockets on the left)

ConnectorLabelAttributeTypeDefaultDescription
parameterValueVvalueReal0Number value

Measures (silver sockets on the right)

ConnectorLabelNameDescriptionStatistics
measureValueNvalueNumber value—

↑ Contents

NumberInput Block ​

Editable number that is provided at the output.

diagramdiagram

Attributes

AttributeTypeDefaultWire inputDescription
initValueReal1—Value when the model is loaded; it can then be edited while the simulation runs.
lowerReal−∞—Smallest value that can be entered.
upperReal∞—Largest value that can be entered.

Measures (silver sockets on the right)

ConnectorLabelNameDescriptionStatistics
measureValueNvalueNumber value—

↑ Contents

Function Block ​

Calls the stated function code, reading the parameter array P and writing to the measure array M.

The context code is evaluated once on model load, global functions and variables may be created here. The init code is evaluated on each simulation run start to reset global variables.

On parameter update and on measure read request, an immediate function evaluation happens unless deferredEvaluation is set, which schedules an update event. However, numRequested and numConsumed parameters do not trigger evaluation (and the latter does not issue read requests itself). The default M[0]=P[0] code copies the first parameter to the first measure.

Array values are accessed using P[i] and M[j] where 0≤i<numParameters+numRequested+numConsumed and 0≤j<numMeasures; both arrays start at index 0. A reusable context code can be given.

Multiple statements must be separated by ; (semicolon).

The JavaScript Math functions can be used (Math.max(), Math.min(), etc.).

Example function text that both adds and subtracts the two parameters and yields two measures: M[0]=P[0]+P[1];M[1]=P[0]-P[1]

diagramdiagram

Attributes

AttributeTypeDefaultWire inputDescription
contextCode""—JavaScript code evaluated once on model load, for global functions and variables.
initCode""—JavaScript code evaluated at the start of each run, to reset global variables.
codeCode"M[0]=P[0]"—JavaScript code that reads P and writes M.
numParametersNonNegativeInt1—Number of parameters that trigger an evaluation when they change.
numRequestedNonNegativeInt0—Number of further parameters that are read on evaluation but do not trigger it.
numConsumedNonNegativeInt0—Number of further parameters that neither trigger an evaluation nor request a value themselves.
numMeasuresNonNegativeInt1—Number of measures measures[0], measures[1], ….
activeBooltrueparameterActiveActivates this block
deferredEvaluationBoolfalse—Evaluate in a scheduled update event instead of immediately.

Data inputs (silver sockets on the left)

ConnectorLabelAttributeTypeDefaultDescription
parameterActive—activeBooltrueActivates this block
parameters[0]P[0]—Variant—parameter triggers read on recompute, and itself triggers recompute if it changes

There are numParameters indexed parameters[…], numbered from 0; the table shows the default numParameters = 1.

Measures (silver sockets on the right)

ConnectorLabelDescriptionStatistics
measures[0]M[0]Measure 0—

There are numMeasures indexed measures[…], numbered from 0; the table shows the default numMeasures = 1.

↑ Contents

Aggregate Block ​

Reduces incoming value to an aggregate value, initialized with init. For example, a sum is attained with A+=V and init 0. The aggregate is reset to init when the reset parameter is changed to a non-zero value.

diagramdiagram

Attributes

AttributeTypeDefaultWire inputDescription
codeCode"A=V??A"—JavaScript code that combines the aggregate A with the incoming value V, for example A+=V.
initVariant—parameterInitInitial value for A
valueVariant—parameterValueInput value V, change triggers computation event
ignoreNaNBooltrue—Skip incoming NaN (not a number) values.

Data inputs (silver sockets on the left)

ConnectorLabelAttributeTypeDefaultDescription
parameterActive—activeBooltrueActivates this block
parameterValueVvalueVariant—Input value V, change triggers computation event
parameterInitIinitVariant—Initial value for A
parameterResetR— (wire only)Int0Reset when changed to a non-zero value

parameterReset is only driven by a wire; there is no attribute to set as a constant.

Measures (silver sockets on the right)

ConnectorLabelNameDescriptionStatistics
measureAggregateAaggregateAggregate value A—

↑ Contents

BrentOptimize Block ​

The Brent algorithm optimizes the given objective locally in the range [lower,upper]. The search sets the first guess to init if given. The current guess is adapted when a new run is started.

diagramdiagram

Attributes

AttributeTypeDefaultWire inputDescription
minimizeBooltrue—Minimize the objective; false maximizes it.
objectiveReal0parameterObjectiveObjective value
lowerReal−∞parameterLowerLower bound of the search interval
upperReal∞parameterUpperUpper bound of the search interval
initReallower + 0.382·(upper − lower), the golden-section point of the search interval (0 if the interval is unbounded)parameterInitInitial parameter
plotLogScaledBoolfalse—Plot the objective history on a logarithmic scale.

Data inputs (silver sockets on the left)

ConnectorLabelAttributeTypeDefaultDescription
parameterObjectiveVobjectiveReal0Objective value
parameterLowerminlowerReal−∞Lower bound of the search interval
parameterUppermaxupperReal∞Upper bound of the search interval
parameterInitIinitReallower + 0.382·(upper − lower), the golden-section point of the search interval (0 if the interval is unbounded)Initial parameter

Measures (silver sockets on the right)

ConnectorLabelNameDescriptionStatistics
measureGuessGguessParameter guess—
measureBestBbestBest guess found—

↑ Contents


Random Number Blocks ​

Random number blocks are value blocks that draw random variates from a probability distribution, for example for inter-arrival or service times. Each has its own seed, so runs are reproducible.

RandomUniform Block ​

Generates uniformly distributed random variates in the range [lower,upper).

diagramdiagram

Attributes

AttributeTypeDefaultWire inputDescription
seedNonNegativeInt0parameterSeedSeed value for the random number generator. If set to 0, the global generator is used.
lowerFiniteReal0parameterLowerLower value
upperFiniteReal1parameterUpperUpper value
floorBoolfalse—Round each variate down to a whole number.

Data inputs (silver sockets on the left)

ConnectorLabelAttributeTypeDefaultDescription
parameterSeedSseedNonNegativeInt0Seed value for the random number generator. If set to 0, the global generator is used.
parameterLowerminlowerFiniteReal0Lower value
parameterUppermaxupperFiniteReal1Upper value

Measures (silver sockets on the right)

ConnectorLabelNameDescriptionStatistics
measureRandomVariateVnextVariateRandom variate—
measureExpectedValueEVexpectedValueExpected value for the given parameterization, including the limits—
measureExpectedStdDevESDexpectedStdDevExpected standard deviation for the given parameterization, including the limits—

↑ Contents

RandomExponential Block ​

Generates exponentially distributed random variates adhering to the given mean µ, which is the inverse of the rate λ.

diagramdiagram

Attributes

AttributeTypeDefaultWire inputDescription
seedNonNegativeInt0parameterSeedSeed value for the random number generator. If set to 0, the global generator is used.
meanNonNegativeReal1parameterMeanMean µ=1/λ
lowerNonNegativeReal0parameterLowerLower value of the truncated distribution
upperNonNegativeReal∞parameterUpperUpper value of the truncated distribution
floorBoolfalse—Round each variate down to a whole number.

Data inputs (silver sockets on the left)

ConnectorLabelAttributeTypeDefaultDescription
parameterSeedSseedNonNegativeInt0Seed value for the random number generator. If set to 0, the global generator is used.
parameterMeanµmeanNonNegativeReal1Mean µ=1/λ
parameterLowerminlowerNonNegativeReal0Lower value of the truncated distribution
parameterUppermaxupperNonNegativeReal∞Upper value of the truncated distribution

Measures (silver sockets on the right)

ConnectorLabelNameDescriptionStatistics
measureRandomVariateVnextVariateRandom variate—
measureExpectedValueEVexpectedValueExpected value for the given parameterization, including the limits—
measureExpectedStdDevESDexpectedStdDevExpected standard deviation for the given parameterization, including the limits—

↑ Contents

RandomPoisson Block ​

Generates Poisson distributed random variates adhering to the given mean µ.

diagramdiagram

Attributes

AttributeTypeDefaultWire inputDescription
seedNonNegativeInt0parameterSeedSeed value for the random number generator. If set to 0, the global generator is used.
meanNonNegativeReal1parameterMeanMean µ
lowerReal−∞parameterLowerLower value of the truncated distribution
upperNonNegativeReal∞parameterUpperUpper value of the truncated distribution

Data inputs (silver sockets on the left)

ConnectorLabelAttributeTypeDefaultDescription
parameterSeedSseedNonNegativeInt0Seed value for the random number generator. If set to 0, the global generator is used.
parameterMeanµmeanNonNegativeReal1Mean µ
parameterLowerminlowerReal−∞Lower value of the truncated distribution
parameterUppermaxupperNonNegativeReal∞Upper value of the truncated distribution

Measures (silver sockets on the right)

ConnectorLabelNameDescriptionStatistics
measureRandomVariateVnextVariateRandom variate—
measureExpectedValueEVexpectedValueExpected value for the given parameterization, including the limits—
measureExpectedStdDevESDexpectedStdDevExpected standard deviation for the given parameterization, including the limits—

↑ Contents

RandomDiscrete Block ​

Generates discrete random variates: outcome i is drawn with probability probabilities[i] and yields values[i], or i itself if values is empty, i.e., 0,1,…,n-1 for n probabilities.

The probabilities are non-negative weights normalized by their sum. A non-empty values list must have the same length.

diagramdiagram

Attributes

AttributeTypeDefaultWire inputDescription
seedNonNegativeInt0parameterSeedSeed value for the random number generator. If set to 0, the global generator is used.
probabilitiesArray"0.5,0.5"—Non-negative weights of the outcomes, normalized by their sum, e.g. [0.2, 0.5, 0.3].
valuesArray0, 1, …, n−1 for n probabilities—Value of each outcome, same length as probabilities; empty means 0, 1, …, n−1.
labelsArray""—Optional name of each outcome, e.g. ["walk-in", "appointment"]; display only, a length mismatch is ignored.

Data inputs (silver sockets on the left)

ConnectorLabelAttributeTypeDefaultDescription
parameterSeedSseedNonNegativeInt0Seed value for the random number generator. If set to 0, the global generator is used.

Measures (silver sockets on the right)

ConnectorLabelNameDescriptionStatistics
measureRandomVariateVnextVariateRandom variate—
measureExpectedValueEVexpectedValueExpected value for the given parameterization, including the limits—
measureExpectedStdDevESDexpectedStdDevExpected standard deviation for the given parameterization, including the limits—

↑ Contents

RandomContinuous Block ​

Generates continuous random variates from an empirical distribution by the inversion method: the cumulative distribution function F is linear between support points, and each variate is F⁻¹(u) for a uniform u.

Without frequencies, values are raw measurements in any order: every gap between the sorted values gets the same probability (Law & Kelton), so tied values form a point mass. To let variates fall outside the observed range (Banks et al.), add the extra support point to values, e.g. 0 for durations.

With frequencies, a histogram is given: values are its k+1 non-decreasing bin edges and frequencies the k relative frequencies of the bins, normalized by their sum; variates are uniform within each bin, and a bin of zero width is a point mass.

In both cases lower/upper truncate the distribution like for the other random blocks: a bin or gap cut by a bound keeps the share of its probability that lies inside, and a point mass is kept if it lies within the bounds.

diagramdiagram

Attributes

AttributeTypeDefaultWire inputDescription
seedNonNegativeInt0parameterSeedSeed value for the random number generator. If set to 0, the global generator is used.
valuesArray"0,1"—Without frequencies: raw measurements in any order, each gap between the sorted values gets equal probability, e.g. [3.1, 4.7, 5.2, 8.0]; add an extra support point such as 0 to extend the range (Banks). With frequencies: the k+1 histogram bin edges, non-decreasing, a zero-width bin is a point mass.
frequenciesArray""—Optional; non-empty selects histogram mode: non-negative relative frequency of each bin, one fewer than values, normalized by their sum.
lowerReal−∞parameterLowerLower value of the truncated distribution, in both modes.
upperReal∞parameterUpperUpper value of the truncated distribution, in both modes.

Data inputs (silver sockets on the left)

ConnectorLabelAttributeTypeDefaultDescription
parameterSeedSseedNonNegativeInt0Seed value for the random number generator. If set to 0, the global generator is used.
parameterLowerminlowerReal−∞Lower value of the truncated distribution
parameterUppermaxupperReal∞Upper value of the truncated distribution

Measures (silver sockets on the right)

ConnectorLabelNameDescriptionStatistics
measureRandomVariateVnextVariateRandom variate—
measureExpectedValueEVexpectedValueExpected value for the given parameterization, including the limits—
measureExpectedStdDevESDexpectedStdDevExpected standard deviation for the given parameterization, including the limits—

↑ Contents

RandomPiecewiseLinear Block ​

Generates continuous random variates whose density is piecewise linear: values are k+1 non-decreasing points and densities the density at each point, linear in between and normalized by the total area. A repeated value is a jump of the density, e.g. values [0,1,1,2] with densities [1,1,3,3] is a step. The triangular distribution with lower, mode, upper is values [lower,mode,upper] with densities [0,1,0].

lower/upper truncate the distribution like for the other random blocks: the density is cut at the bounds.

diagramdiagram

Attributes

AttributeTypeDefaultWire inputDescription
seedNonNegativeInt0parameterSeedSeed value for the random number generator. If set to 0, the global generator is used.
valuesArray"0,1"—k+1 non-decreasing points, at least 2, e.g. [0, 1, 3, 4]; a repeated value is a jump of the density there.
densitiesArray"1,1"—Non-negative density at each point, same length as values, linear in between and normalized by the total area, e.g. [0, 2, 1, 0]; at a jump the first and last density of the repeated value are the left and right limits.
lowerReal−∞parameterLowerLower value of the truncated distribution: the density is cut there.
upperReal∞parameterUpperUpper value of the truncated distribution: the density is cut there.

Data inputs (silver sockets on the left)

ConnectorLabelAttributeTypeDefaultDescription
parameterSeedSseedNonNegativeInt0Seed value for the random number generator. If set to 0, the global generator is used.
parameterLowerminlowerReal−∞Lower value of the truncated distribution
parameterUppermaxupperReal∞Upper value of the truncated distribution

Measures (silver sockets on the right)

ConnectorLabelNameDescriptionStatistics
measureRandomVariateVnextVariateRandom variate—
measureExpectedValueEVexpectedValueExpected value for the given parameterization, including the limits—
measureExpectedStdDevESDexpectedStdDevExpected standard deviation for the given parameterization, including the limits—

↑ Contents

RandomGamma Block ​

Generates gamma distributed random variates adhering to the given shape k and scale θ.

diagramdiagram

Attributes

AttributeTypeDefaultWire inputDescription
seedNonNegativeInt0parameterSeedSeed value for the random number generator. If set to 0, the global generator is used.
shapeNonNegativeReal1parameterShapeShape k of gamma distribution
scaleNonNegativeReal1parameterScaleScale θ of gamma distribution
lowerReal−∞parameterLowerLower value of the truncated distribution
upperNonNegativeReal∞parameterUpperUpper value of the truncated distribution

Data inputs (silver sockets on the left)

ConnectorLabelAttributeTypeDefaultDescription
parameterSeedSseedNonNegativeInt0Seed value for the random number generator. If set to 0, the global generator is used.
parameterShapekshapeNonNegativeReal1Shape k of gamma distribution
parameterScaleθscaleNonNegativeReal1Scale θ of gamma distribution
parameterLowerminlowerReal−∞Lower value of the truncated distribution
parameterUppermaxupperNonNegativeReal∞Upper value of the truncated distribution

Measures (silver sockets on the right)

ConnectorLabelNameDescriptionStatistics
measureRandomVariateVnextVariateRandom variate—
measureExpectedValueEVexpectedValueExpected value for the given parameterization, including the limits—
measureExpectedStdDevESDexpectedStdDevExpected standard deviation for the given parameterization, including the limits—

↑ Contents

RandomWeibull Block ​

Generates Weibull distributed random variates adhering to the given shape k and scale θ.

diagramdiagram

Attributes

AttributeTypeDefaultWire inputDescription
seedNonNegativeInt0parameterSeedSeed value for the random number generator. If set to 0, the global generator is used.
shapeNonNegativeReal1parameterShapeShape k of Weibull distribution
scaleNonNegativeReal1parameterScaleScale θ of Weibull distribution
lowerReal−∞parameterLowerLower value of the truncated distribution
upperNonNegativeReal∞parameterUpperUpper value of the truncated distribution

Data inputs (silver sockets on the left)

ConnectorLabelAttributeTypeDefaultDescription
parameterSeedSseedNonNegativeInt0Seed value for the random number generator. If set to 0, the global generator is used.
parameterShapekshapeNonNegativeReal1Shape k of Weibull distribution
parameterScaleθscaleNonNegativeReal1Scale θ of Weibull distribution
parameterLowerminlowerReal−∞Lower value of the truncated distribution
parameterUppermaxupperNonNegativeReal∞Upper value of the truncated distribution

Measures (silver sockets on the right)

ConnectorLabelNameDescriptionStatistics
measureRandomVariateVnextVariateRandom variate—
measureExpectedValueEVexpectedValueExpected value for the given parameterization, including the limits—
measureExpectedStdDevESDexpectedStdDevExpected standard deviation for the given parameterization, including the limits—

↑ Contents

RandomNormal Block ​

Generates normally distributed random variates adhering to the given mean µ and standard deviation stddev σ.

diagramdiagram

Attributes

AttributeTypeDefaultWire inputDescription
seedNonNegativeInt0parameterSeedSeed value for the random number generator. If set to 0, the global generator is used.
meanReal0parameterMeanMean µ (location) of normal distribution
stddevNonNegativeReal1parameterStddevStandard deviation σ (shape) of normal distribution
lowerReal−∞parameterLowerLower value of the truncated distribution
upperReal∞parameterUpperUpper value of the truncated distribution

Data inputs (silver sockets on the left)

ConnectorLabelAttributeTypeDefaultDescription
parameterSeedSseedNonNegativeInt0Seed value for the random number generator. If set to 0, the global generator is used.
parameterMeanµmeanReal0Mean µ (location) of normal distribution
parameterStddevσstddevNonNegativeReal1Standard deviation σ (shape) of normal distribution
parameterLowerminlowerReal−∞Lower value of the truncated distribution
parameterUppermaxupperReal∞Upper value of the truncated distribution

Measures (silver sockets on the right)

ConnectorLabelNameDescriptionStatistics
measureRandomVariateVnextVariateRandom variate—
measureExpectedValueEVexpectedValueExpected value for the given parameterization, including the limits—
measureExpectedStdDevESDexpectedStdDevExpected standard deviation for the given parameterization, including the limits—

↑ Contents

RandomLognormal Block ​

Generates log-normally distributed random variates adhering to the given mean µ and standard deviation stddev σ.

Here mean is the location parameter µ of the underlying normal, not the average of the variates: the median is exp(mean) and the arithmetic mean is larger still. To target an average value, do not set mean to it directly.

diagramdiagram

Attributes

AttributeTypeDefaultWire inputDescription
seedNonNegativeInt0parameterSeedSeed value for the random number generator. If set to 0, the global generator is used.
meanReal1parameterMeanLocation µ (exp(mean)) of lognormal distribution
stddevNonNegativeReal1parameterStddevStandard deviation σ (shape) of lognormal distribution
lowerReal−∞parameterLowerLower value of the truncated distribution
upperNonNegativeReal∞parameterUpperUpper value of the truncated distribution

Data inputs (silver sockets on the left)

ConnectorLabelAttributeTypeDefaultDescription
parameterSeedSseedNonNegativeInt0Seed value for the random number generator. If set to 0, the global generator is used.
parameterMeanµmeanReal1Location µ (exp(mean)) of lognormal distribution
parameterStddevσstddevNonNegativeReal1Standard deviation σ (shape) of lognormal distribution
parameterLowerminlowerReal−∞Lower value of the truncated distribution
parameterUppermaxupperNonNegativeReal∞Upper value of the truncated distribution

Measures (silver sockets on the right)

ConnectorLabelNameDescriptionStatistics
measureRandomVariateVnextVariateRandom variate—
measureExpectedValueEVexpectedValueExpected value for the given parameterization, including the limits—
measureExpectedStdDevESDexpectedStdDevExpected standard deviation for the given parameterization, including the limits—

↑ Contents

RandomPERT Block ​

Generates PERT distributed random variates in the range [lower,upper] for an expert estimate: at least lower, most likely mode, at most upper, where lower≤mode≤upper. It is a beta distribution rescaled to the range with mean (lower+shape·mode+upper)/(shape+2).

The shape λ is the weight of the mode: 4 is the classic PERT, larger values concentrate the variates more around the mode, and 0 is the uniform distribution.

diagramdiagram

Attributes

AttributeTypeDefaultWire inputDescription
seedNonNegativeInt0parameterSeedSeed value for the random number generator. If set to 0, the global generator is used.
lowerReal0parameterLowerLower value: at least
modeReal(lower + upper)/2parameterModeMode value: most likely
upperReal1parameterUpperUpper value: at most
shapeNonNegativeReal4parameterShapeShape λ: weight of the mode, 4 is the classic PERT, 0 is uniform

Data inputs (silver sockets on the left)

ConnectorLabelAttributeTypeDefaultDescription
parameterSeedSseedNonNegativeInt0Seed value for the random number generator. If set to 0, the global generator is used.
parameterLowerlowerlowerReal0Lower value: at least
parameterModemodemodeReal(lower + upper)/2Mode value: most likely
parameterUpperupperupperReal1Upper value: at most
parameterShapeλshapeNonNegativeReal4Shape λ: weight of the mode, 4 is the classic PERT, 0 is uniform

Measures (silver sockets on the right)

ConnectorLabelNameDescriptionStatistics
measureRandomVariateVnextVariateRandom variate—
measureExpectedValueEVexpectedValueExpected value for the given parameterization, including the limits—
measureExpectedStdDevESDexpectedStdDevExpected standard deviation for the given parameterization, including the limits—

↑ Contents


Report Blocks ​

Report blocks display simulation data and compute statistics from the values wired into their parameter array parameters[0], parameters[1], ….

Chart Block ​

Shows a stairstep line chart of the given input parameters P. Each input is drawn in another color.

With multiple replications or editions, the x-axis lays them out side-by-side by default. Set overlayReplications to superimpose all replications within an edition into one window, and overlayEditions to superimpose editions. Setting both yields a spaghetti plot where every trajectory overlaps in a single window. Set clearBetweenReplications or clearBetweenEditions to drop the earlier runs' series whenever a new replication or edition starts.

By default, the x-axis is simulation time. Unset timeAbscissa to switch to a running observation count instead: each appended sample advances x by one, regardless of the simulation time at which it arrived. Useful when interesting structure is compressed by sporadic or bursty event timing — e.g. a queue length that updates rarely between long idle periods. Slot widths are sized by the longest leaf's observation count, leaving blank tails for shorter ones; raw (time, value) data is retained so toggling is lossless.

diagramdiagram

Attributes

AttributeTypeDefaultWire inputDescription
numParametersPositiveInt1—Number of data inputs parameters[0], parameters[1], ….
overlayReplicationsBoolfalse—Draw all replications of an edition on top of each other.
overlayEditionsBoolfalse—Draw all editions on top of each other.
clearBetweenReplicationsBoolfalse—Drop the earlier data when a new replication starts.
clearBetweenEditionsBoolfalse—Drop the earlier data when a new edition starts.
timeAbscissaBooltrue—The x-axis is simulation time; false uses a running observation count.
logScaleBoolfalse—Logarithmic y-axis.
sameScaleBoolfalse—All inputs share one y range.
activeBooltrueparameterActiveActivates this block

Data inputs (silver sockets on the left)

ConnectorLabelAttributeTypeDefaultDescription
parameterActive—activeBooltrueActivates this block
parameters[0]P[0]—Variant—Parameter 0

There are numParameters indexed parameters[…], numbered from 0; the table shows the default numParameters = 1.

↑ Contents

Histogram Block ​

Displays a histogram of the given input parameters P. Each input is drawn in another color.

diagramdiagram

Attributes

AttributeTypeDefaultWire inputDescription
numParametersPositiveInt1—Number of data inputs parameters[0], parameters[1], ….
activeBooltrueparameterActiveActivates this block
resetOnRunStartBoolfalse—Start a new histogram with every run; false collects all runs into one histogram.
timeAverageBoolfalse—Weight each value by how long it held, for levels such as a queue length.
numBucketsNonNegativeInt0—Number of buckets; 0 chooses it automatically.

Data inputs (silver sockets on the left)

ConnectorLabelAttributeTypeDefaultDescription
parameterActive—activeBooltrueActivates this block
parameters[0]P[0]—Variant—Parameter 0

There are numParameters indexed parameters[…], numbered from 0; the table shows the default numParameters = 1.

↑ Contents

Report Block ​

Collects a protocol of the given input parameters P.

diagramdiagram

Attributes

AttributeTypeDefaultWire inputDescription
numParametersPositiveInt1—Number of data inputs parameters[0], parameters[1], ….
activeBooltrueparameterActiveActivates this block
clearBetweenReplicationsBooltrue—Drop the earlier data when a new replication starts.
clearBetweenEditionsBooltrue—Drop the earlier data when a new edition starts.

Data inputs (silver sockets on the left)

ConnectorLabelAttributeTypeDefaultDescription
parameterActive—activeBooltrueActivates this block
parameters[0]P[0]—Variant—Parameter 0

There are numParameters indexed parameters[…], numbered from 0; the table shows the default numParameters = 1.

↑ Contents

Statistics Block ​

Computes mean values and confidence intervals of the given input parameters P.

The mean is an arithmetic mean – unless timeAverage is set: then it is time-weighted, which suits levels that vary over time, such as a queue length.

If multiple runs or batches are available, confidence levels are calculated using the Student t distribution, with the radius by the confidence attribute. The confidence must be in the range (0,1). The confidence attribute is the tail probability α, not the coverage: set it to 0.05 for a 95% interval or 0.01 for a 99% interval, since the reported interval is 1−confidence. If only a single run or batch is available, no confidence intervals are calculated.

The output measures are laid out in two contiguous blocks, not interleaved: for numParameters inputs, measures[0]…measures[numParameters−1] are the per-input means labelled M[0]…M[numParameters−1], and measures[numParameters]…measures[2·numParameters−1] are the means of means labelled MM[0]…MM[numParameters−1]. So the mean of the second input is measures[1] (M[1]) while its mean of means is measures[numParameters+1] (MM[1]).

Advanced options. Instead of a mean, setting cumulative yields the difference between start and end values.

Setting quantile to a value in [0,1] reports a per-batch quantile instead of a mean (0 = min, 1 = max); cross-batch aggregation and the confidence interval are computed the same way. With timeAverage the per-batch quantile is time-weighted by segment duration; otherwise Type-7 linear interpolation between order statistics is used. quantile overrides cumulative.

The timeWidths flag controls how warmupWidth and batchWidth are interpreted: when true (default), both are simulation-time durations; when false, both are record counts. Observations before the warmup are not considered in the statistics — in time mode that means records with time < warmupWidth; in count mode it means the first warmupWidth records of each replication.

When warmupMSER is set and warmupWidth is 0, the warmup is chosen automatically by the MSER-5 rule (White 1997; Hoad/Robinson/Davies 2010), applied to ensemble-averaged chunks of 5 raw observations per parameter. The maximum suggestion across parameters is written into warmupWidth (a simulation time in time mode, a record count in count mode), triggering a recalculation. That attribute can also be flipped on after the simulation has run: as long as warmupWidth is 0, MSER will be evaluated and applied retroactively. Switching it off again resets warmupWidth to 0, unless you have changed warmupWidth yourself in the meantime.

Note: when warmupMSER picks the warmup from the same data that the statistics are computed on, the resulting confidence interval is mildly anti-conservative (slightly too narrow), because the same observations are used to both choose the truncation and estimate the mean. For tight-precision claims, use a pilot edition to choose the warmup and apply it to a fresh production edition.

The batch means procedure is configured using batchWidth and numBatches. In time-mode batchWidth denotes the Δt per batch; in count-mode batchWidth denotes the number of consecutive records per batch and is resolved post-hoc — leave it NaN to derive from numBatches, or set it explicitly (which then takes precedence over numBatches).

Setting ar1Correction widens the confidence interval when consecutive batch means are positively correlated: the variance of the mean is multiplied by (1+ρ)/(1−ρ), where ρ is the lag-1 autocorrelation of the batch means. Use it when the batches are short compared with how long the data stay correlated.

A recalculation after the run (a changed setting, or warmupMSER writing its warmup) only updates this block's own view: the wired blocks keep what was sent during the run; run again to pass the new results on.

diagramdiagram

Attributes

AttributeTypeDefaultWire inputDescription
numParametersPositiveInt1—Number of data inputs parameters[0], parameters[1], ….
activeBooltrueparameterActiveActivates this block
confidenceReal010.05—Tail probability α of the confidence interval: 0.05 gives a 95% interval.
quantileReal01ClosedNaN—Report this per-batch quantile (0 = min, 1 = max) instead of a mean; NaN reports the mean.
timeAverageBoolfalse—Weight each value by how long it held, for levels such as a queue length.
cumulativeBoolfalse—Report the increase from start to end instead of a mean.
warmupWidthNonNegativeFiniteReal0—Warm-up to discard: a simulation time, or a record count when timeWidths is false.
warmupMSERBoolfalse—Choose the warm-up automatically by the MSER-5 rule while warmupWidth is 0.
numBatchesPositiveInt1—Number of batches per run for the batch means method.
batchWidthNonNegativeReal(duration − warmupWidth)/numBatches, or NaN when timeWidths is false—Width of a batch: a simulation-time span, or a record count when timeWidths is false; NaN derives it from numBatches.
timeWidthsBooltrue—warmupWidth and batchWidth are simulation times; false makes them record counts.
ar1CorrectionBoolfalse—Widen the confidence interval for positively correlated batch means.

Data inputs (silver sockets on the left)

ConnectorLabelAttributeTypeDefaultDescription
parameterActive—activeBooltrueActivates this block
parameters[0]P[0]—Variant—Parameter 0

There are numParameters indexed parameters[…], numbered from 0; the table shows the default numParameters = 1.

Measures (silver sockets on the right)

ConnectorLabelDescriptionStatistics
measures[0]M[0]Last mean value—
measures[1]MM[0]Last mean of means—

There are 2·numParameters (the means M[…] first, then the means of means MM[…]) indexed measures[…], numbered from 0; the table shows the default numParameters = 1.

↑ Contents

SummaryStatistics Block ​

Estimates the mean and confidence interval of a sample of results, such as the batch means M of a Statistics block wired into its input V.

Every incoming value is one observation: there is no time weighting, warmup or batching. Values are grouped by edition and replication as they arrive, kept in their order within a replication; NaN values are ignored. At the end of each edition, the mean, confidence interval and standard deviation are computed exactly as Statistics computes its mean of means MM from its batch means: per replication the mean of its values, over the replications the Student t interval with R−1 degrees of freedom, or with a single replication with n−1 from its values. So Statistics.M wired in reproduces MM and its interval, and a Function in between (e.g. M[0]=P[0]<=20?1:0) gives the estimate of a derived result.

confidence is the tail probability α (0.05 gives a 95% interval). ar1Correction widens the interval when consecutive values within a replication are positively correlated, as in Statistics. Setting quantile to a value in [0,1] (0 = min, 1 = max) adds the measure Q: the sample quantile per edition over the same unit as the interval, the replication means (the values with a single replication), without a confidence interval.

The measures are the mean, the half-width ± and the limits L and U of the confidence interval, the standard deviation SD of the replication means (of the values with a single replication), the number N of values used and, with quantile set, the quantile Q. Values arriving outside a replication, such as the MM of a Statistics, are ignored. The results of an edition are set at its end together with the MM of the Statistics blocks, before edition-end blocks such as the optimizers read their inputs.

What flowed during the run is what the wired blocks received: a recalculation after the run only updates the view of the recalculating block, such as this one after confidence, ar1Correction or quantile changed, or a Statistics after a setting changed or after warmupMSER chose its warmup at the end of the run (this block then keeps the run's estimate). Run again to pass the new results on (MSER's warmup then holds from the start).

diagramdiagram

Attributes

AttributeTypeDefaultWire inputDescription
activeBooltrueparameterActiveActivates this block
confidenceReal010.05—Tail probability α of the confidence interval: 0.05 gives a 95% interval.
quantileReal01ClosedNaN—NaN (default): no quantile; otherwise the measure Q is this quantile in [0,1] (0 = min, 1 = max) of the replication means (of the values with a single replication), per edition, without a confidence interval.
ar1CorrectionBoolfalse—Widen the interval by (1+ρ)/(1−ρ) for a positive lag-1 autocorrelation ρ of the values within a replication.

Data inputs (silver sockets on the left)

ConnectorLabelAttributeTypeDefaultDescription
parameterActive—activeBooltrueActivates this block
parameterValueV—Variant—Result value, one observation each (e.g. Statistics M)

Measures (silver sockets on the right)

ConnectorLabelNameDescriptionStatistics
measureMeanMmeanMean of the last edition—
measureHalfWidth±halfWidthConfidence interval half-width of the mean—
measureLowerLlowerLower confidence limit of the mean—
measureUpperUupperUpper confidence limit of the mean—
measureSdSDsdStandard deviation of the replication means (of the values with one replication)—
measureNNnNumber of values used—
measureQuantileQquantileQuantile of the replication means (of the values with one replication), with quantile set—

↑ Contents

EnsemblePlot Block ​

Displays a Welch plot of the given input parameters P, used to identify the warm-up (transient) phase before steady state. Needs multiple replications to be meaningful; about 5 or more is typical.

Across replications, each input is ensemble-averaged by observation index — Ȳⱼ = (1/R) Σᵢ Yᵢⱼ — then smoothed with a moving average of half-width windowWidth (window size 2w+1, shrinking near the edges; windowWidth = 0 disables smoothing and plots the raw ensemble mean). The warm-up duration is read off where the smoothed curve flattens. With the default batchWidth = 1 this is Welch's (1983) canonical procedure: one plot point per observation index. Setting batchWidth = N > 1 first averages N consecutive observations into each plot point (batch means; Law, Simulation Modeling & Analysis), a standard refinement for legibility on long runs that preserves the same warm-up reading. Unlike the Statistics block (which defaults to time-defined batching in both modes via timeWidths for cross-parameter comparability), EnsemblePlot batches by sample count in obs mode — matching Welch's obs-indexed definition and keeping batch variance homogeneous through the early ramp-up region where the warm-up diagnostic matters most. As a rule of thumb, keep windowWidth below ¼ of the resulting plot's bucket count to avoid over-smoothing.

When timeAverage is set, buckets are time-weighted across the simulation duration (suitable for continuous-time state variables like queue length); batchWidth then denotes the Δt per bucket and auto-defaults to duration/100. Otherwise, the canonical observation-indexed Welch procedure is used, bucketing each replication's observations into non-overlapping batches of size batchWidth (suitable for per-event observations like waiting times). By default ragged is set, so bucketing extends to ⌊max(mᵢ)/N⌋ batches and each bucket is averaged only over the replications that reach it (tail buckets noisier but no data discarded). With timeAbscissa, the per-bucket mean time is clamped to monotonic at rep-dropout boundaries — visible as small plateaus marking where the contributing-rep count drops. Turn ragged off for canonical Welch with uniform R per bucket (cap at ⌊min(mᵢ)/N⌋, longer reps' tails dropped).

When timeAbscissa is set (the default), each obs-indexed batch is positioned on the time axis at the mean simulation time of its constituent observations (averaged across replications), so the x-axis is directly comparable with other time-indexed plots; otherwise batches are placed at evenly-spaced positions across [0, duration]. timeAbscissa has no effect when timeAverage is set, since time-averaged buckets are already time-defined.

When showMser is set, a dashed vertical line per parameter marks the truncation point recommended by MSER-5 (White 1997; Hoad/Robinson/Davies 2010), computed on the ensemble bucket means — useful for confirming the visually-identified warmup. For an automated warmup applied to downstream statistics, set the Statistics block's warmupMSER attribute instead, which evaluates MSER-5 on raw observations and writes the suggestion into warmupWidth. That attribute can also be flipped on after the simulation has run: as long as warmupWidth is 0, MSER will be evaluated and applied retroactively.

When showRaw is set, the un-smoothed ensemble mean is drawn as a faint underlay behind the smoothed line, revealing what the moving average is removing.

All knobs (batchWidth, ragged, windowWidth, timeAverage, timeAbscissa) can be changed after the simulation has finished and the plot re-derives from retained raw data.

diagramdiagram

Attributes

AttributeTypeDefaultWire inputDescription
numParametersPositiveInt1—Number of data inputs parameters[0], parameters[1], ….
batchWidthPositiveFiniteReal1, or duration/100 when timeAverage is set—Observations per plot point, or the time span per bucket when timeAverage is set.
raggedBooltrue—Average each bucket only over the replications that reach it; false cuts all replications to the shortest one.
windowWidthNonNegativeInt5—Half-width w of the moving average (window 2w+1); 0 disables smoothing.
timeAverageBoolfalse—Weight each value by how long it held, for levels such as a queue length.
timeAbscissaBooltrue—Place each point at the mean simulation time of its observations; false spaces the points evenly.
showMserBooltrue—Mark the MSER-5 truncation point with a dashed line.
showRawBoolfalse—Draw the unsmoothed ensemble mean underneath.
logScaleBoolfalse—Logarithmic y-axis.
sameScaleBoolfalse—All inputs share one y range; false gives each its own.
activeBooltrueparameterActiveActivates this block

Data inputs (silver sockets on the left)

ConnectorLabelAttributeTypeDefaultDescription
parameterActive—activeBooltrueActivates this block
parameters[0]P[0]—Variant—Parameter 0

There are numParameters indexed parameters[…], numbered from 0; the table shows the default numParameters = 1.

↑ Contents


Steering ​

Every model has one Steering block. It holds the run settings: how long the simulation runs, how many replications and editions it makes, the global seed and the animation speed.

Steering Block ​

Settings for the simulation like duration, number of replications, global seed, and simulation speed. Display of current virtual time and the current replication number. When input active is set to false, the simulation is halted.

diagramdiagram

Attributes

AttributeTypeDefaultWire inputDescription
durationNonNegativeReal10000parameterDurationDuration
editionsPositiveInt1parameterEditionsEditions
replicationsPositiveInt1parameterReplicationsReplications
seedPositiveInttime-based, so every start differsparameterSeedGlobal seed
speedPositiveReal1parameterSpeedSpeed (velocity) of animation
activeBooltrueparameterActiveActivates this block

Data inputs (silver sockets on the left)

ConnectorLabelAttributeTypeDefaultDescription
parameterActive—activeBooltrueActivates this block
parameterDurationDdurationNonNegativeReal10000Duration
parameterEditionsEeditionsPositiveInt1Editions
parameterReplicationsRreplicationsPositiveInt1Replications
parameterSeedSseedPositiveInttime-based, so every start differsGlobal seed
parameterSpeedVspeedPositiveReal1Speed (velocity) of animation

Measures (silver sockets on the right)

ConnectorLabelDescriptionStatistics
measureCurrentVirtualTimeTCurrent virtual time—
measureFinishedFCurrent simulation run finished?—
measureEditionENCurrent edition number—
measureReplicationRNCurrent replication number—

↑ Contents


Glossary ​

Attribute: A property of a block that you set inside its braces, such as capacity: 5.

Batch means: A way to get a confidence interval from one long run: the run is cut into batches, and the batch averages are treated as independent observations.

Block: A building block of a model, such as Arrive, Queue or Statistics. Each has an id.

Confidence interval: A range around an estimated mean that contains the true mean with a chosen probability, such as 95%.

Connector: A Pipe or Wire that links two sockets. It is written with from and to.

Edition: One configuration of the model. Several editions run the model with different settings, for example to compare designs or to optimize.

Ensemble: All replications of an edition taken together. An ensemble average averages them at the same observation index or time.

Entity: An object that moves through the entity blocks, such as a customer or a part.

Entity attribute: A named value carried by an entity, such as lastWait. See Entity Attributes.

Measure: A value that a block reports at a data socket on its right, such as a queue length.

MSER-5: A rule that chooses the warm-up length automatically: it cuts off the start of the run where that makes the remaining data most stable, working on averages of 5 observations.

Parameter: A data input of a block, on its left. A Wire can drive it during the run.

Renege: To give up waiting: a queued entity leaves through outRenege when its renege duration has passed.

Replication: A repeated run of the same edition with different random numbers. Results are averaged over the replications.

Seed: The start value of a random number generator. The same seed gives the same random numbers, so runs can be repeated.

Socket: A connection point of a block: green entity sockets for pipes, silver data sockets for wires.

Sojourn time: The total time an entity spends in the model, from its creation until it leaves.

Time-weighted: Averaged over time: each value counts as long as it held. Right for levels such as a queue length.

Variate: One random number drawn from a probability distribution.

Warm-up: The start phase of a run, before the model settles into a steady state. It is usually left out of the statistics.

Welch plot: A plot of the ensemble average over time, smoothed with a moving average. The point where it flattens shows the end of the warm-up. See the EnsemblePlot block.

↑ Contents