Array and Agent Functions
Model-array references are normalized before expression evaluation. For a whole-array argument, aggregate functions receive the engine's maintained size, sum, mean, minimum, or maximum value. In an element equation, SELF and AGENTINDEX() refer to the current element context.
Canonical array functions
| Function | Meaning and edge semantics | Example |
|---|---|---|
SELF | Current array element value/context supplied by the array evaluator. | SELF * Growth_Rate |
SIZE(array_or_dimension) | Whole-array size after normalization. For a scalar argument, returns that value clamped to at least 0; with multiple evaluated arguments, returns the argument count. | SIZE(Regional_Sales) |
PREVIOUS(value) | Previous-step state boundary. It is non-instantaneous for cycle detection; the evaluated fallback is the supplied value when no prior state is available. | PREVIOUS(Inventory) |
ENDVAL(value) | End/previous-value state boundary with the same native expression behavior as PREVIOUS. | ENDVAL(Inventory) |
ARRAY(a, b, c, ...) | Native scalar representation is the sum of arguments. Requires at least one. | ARRAY(North, South, West) |
ARRAYSUM(a, b, c, ...) | Sum of arguments or normalized whole-array sum. | ARRAYSUM(Regional_Sales) |
ARRAYMEAN(a, b, c, ...) | Arithmetic mean or normalized whole-array mean. Aliases: ARRAYAVG, ARRAYAVERAGE. | ARRAYMEAN(Regional_Sales) |
ARRAYMIN(a, b, c, ...) | Minimum or normalized whole-array minimum. | ARRAYMIN(Regional_Sales) |
ARRAYMAX(a, b, c, ...) | Maximum or normalized whole-array maximum. | ARRAYMAX(Regional_Sales) |
ARRAYELEMENT(index, a, b, c, ...) | Selects a one-based value argument. The index is rounded. Index <= 0 selects a; an index beyond the list selects the last value. Aliases: ELEMENT, ELM, AT. | ARRAYELEMENT(2, North, South, West) |
Canonical agent functions
| Function | Meaning and edge semantics | Example |
|---|---|---|
AGENTINDEX() | Current one-based element index from array context; outside that context the default is 0. The engine also accepts one argument and returns it. | AGENTINDEX() |
AGENTCOUNT(array) | Alias behavior of SIZE. | AGENTCOUNT(Agents) |
AGENTSUM(array) | Alias behavior of SUM. | AGENTSUM(Agents) |
AGENTMEAN(array) | Alias behavior of ARRAYMEAN. | AGENTMEAN(Agents) |
AGENTMIN(array) | Alias behavior of ARRAYMIN. | AGENTMIN(Agents) |
AGENTMAX(array) | Alias behavior of ARRAYMAX. | AGENTMAX(Agents) |
Yano Simulator Help — Version 0.1.0, Build 20260704