Block reference¶
One section per block type, from nagasim/core/block_registry.py. Types marked editor-only never run: the engine flattens them away before a run.
ASSIGN¶
Ordered list of assignments: each is {"target": "entity.<attr>" | "entity.agent.<attr>" | "<variable>", "expr": "<expression>"}. Assignments run in order, so a later one sees what an earlier one wrote. Targets and expressions both go through core/expressions.py -- a model file never executes Python.
| Parameter | Type | Default | Required | Quantity | Unit key | Description |
|---|---|---|---|---|---|---|
assignments |
list | [] |
Ordered list of {"target": "entity. |
Outputs: 1.
BATCH¶
Groups entities by count: puts each arrival in the block's store and, as soon as batch_size items are waiting, takes exactly that many atomically to form one batch entity. Members leave live_entities and carry in_batch until a SEPARATE splits the batch again. With max_wait set, a PARTIAL batch leaves too: the timer is armed by the arrival that starts a new group and releases whatever is waiting once the oldest member has waited that long. TIE RULE: a batch that fills in the same instant as the timer expires wins and the timer releases nothing -- the same zero-delay re-check reneging uses, so the outcome never depends on the order SimPy happened to schedule two events at one timestamp.
| Parameter | Type | Default | Required | Quantity | Unit key | Description |
|---|---|---|---|---|---|---|
batch_size |
int | 2 |
count | Number of entities grouped into one batch entity. | ||
batched_entity_type |
str | 'BATCH' |
Entity type assigned to the batch entity. | |||
max_wait |
str | '' |
time | max_wait_time_unit |
How long a partial batch waits before it leaves anyway, e.g. "30" or "entity.deadline"; measured from the arrival that started the group. A batch that fills in the same instant wins. Empty, 0 or less = wait for a full batch for ever. | |
max_wait_time_unit |
str | 'base' |
Unit max_wait is expressed in: "base" (the model's own unit) or one of seconds/minutes/hours/days. |
Outputs: 1.
BUFFER¶
A finite number of places between two stations; when they are all taken the upstream machine stays blocked, holding its finished part.
| Parameter | Type | Default | Required | Quantity | Unit key | Description |
|---|---|---|---|---|---|---|
capacity |
int | 1 |
yes | count | Places in the buffer, 0 or more. A part takes one on the way in and holds it until the next station accepts it, so an upstream machine blocks while the buffer is full. 0 means no place at all (blocking after service with no buffer); for an unlimited queue, do not draw a buffer. | |
level |
str | '' |
Optional level whose value mirrors the buffer's content, so an asset can draw it as a fill indicator. Empty = no level. |
Outputs: 1.
CONVEYOR¶
A belt segment entities ride from one end to the other.
| Parameter | Type | Default | Required | Quantity | Unit key | Description |
|---|---|---|---|---|---|---|
length |
float | 0.0 |
length | length_unit |
Belt length in layout units. 0 takes the network distance between from_node and to_node. |
|
length_unit |
str | 'base' |
Unit of length: "base" (the model's) or one of its quantity's units. |
|||
speed |
float | 1.0 |
yes | speed | speed_unit |
Belt speed, length units per model time unit. |
speed_unit |
str | 'base' |
Unit of speed: "base" (the model's) or one of its quantity's units. |
|||
spacing |
float | 1.0 |
yes | length | spacing_unit |
Belt length one entity occupies; capacity is floor(length / spacing) and the entry rhythm is spacing / speed. |
spacing_unit |
str | 'base' |
Unit of spacing: "base" (the model's) or one of its quantity's units. |
|||
accumulating |
bool | True |
True: a blocked entity stops and the others pack behind it. False: the whole belt stops while the exit is blocked. | |||
exit_resource |
str | '' |
Resource an entity must take to leave the belt -- the end stop that makes accumulation happen. It carries the resource onward, so release it downstream (a PROCESS with action "Delay Release"). Empty: no end stop. Either way, a belt that feeds another belt keeps its end part until that belt has room (back-pressure). | |||
from_node |
str | '' |
Path-network node the belt starts at (drawing, and the length when length is 0). |
|||
to_node |
str | '' |
Path-network node the belt ends at. |
Outputs: 1.
CREATE¶
Entity source. Either samples the inter-arrival gap from distribution (arrival_mode = "Interarrival", the classic behaviour) or drives a non-homogeneous Poisson process from an arrival Schedule by thinning (arrival_mode = "Schedule"). Every model needs at least one CREATE block.
| Parameter | Type | Default | Required | Quantity | Unit key | Description |
|---|---|---|---|---|---|---|
e_type |
str | 'DEFAULT' |
Entity type assigned to every entity this block creates. | |||
arrival_mode |
str | 'Interarrival' |
"Interarrival": sample the gap from distribution. "Schedule": a non-homogeneous Poisson process driven by schedule_name. "Orders": release the model's declared orders, each at its own release time with its due date, quantity and routing. |
|||
schedule_name |
str | '' |
Name of an arrival Schedule to drive from, when arrival_mode is "Schedule". | |||
distribution |
str | 'Constant' |
Name of a registered distribution (see the distribution reference). | |||
dist_params |
dict | {'value': 1.0} |
time | time_unit |
Parameters for distribution, by name (e.g. {"rate": 0.5} for Exponential). |
|
time_unit |
str | 'base' |
Unit the sampled duration is expressed in: "base" (the model's own unit, no conversion) or one of seconds/minutes/hours/days. | |||
entities_per_arrival |
int | 1 |
count | Number of entities created per arrival event. | ||
max_arrivals |
int | 0 |
count | Number of arrival events before this block stops; 0 = unlimited. | ||
start_time |
float | 0 |
time | start_time_unit |
Simulation time of the first possible arrival. | |
start_time_unit |
str | 'base' |
Unit of start_time: "base" (the model's) or one of its quantity's units. |
|||
sequence |
str | '' |
Name of a declared routing sequence: every entity created here starts it at step 0. Empty = no routing. It is a literal name, not an expression -- use an ASSIGN to entity.sequence when the routing depends on the entity. | |||
population |
str | '' |
Name of a declared population. When set, every entity created here also gets a new agent there (its statechart starts), and entity.agent points to it. Empty = off. A full population raises the same error a spawn action would. |
Outputs: 1.
DECIDE¶
N-way branch. "Chance" mode draws on the block's own RNG against cumulative probs; "Condition" mode evaluates each of conditions in order and takes the first true one. Both modes take the last outgoing link as an ELSE branch when there is one more link than probs/conditions; otherwise an uncovered draw or condition fails loud rather than silently dropping the entity. "Policy" mode hands the choice to ctx.controllers[policy]: the number of actions is simply the number of outgoing links. A plain (synchronous) controller is called inline, in zero simulated time, exactly like Chance/Condition above. A PausingController (used by nagasim.rl. SimEnv to drive the policy from outside the run) is different: this block yields on a simpy event instead, so the whole simulation genuinely pauses until something resolves it. With no controller attached for policy, the block falls back to fallback ("first" / "random" / "shortest") so a Policy-mode model still runs and validates headless.
| Parameter | Type | Default | Required | Quantity | Unit key | Description |
|---|---|---|---|---|---|---|
mode |
str | 'Chance' |
"Chance": branch by probability. "Condition": branch by expression. "Policy": branch by a controller attached to policy. |
|||
probs |
list | [] |
ratio | Cumulative branch probabilities, used when mode is "Chance". | ||
conditions |
list | [] |
Ordered list of boolean expressions, used when mode is "Condition". | |||
policy |
str | '' |
Decision-point name; used when mode is "Policy". Several DECIDE blocks may share one. | |||
observation |
list | [] |
Expressions (evaluated with the arriving entity) forming the observation handed to the controller, when mode is "Policy". | |||
fallback |
str | 'first' |
"first"/"random"/"shortest": used when mode is "Policy" and no controller is attached for policy. |
|||
queue_exprs |
list | [] |
One expression per outgoing link; used by fallback "shortest" to pick the argmin. |
Outputs: multiple, chosen at run time.
DELAY¶
Pure timeout: hold the entity for a sampled duration, seizing nothing, then forward it. Use PROCESS instead when the delay is a resource-backed service.
| Parameter | Type | Default | Required | Quantity | Unit key | Description |
|---|---|---|---|---|---|---|
distribution |
str | 'Constant' |
Name of a registered distribution (see the distribution reference). | |||
dist_params |
dict | {'value': 0.0} |
time | time_unit |
Parameters for distribution, by name (e.g. {"rate": 0.5} for Exponential). |
|
time_unit |
str | 'base' |
Unit the sampled duration is expressed in: "base" (the model's own unit, no conversion) or one of seconds/minutes/hours/days. |
Outputs: 1.
DISPOSE¶
Entity sink. Waits an optional deletion delay, stamps deletion_time and throughput_time, accrues the entity type's WIP holding cost, and removes the entity from live_entities. Every model needs at least one DISPOSE block, and every flow that does not lead back to a CREATE must end in one (schema.validate_graph_structured).
| Parameter | Type | Default | Required | Quantity | Unit key | Description |
|---|---|---|---|---|---|---|
distribution |
str | 'Constant' |
Name of a registered distribution (see the distribution reference). | |||
dist_params |
dict | {'value': 0.0} |
time | time_unit |
Parameters for distribution, by name (e.g. {"rate": 0.5} for Exponential). |
|
time_unit |
str | 'base' |
Unit the sampled duration is expressed in: "base" (the model's own unit, no conversion) or one of seconds/minutes/hours/days. | |||
remove_agent |
bool | False |
When true, also remove the entity's agent (AgentSystem.remove_agent) at disposal, if it still has a live one. An entity with none, or whose agent already died, is a no-op. |
Outputs: 1.
DUPLICATE¶
Forwards the original entity unchanged, then forwards number_of_duplicates - 1 shallow copies, each a fresh Entity with its own id and name (never a deepcopy: that used to clone the entity manager and any live resource requests).
| Parameter | Type | Default | Required | Quantity | Unit key | Description |
|---|---|---|---|---|---|---|
number_of_duplicates |
int | 2 |
count | Total number of entities leaving this block, original included (>= 2). |
Outputs: 1.
HOLD¶
Signal / Condition / Infinite queue gate. Infinite mode never releases: the entity stays held in the store for the rest of the run. That is the documented semantics, not a leak.
| Parameter | Type | Default | Required | Quantity | Unit key | Description |
|---|---|---|---|---|---|---|
mode |
str | 'Signal' |
"Signal": wait for a named signal. "Condition": wait until every condition is true, re-checked whenever something it reads changes. "Infinite": never release. | |||
signal_name |
str | '' |
Name of the signal to wait for, when mode is "Signal". | |||
conditions |
list | [] |
Boolean expressions that must all be true to release, when mode is "Condition". | |||
scan_interval |
float | 1.0 |
time | scan_interval_unit |
Fallback re-check interval, when mode is "Condition": used only when a condition reads something no event announces (TNOW, TS(), RAND(), a level between events). Variables, NQ/NR/MR/IDLE, NS and threshold writes wake it at once. | |
scan_interval_unit |
str | 'base' |
Unit of scan_interval: "base" (the model's) or one of its quantity's units. |
Outputs: 1.
LOGIC¶
Routes an entity through a user-supplied, plain (non-BaseProcess) class defined in nagasim.core.custom_logic. The class only needs an execute(self, entity, ctx) -> int method returning the outgoing link index; execute(self, entity) (no ctx) is also accepted.
| Parameter | Type | Default | Required | Quantity | Unit key | Description |
|---|---|---|---|---|---|---|
logic_class |
str | 'SampleLogic' |
Name of a class in nagasim.core.custom_logic implementing execute(entity, ctx) -> int. |
Outputs: multiple, chosen at run time.
MATCH¶
Match number_to_match distinct entity types; with match_on set, only entities whose value of that attribute is equal (Arena's attribute match). The arriving entity is always stored first, so it can never be dropped ; the match is then taken atomically from the stores, oldest waiting type first, FIFO within a type (and within a value).
| Parameter | Type | Default | Required | Quantity | Unit key | Description |
|---|---|---|---|---|---|---|
number_to_match |
int | 2 |
count | Number of distinct entity types to match together. | ||
batch_option |
bool | False |
True: combine the matched entities into one batch entity. False: forward them separately. | |||
batched_entity_type |
str | 'BATCH' |
Entity type assigned to the batch entity, when batch_option is True. | |||
type_store_map |
dict | {} |
Optional {e_type: store index} mapping; default is automatic assignment. | |||
match_on |
str | '' |
An entity attribute (e.g. "order"); entities are matched only with others whose value of it is equal -- Arena's attribute match -- still one per distinct type, FIFO within a value. Empty = match by type alone. |
Outputs: 1.
MOTION¶
A station whose service is a cycle of motions -- moves timed from a motion profile (trapezoidal, payload-derated, slowed for human-robot collaboration) plus picks, places, tool changes, dwells and process steps. Seizing, setups, failures, preemption, workers and blocking are PROCESS's.
| Parameter | Type | Default | Required | Quantity | Unit key | Description |
|---|---|---|---|---|---|---|
action |
str | 'Seize Delay Release' |
Which of seize/delay/release run: "Seize Delay Release", "Seize Delay", "Delay Release" or "Delay". | |||
profile |
str | '' |
Name of a record in "motion_profiles": speed, acceleration, payload derating and collaborative speed of whoever does the motions. | |||
hrc |
str | 'none' |
Human-robot collaboration: "none", "collaborative" (every move at the profile's collaborative_speed) or "separation" (a move starts at collaborative_speed when a worker-fleet unit is within zone.radius_m of zone.node by network distance). | |||
zone |
dict | {} |
With hrc "separation": {"node": |
|||
segments |
list | [] |
time | time_unit |
The cycle, in order: {"kind": "move", "distance_m", "payload_kg"?} or {"kind": pick | |
time_unit |
str | 'seconds' |
Unit of every segment time: "base" or seconds/minutes/hours/days. Moves are always computed in seconds. |
|||
priority |
int | 0 |
Lower draws first when the resource's queue is contested. One number for the block (an entity attribute is not read): to rank entity types, route each to its own block on the shared resource. | |||
quantity |
int | 1 |
count | Number of resource units requested/released. | ||
resource_name |
str | '' |
Name of the resource or resource set; required unless action is "Delay" or a worker_fleet does the work alone. | |||
setup |
str | '' |
time | setup_unit |
Sequence-dependent setup time: an expression charged after the seize when this block's resource changes over, e.g. TABLE("Setups", previous_key, key). previous_key and key are in scope here only. Empty = no setup. |
|
setup_unit |
str | 'base' |
Unit of setup: "base" (the model's) or one of its quantity's units. |
|||
setup_key |
str | '' |
Expression identifying what a job is set up for; empty uses the entity type. A setup is charged only when it differs from the previous job's key at this block. | |||
initial_key |
str | '' |
What the resource is already set up for at time 0; empty means the first job is charged no setup. | |||
setup_cost |
str | '' |
money | Money charged ONCE PER CHANGEOVER, not per job -- an expression like TABLE("Changeover cost", previous_key, key), with previous_key and key in scope exactly as in "setup". It becomes an event cost item named after the block, joins Total Cost and resets at warm-up. Empty = free changeovers. |
||
setup_cost_category |
str | '' |
Cost category the changeover cost is grouped under in the cost_summary frame (default "Changeover"). | |||
balk_if |
str | '' |
Condition evaluated on arrival; when true the entity does not join the queue and leaves by the second outgoing link, e.g. "queue_length >= 5". queue_length is the queue it would have joined. Empty = never balk. |
|||
renege_after |
str | '' |
time | renege_time_unit |
How long the entity waits before giving up, e.g. "EXPO(15)" or "entity.patience"; it then leaves by the second outgoing link. A grant in the same instant wins. Empty = wait for ever. | |
renege_time_unit |
str | 'base' |
Unit renege_after is expressed in: "base" (the model's own unit) or one of seconds/minutes/hours/days. |
|||
preempt |
bool | False |
When no unit is free, interrupt the lowest-priority job in service on this resource (a strictly higher priority wins). Only with action "Seize Delay Release", and not on a resource set. | |||
queue_capacity |
int | 0 |
count | Places in this station's own input queue. 0 (the default) is an unlimited queue; with a positive value a part takes a place on arrival and frees it when service starts, so an upstream machine with nowhere to put its finished part stays blocked. balk_if sees the places taken as queue_length, which is how a LOSS system is written instead of a blocking one. |
||
hold_until_space |
bool | False |
Blocking BEFORE service: after seizing, do not start the job until the downstream space has a free place, and reserve it for this part. The station waits idle (reported as Blocked %). Needs a downstream BUFFER with capacity > 0 or a SEIZE/PROCESS with queue_capacity > 0. Off (the default) is blocking AFTER service. | |||
space_of |
str | '' |
Which block's space hold_until_space reserves in; empty = the target of this block's first outgoing link. The part must reach that block. |
|||
worker_fleet |
str | '' |
A fleet with kind "worker". After this block's own resource (if any) is seized, a worker is requested, walks EMPTY on the network to node, and is held for the service. Empty = no worker. |
|||
worker_skill |
str | '' |
Only a worker whose skills contain this name may serve; empty = any worker of the fleet. | |||
node |
str | '' |
Network node this block sits on; required with worker_fleet (where the worker walks to). | |||
worker_when_blocked |
str | 'leaves' |
What the worker does while this station holds a finished part that nothing downstream has room for. "leaves" (the default): the worker is free when the work ends. "stays": the worker waits with the part and is free when it is accepted downstream. The same either way where nothing downstream is finite. | |||
on_preempt |
str | 'resume' |
What THIS block's job does when something interrupts it and it gets the resource back: "resume" (finish the remaining time) or "restart" (the whole service again, same sample). Set on the block being interrupted, not on the one doing the interrupting. | |||
resample |
bool | False |
With on_preempt "restart" only: draw a FRESH service time from this block's own random stream on each restart, instead of repeating the same sample. Off (the default) repeats it. |
Outputs: 1.
PROCESS¶
Seize, delay and release fused in one block; action selects which of the three steps run ("Seize Delay Release", "Seize Delay", "Delay Release", "Delay"), so the same block type covers a self-contained service, the start or end of a hold split across two blocks, or a plain timed delay. The most-used block for a simple resource-backed service step.
| Parameter | Type | Default | Required | Quantity | Unit key | Description |
|---|---|---|---|---|---|---|
action |
str | 'Seize Delay Release' |
Which of seize/delay/release run: "Seize Delay Release", "Seize Delay", "Delay Release" or "Delay". | |||
distribution |
str | 'Constant' |
Name of a registered distribution (see the distribution reference). | |||
dist_params |
dict | {'value': 0.0} |
time | time_unit |
Parameters for distribution, by name (e.g. {"rate": 0.5} for Exponential). |
|
time_unit |
str | 'base' |
Unit the sampled duration is expressed in: "base" (the model's own unit, no conversion) or one of seconds/minutes/hours/days. | |||
priority |
int | 0 |
Lower draws first when the resource's queue is contested. One number for the block (an entity attribute is not read): to rank entity types, route each to its own block on the shared resource. | |||
quantity |
int | 1 |
count | Number of resource units requested/released. | ||
resource_name |
str | '' |
Name of the resource or resource set; required unless action is "Delay" or a worker_fleet does the work alone. | |||
setup |
str | '' |
time | setup_unit |
Sequence-dependent setup time: an expression charged after the seize when this block's resource changes over, e.g. TABLE("Setups", previous_key, key). previous_key and key are in scope here only. Empty = no setup. |
|
setup_unit |
str | 'base' |
Unit of setup: "base" (the model's) or one of its quantity's units. |
|||
setup_key |
str | '' |
Expression identifying what a job is set up for; empty uses the entity type. A setup is charged only when it differs from the previous job's key at this block. | |||
initial_key |
str | '' |
What the resource is already set up for at time 0; empty means the first job is charged no setup. | |||
setup_cost |
str | '' |
money | Money charged ONCE PER CHANGEOVER, not per job -- an expression like TABLE("Changeover cost", previous_key, key), with previous_key and key in scope exactly as in "setup". It becomes an event cost item named after the block, joins Total Cost and resets at warm-up. Empty = free changeovers. |
||
setup_cost_category |
str | '' |
Cost category the changeover cost is grouped under in the cost_summary frame (default "Changeover"). | |||
balk_if |
str | '' |
Condition evaluated on arrival; when true the entity does not join the queue and leaves by the second outgoing link, e.g. "queue_length >= 5". queue_length is the queue it would have joined. Empty = never balk. |
|||
renege_after |
str | '' |
time | renege_time_unit |
How long the entity waits before giving up, e.g. "EXPO(15)" or "entity.patience"; it then leaves by the second outgoing link. A grant in the same instant wins. Empty = wait for ever. | |
renege_time_unit |
str | 'base' |
Unit renege_after is expressed in: "base" (the model's own unit) or one of seconds/minutes/hours/days. |
|||
preempt |
bool | False |
When no unit is free, interrupt the lowest-priority job in service on this resource (a strictly higher priority wins). Only with action "Seize Delay Release", and not on a resource set. | |||
queue_capacity |
int | 0 |
count | Places in this station's own input queue. 0 (the default) is an unlimited queue; with a positive value a part takes a place on arrival and frees it when service starts, so an upstream machine with nowhere to put its finished part stays blocked. balk_if sees the places taken as queue_length, which is how a LOSS system is written instead of a blocking one. |
||
hold_until_space |
bool | False |
Blocking BEFORE service: after seizing, do not start the job until the downstream space has a free place, and reserve it for this part. The station waits idle (reported as Blocked %). Needs a downstream BUFFER with capacity > 0 or a SEIZE/PROCESS with queue_capacity > 0. Off (the default) is blocking AFTER service. | |||
space_of |
str | '' |
Which block's space hold_until_space reserves in; empty = the target of this block's first outgoing link. The part must reach that block. |
|||
worker_fleet |
str | '' |
A fleet with kind "worker". After this block's own resource (if any) is seized, a worker is requested, walks EMPTY on the network to node, and is held for the service. Empty = no worker. |
|||
worker_skill |
str | '' |
Only a worker whose skills contain this name may serve; empty = any worker of the fleet. | |||
node |
str | '' |
Network node this block sits on; required with worker_fleet (where the worker walks to). | |||
worker_when_blocked |
str | 'leaves' |
What the worker does while this station holds a finished part that nothing downstream has room for. "leaves" (the default): the worker is free when the work ends. "stays": the worker waits with the part and is free when it is accepted downstream. The same either way where nothing downstream is finite. | |||
on_preempt |
str | 'resume' |
What THIS block's job does when something interrupts it and it gets the resource back: "resume" (finish the remaining time) or "restart" (the whole service again, same sample). Set on the block being interrupted, not on the one doing the interrupting. | |||
resample |
bool | False |
With on_preempt "restart" only: draw a FRESH service time from this block's own random stream on each restart, instead of repeating the same sample. Off (the default) repeats it. |
Outputs: 1.
RECORD¶
RECORD block: a zero-time block that updates a user-defined statistic and forwards the entity unchanged. Statistics live on the simulation context (ctx.user_stats), keyed by stat_name, so two RECORD blocks writing to the same name share one collector -- core/schema/ rejects a same-name pair with different kinds at load time, before a run can hit the mismatch here. expr is the increment for "count", the observed value for "tally", the new level for "time_persistent", and ignored for "time_between" (it tallies the gap since the statistic's last arrival; the first arrival records nothing). kind="cost" is the one kind that builds no collector: expr is a MONEY amount added to the cost item stat_name every time an entity passes -- an ordering cost, a changeover cost, a lost-sale penalty. It joins the model's Total Cost and is itemised in the cost_summary frame.
| Parameter | Type | Default | Required | Quantity | Unit key | Description |
|---|---|---|---|---|---|---|
stat_name |
str | '' |
yes | Name of the user statistic; two RECORD blocks with the same name share one collector. | ||
kind |
str | 'count' |
"count" (running total of expr), "tally" (mean of expr), "time_between" (mean gap between arrivals), "time_persistent" (time-average level of expr) or "cost" (adds expr to a named cost item and to Total Cost). | |||
expr |
str | '1' |
Expression evaluated at each arrival; ignored for kind=time_between. | |||
category |
str | '' |
Cost category this item is grouped under in the cost_summary frame; used by kind=cost only. |
Outputs: 1.
RELEASE¶
Release everything the entity holds under resource_name (a plain resource or a set member), after an optional delay. Pairs with SEIZE for a hold split across two blocks; raises if the entity never seized that name (fail-loud by design).
| Parameter | Type | Default | Required | Quantity | Unit key | Description |
|---|---|---|---|---|---|---|
distribution |
str | 'Constant' |
Name of a registered distribution (see the distribution reference). | |||
dist_params |
dict | {'value': 0.0} |
time | time_unit |
Parameters for distribution, by name (e.g. {"rate": 0.5} for Exponential). |
|
time_unit |
str | 'base' |
Unit the sampled duration is expressed in: "base" (the model's own unit, no conversion) or one of seconds/minutes/hours/days. | |||
resource_name |
str | '' |
yes | Name of the resource or resource set to release. | ||
worker_when_blocked |
str | 'leaves' |
What the worker does while this station holds a finished part that nothing downstream has room for. "leaves" (the default): the worker is free when the work ends. "stays": the worker waits with the part and is free when it is accepted downstream. The same either way where nothing downstream is finite. |
Outputs: 1.
ROUTE¶
Send the entity to the next station of its sequence, applying that step's attribute values and advancing its step index; once the sequence is finished, forward along the block's own outgoing link instead.
| Parameter | Type | Default | Required | Quantity | Unit key | Description |
|---|---|---|---|---|---|---|
distribution |
str | 'Constant' |
Name of a registered distribution (see the distribution reference). | |||
dist_params |
dict | {'value': 0.0} |
time | time_unit |
Parameters for distribution, by name (e.g. {"rate": 0.5} for Exponential). |
|
time_unit |
str | 'base' |
Unit the sampled duration is expressed in: "base" (the model's own unit, no conversion) or one of seconds/minutes/hours/days. | |||
travel |
str | 'time' |
How the transfer time is found: "time" uses the distribution above, "network" divides the shortest path between the two stations' nodes by speed. |
|||
speed |
str | '' |
speed | speed_unit |
Travel speed for travel = "network", an expression in distance per time unit (e.g. 1.2, or entity.walk_speed). Empty means 1. |
|
speed_unit |
str | 'base' |
Unit of speed: "base" (the model's) or one of its quantity's units. |
Outputs: 1.
SEIZE¶
Request quantity units of resource_name (a plain resource or a resource set), honouring priority and the resource's queue discipline, then hold the block's own delay before forwarding. Pairs with RELEASE for a hold split across two blocks; PROCESS fuses the common Seize-Delay- Release case into one block. balk_if and renege_after let an entity leave without ever being served, by the block's second outgoing link. Preemption is PROCESS only: the service a SEIZE starts is finished somewhere else, so there is nothing here that could safely be interrupted.
| Parameter | Type | Default | Required | Quantity | Unit key | Description |
|---|---|---|---|---|---|---|
distribution |
str | 'Constant' |
Name of a registered distribution (see the distribution reference). | |||
dist_params |
dict | {'value': 0.0} |
time | time_unit |
Parameters for distribution, by name (e.g. {"rate": 0.5} for Exponential). |
|
time_unit |
str | 'base' |
Unit the sampled duration is expressed in: "base" (the model's own unit, no conversion) or one of seconds/minutes/hours/days. | |||
priority |
int | 0 |
Lower draws first when the resource's queue is contested. One number for the block (an entity attribute is not read): to rank entity types, route each to its own block on the shared resource. | |||
quantity |
int | 1 |
count | Number of resource units requested. | ||
resource_name |
str | '' |
yes | Name of the resource or resource set to seize. | ||
queue_capacity |
int | 0 |
count | Places in this block's own input queue. 0 (the default) is an unlimited queue; with a positive value a part takes a place on arrival and frees it when it seizes, so an upstream machine with nowhere to put its finished part stays blocked. | ||
hold_until_space |
bool | False |
Blocking BEFORE service: after seizing, do not start the job until the downstream space has a free place, and reserve it for this part. The station waits idle (reported as Blocked %). Needs a downstream BUFFER with capacity > 0 or a SEIZE/PROCESS with queue_capacity > 0. Off (the default) is blocking AFTER service. | |||
space_of |
str | '' |
Which block's space hold_until_space reserves in; empty = the target of this block's first outgoing link. The part must reach that block. |
|||
worker_fleet |
str | '' |
A fleet with kind "worker". After this block's own resource (if any) is seized, a worker is requested, walks EMPTY on the network to node, and is held for the service. Empty = no worker. |
|||
worker_skill |
str | '' |
Only a worker whose skills contain this name may serve; empty = any worker of the fleet. | |||
node |
str | '' |
Network node this block sits on; required with worker_fleet (where the worker walks to). | |||
balk_if |
str | '' |
Condition evaluated on arrival; when true the entity does not join the queue and leaves by the second outgoing link, e.g. "queue_length >= 5". queue_length is the queue it would have joined. Empty = never balk. |
|||
renege_after |
str | '' |
time | renege_time_unit |
How long the entity waits before giving up, e.g. "EXPO(15)" or "entity.patience"; it then leaves by the second outgoing link. A grant in the same instant wins. Empty = wait for ever. | |
renege_time_unit |
str | 'base' |
Unit renege_after is expressed in: "base" (the model's own unit) or one of seconds/minutes/hours/days. |
Outputs: 1.
SEND¶
Send message (with an optional payload) to the agents to names.
| Parameter | Type | Default | Required | Quantity | Unit key | Description |
|---|---|---|---|---|---|---|
message |
str | '' |
yes | Name of the message; an agent's "message" transition matches it. | ||
to |
object | 'entity.agent' |
Recipients: an expression giving an agent (entity.agent, AGENT("Pop", i)) or {"population": "Pop"[, "where": " |
|||
payload |
str | '' |
Optional expression evaluated for the entity; the receiving transition reads it as payload. |
Outputs: 1.
SEPARATE¶
Split a batch entity into its children. Parameters ---------- mode : {'retain','all','specific'} - 'retain' children keep their own attributes - 'all' copy all parent attributes to each child - 'specific' copy only the names listed in attrs attrs : list[str] | str | None Comma-separated string or list used when mode == 'specific'.
| Parameter | Type | Default | Required | Quantity | Unit key | Description |
|---|---|---|---|---|---|---|
mode |
str | 'Retain original entity values' |
How children get their attributes: retain their own values, take all of the parent's, or take only the ones listed in attrs. | |||
attrs |
list | [] |
Attribute labels to copy from the parent, used when mode is "specific". |
Outputs: 1.
SIGNAL¶
After an optional delay, succeeds the named signal event (releasing every HOLD block currently waiting on it) and immediately replaces it with a fresh one -- broadcast, edge-triggered, auto-reset.
| Parameter | Type | Default | Required | Quantity | Unit key | Description |
|---|---|---|---|---|---|---|
distribution |
str | 'Constant' |
Name of a registered distribution (see the distribution reference). | |||
dist_params |
dict | {'value': 0.0} |
time | time_unit |
Parameters for distribution, by name (e.g. {"rate": 0.5} for Exponential). |
|
time_unit |
str | 'base' |
Unit the sampled duration is expressed in: "base" (the model's own unit, no conversion) or one of seconds/minutes/hours/days. | |||
signal_name |
str | '' |
Name of the signal to succeed; matches a HOLD block's signal_name. |
Outputs: 1.
STATION¶
Named entry point of a routing. Entities arrive here from a ROUTE block whose sequence step names this block, or along an ordinary link; either way entity.station becomes this block's name and the entity continues along the station's single outgoing link.
| Parameter | Type | Default | Required | Quantity | Unit key | Description |
|---|---|---|---|---|---|---|
station |
str | '' |
Optional station name this block answers to, shown as entity.station and usable in a sequence step. Empty: the block's own name is the station name. |
|||
node |
str | '' |
Optional path-network node this station sits on. With one, travel to and from this station is the shortest path along the network and DISTANCE("...", "...") can name it. |
|||
tending |
dict | {} |
Machine tending by a fleet with an arm: {"place": [segments], "pick": [segments], "time_unit": "seconds", "hrc": "none", "zone": {}, "cobot": "leave" |
Outputs: 1.
SUBMODEL¶
Editor-only placeholder shared by three types, never run directly -- core/submodels.flatten() expands them away before the engine builds any process. SUB_ENTRY: an input port of a submodel definition (port names it; exactly one outgoing link inside the definition, none incoming). SUB_EXIT: an output port of a definition (port names it; incoming links only). SUBMODEL: an instance of a definition dropped on the canvas (definition names it, arguments binds its parameters).
| Parameter | Type | Default | Required | Quantity | Unit key | Description |
|---|---|---|---|---|---|---|
definition |
str | '' |
Name of the submodel definition | |||
arguments |
dict | {} |
Parameter bindings: {name: number | |||
preset |
str | '' |
Provenance only: the catalogue row whose values were written into arguments. The values are what the model uses, so editing one afterwards is fine and nothing re-reads the catalogue. |
Outputs: multiple, chosen at run time.
SUB_ENTRY¶
Editor-only placeholder shared by three types, never run directly -- core/submodels.flatten() expands them away before the engine builds any process. SUB_ENTRY: an input port of a submodel definition (port names it; exactly one outgoing link inside the definition, none incoming). SUB_EXIT: an output port of a definition (port names it; incoming links only). SUBMODEL: an instance of a definition dropped on the canvas (definition names it, arguments binds its parameters).
| Parameter | Type | Default | Required | Quantity | Unit key | Description |
|---|---|---|---|---|---|---|
port |
str | 'in' |
Input port name of the definition |
Outputs: 1.
SUB_EXIT¶
Editor-only placeholder shared by three types, never run directly -- core/submodels.flatten() expands them away before the engine builds any process. SUB_ENTRY: an input port of a submodel definition (port names it; exactly one outgoing link inside the definition, none incoming). SUB_EXIT: an output port of a definition (port names it; incoming links only). SUBMODEL: an instance of a definition dropped on the canvas (definition names it, arguments binds its parameters).
| Parameter | Type | Default | Required | Quantity | Unit key | Description |
|---|---|---|---|---|---|---|
port |
str | 'out' |
Output port name of the definition |
Outputs: 1.
TRANSFER¶
Move amount of level as the entity passes.
| Parameter | Type | Default | Required | Quantity | Unit key | Description |
|---|---|---|---|---|---|---|
level |
str | '' |
yes | Name of the level this block adds to or removes from. | ||
amount |
str | '1' |
How much to move: an expression, e.g. 20 or entity.quantity. | |||
mode |
str | 'remove' |
"remove" takes the amount out of the level, "add" puts it in. | |||
wait |
bool | False |
Wait until the level can pay the full amount (the backorder pattern); otherwise move what it can and record the rest as unmet. |
Outputs: 1.
TRANSPORT¶
Seize a vehicle, fetch the entity, carry it, unload, release.
| Parameter | Type | Default | Required | Quantity | Unit key | Description |
|---|---|---|---|---|---|---|
fleet |
str | '' |
yes | Name of the mover fleet whose vehicles do the carrying. | ||
destination |
str | '' |
STATION the entity is carried to. Empty: the next station of the entity's routing, exactly as ROUTE would choose it. | |||
priority |
int | 0 |
Request priority for a vehicle; lower is served first, and outranks the fleet's dispatching rule. |
Outputs: 1.