Skip to content

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,5 triggers a syntax error).
  • Do not use scientific notation: Forms like 1e-6 are 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 (Queue and queue refer to different nodes).

Arithmetic Operators ​

OperatorOperationExample
+AdditionE{#Queue} + E{#InService}
-Subtraction and negationCAPACITY - E{#Queue}, -RATE
*MultiplicationE{#Rate} * 100
/DivisionE{#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:

OperatorMeaningExample
> 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
ANDLogical AND (both must hold)(#Queue > 0) AND (#Worker = 0)
ORLogical OR (at least one holds)(#Error > 0) OR (#Timeout > 0)
NOTLogical 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_false

This is the standard technique for guarding divisions against potential zeros:

IF E{#Completed} > 0 THEN E{#Queue} / E{#Completed} ELSE 0

Conditional blocks may be nested:

IF A > 10 THEN 100 ELSE IF A > 5 THEN 50 ELSE 0

Built-in Mathematical Functions ​

The calculation engine provides three core utility functions:

FunctionBehaviorExample
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 ​

  1. Guard with IF:
    IF throughput > 0 THEN items_in_system / throughput ELSE 0
  2. 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:
    (E{#Queue} + E{#InService}) * ARRIVAL_DELAY
    Because ARRIVAL_DELAY is 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.