Equation Syntax
Values and references
- Numbers may be integers, decimals, or scientific notation:
12,0.25,3.2e-4. - Use parentheses to control evaluation order:
(Revenue - Cost) / Revenue. - Function arguments are comma-separated:
MAX(Demand, Capacity). - Variable references entered through the editor are normalized to the model's internal identifier.
- String literals use double quotes and are used primarily for saved-run names:
HISTORY(Sales, 10, "Baseline"). - Built-in constants are
PI,E, andINF.
Operators
From highest to lowest practical precedence:
| Kind | Operators | Example |
|---|---|---|
| Parentheses | ( ) | (a + b) * c |
| Unary | + - | -Cost |
| Power | ^ | Radius ^ 2 |
| Multiply/divide | * / | Revenue / Units |
| Add/subtract | + - | Inflow - Outflow |
| Comparison | =, ==, !=, <>, <, <=, >, >= | Inventory <= Reorder_Point |
Comparisons return 1 when true and 0 when false. Logical functions treat zero as false and any nonzero value as true.
Direct / division returns 0 when the denominator is exactly zero. ZIDZ, XIDZ, and SAFEDIV use a near-zero threshold and make the fallback explicit.
Stocks
A stock is defined by its net rate and initial value in the model editor. Imported equations may use INTEG(rate, initial); the native model compiler separates those two expressions into the stock definition.
Time and state
TIME, DT, STARTTIME, and STOPTIME are built-in simulation values. Delay, smoothing, PREVIOUS, ENDVAL, and HISTORY are non-instantaneous for dependency-cycle analysis.
Stateful and random calls are keyed by their location in the parsed equation. A random call returns one cached draw during all evaluations at a simulation time and draws again when time advances.
Errors and numeric safeguards
An unknown variable, unknown function, wrong argument count, or malformed expression produces an equation warning and the affected calculated value is sanitized by the simulation engine. Several functions have additional documented clamps or fallback behavior; consult the category articles.
Yano Simulator Help — Version 0.1.0, Build 20260704