Descriptions
Each attribute and constraint object has a defined value. For attributes, this includes the unit, the type of value, and any associated equations. For constraints, the value is simply a boolean statement. These values can either be simple scalar values, supported arrays, or complex mathematical relations involving values from other objects.Special handling is applied when resolving values containing strings of
TBD (To Be Determined). This can be useful during the early stages of model formation to not resolve errors when the value is still being defined.Named State Values
Use[attribute-uuid].state([state-uuid]) to read an attribute’s effective value for one explicit state:
[attribute].state(...) reads state data; [code].method(...) executes a Code object. Arrays remain arrays, so select a 1-based index or use a reduction such as min(), max(), or mean() when a scalar is required.
Math Syntax
Equations are powered by Math.js, providing a comprehensive set of mathematical operations and functions. The syntax follows standard mathematical conventions:Basic Operations
Comparison Operators
Mathematical Functions
Trigonometric Functions
Statistical Functions
Logical Functions
or(a, b) above is a Math.js logical function used inside an equation. It is different from the whitespace-delimited clause or clause syntax used only by numeric Test evaluation-criteria targets. For example, a Test target of < -20 or > 60 matches either numeric region; it is not a Math.js expression or a general equation operator.Constants
Value Types
Attributes can have the following kind associated to a value, which handles how it is displayed or computed:| Value Type | Scalar | 1D array | 2D array | 3D array | Description |
|---|---|---|---|---|---|
Boolean | ✅ | ✅ | ✅ | ✅ | Represents true or false values. Does not use a unit and clears any existing unit. |
Date | ✅ | ❌ | ❌ | ❌ | Used for date values. Does not use a unit and clears any existing unit. |
Number | ✅ | ✅ | ✅ | ✅ | Represents standard numeric values. Optionally includes a unit. |
String | ✅ | ❌ | ❌ | ❌ | Represents string values. Does not use a unit and clears any existing unit. |
Array Values
Equations can produce scalar values or supported array values. Arrays use bracket syntax:- 1D arrays, such as vectors.
- 2D arrays, such as matrices.
- 3D arrays, such as grouped matrices or tensor-like values.
Callable Code Functions
Attribute equations can call functions defined in Code objects. This lets an equation delegate calculation logic to Python or JavaScript while still using model attributes as inputs. Use the direct call syntax:- Number
- Boolean
- String
- Date
- Numeric array
- Boolean array
value and unit:
Unit Referencing
Values can reference units inline, such as10 kg, where the number is associated with the unit.
Object Referencing
To reference other objects within an equation, use the@ symbol followed by the object’s name. This will automatically resolve the object’s value and unit.