Theme
Available Expressions
This page provides the complete syntax reference for writing metric formulas, guard conditions, and parameter expressions in Jupiter.
Numbers and Literals
- Use standard decimal digits with a period (
.) as the separator:5,0.643,1250.0. - Do not use commas for decimals (
0,5triggers a syntax error). - Do not use scientific notation: Forms like
1e-6are not accepted. Write full decimal values:0.000001.
Place and Parameter Identifiers
- Places: Prefix the place name with
#(e.g.,#Queue,#InService,#Slots). - Parameters: Enter the parameter name directly without symbols (e.g.,
SERVICE_TIME,WORKERS). - Case Sensitivity: Identifiers are case-sensitive (
Queueandqueuerefer to different nodes).
Arithmetic Operators
| Operator | Operation | Example |
|---|---|---|
+ | Addition | E{#Queue} + E{#InService} |
- | Subtraction and negation | CAPACITY - E{#Queue}, -RATE |
* | Multiplication | E{#Rate} * 100 |
/ | Division | E{#InService} / SERVICE_TIME |
( ) | Grouping parentheses | (E{#Queue} + E{#InService}) * ARRIVAL_DELAY |
Unsupported Math Operators
Exponents (^), square roots (sqrt), and modulo (%) are not supported. To calculate the square of a quantity $A$, multiply it by itself: A * A.
Relational and Logical Operators
Used inside P{ }, within conditional IF blocks, and in transition guards:
| Operator | Meaning | Example |
|---|---|---|
> and >= | Greater than, greater or equal | #Queue > 0 |
< and <= | Less than, less or equal | #Slots <= 5 |
= or == | Equal to | #Worker = 0 |
!= | Not equal to | #Queue != 0 |
AND | Logical AND (both must hold) | (#Queue > 0) AND (#Worker = 0) |
OR | Logical OR (at least one holds) | (#Error > 0) OR (#Timeout > 0) |
NOT | Logical NOT (inverts boolean value) | NOT (#Slots > 0) |
Conditional Expressions (IF ... THEN ... ELSE)
The ternary conditional structure dynamically selects values based on conditions:
IF condition THEN value_if_true ELSE value_if_falseThis is the standard technique for guarding divisions against potential zeros:
IF E{#Completed} > 0 THEN E{#Queue} / E{#Completed} ELSE 0Conditional blocks may be nested:
IF A > 10 THEN 100 ELSE IF A > 5 THEN 50 ELSE 0Built-in Mathematical Functions
The calculation engine provides three core utility functions:
| Function | Behavior | Example |
|---|---|---|
abs(x) | Returns absolute value of $x$ | abs(E{#QueueA} - E{#QueueB}) |
min(a, b) | Returns the lesser of $a$ and $b$ | min(E{#Queue}, ALERT_LIMIT) |
max(a, b) | Returns the greater of $a$ and $b$ | max(E{#Queue} - CAPACITY, 0) |
Handling Division by Zero
When a formula denominator evaluates to zero, the engine halts with:
NON_FINITE_METRIC: metric 'X' produced a non-finite value (Infinity/NaN)
This prevents corrupted metrics from silently polluting results.
Prevention Strategies
- Guard with
IF:IF throughput > 0 THEN items_in_system / throughput ELSE 0 - Rewrite with Known Parameters: Instead of dividing by an instantaneous measured throughput that might fluctuate near zero during transient startup, multiply by the known arrival delay parameter:Because
(E{#Queue} + E{#InService}) * ARRIVAL_DELAYARRIVAL_DELAYis a strictly positive constant, this formulation is mathematically immune to division-by-zero errors.
Next steps
Explore the four core performance metrics, starting with Throughput.