Equation Syntax

Values and references

Operators

From highest to lowest practical precedence:

KindOperatorsExample
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