MN 113-5: MMEL Measurements and Validation

1. Measurement overview

1.1. Purpose

This part of the MMEL specification defines the measurement and validation features of the Multi-Modal Modelling Language (MMEL). Measurements provide quantitative monitoring of process KPIs, enabling compliance engineers and system architects to define, collect, and validate numeric values against process requirements.

Measurements complement provisions by providing quantitative compliance checks: while provisions define qualitative requirements ("the organization shall establish documented policies"), measurements define quantitative thresholds ("the failed login rate shall not exceed 40%").

1.2. Measurement architecture

Measurements in MMEL form a layered architecture connecting data collection to process validation:

NUMERIC ───────────────────────────────────> single value
DATALIST ──── .max, .min, .sum, ──────────> aggregation
              .count, .average
DERIVED ───── "[A].sum / [B]" ────────────> computed expression
TRUE/FALSE ── boolean toggle ──────────────> conditional branching
DURATION ──── time span ───────────────────> temporal monitoring
TEXT ──────── text input ──────────────────> qualitative data
TABLE_REFERENCE ─ lookup from table ──────> data-driven value
TABLE_OPTIONS ── options from table ───────> selectable options
     |
     +-- validate_measurement { "[X] >= 0.95" }
          |
          +-- Evaluated against process KPIs

1.3. Connection to processes

Measurements connect to processes through two mechanisms:

validate_measurement
A process property that declares a measurement expression that must evaluate to true for the process to be considered compliant. The expression references measurement IDs and applies comparison and arithmetic operators.
Gateway edge conditions
A subprocess edge condition that references measurement variables to determine which outgoing path from an exclusive gateway is taken. This enables parameterized process flows based on measurement values.

1.4. User-defined vs derived measurements

MMEL distinguishes two categories of measurements:

User-defined measurements
Measurements whose values are provided externally (by users, sensors, or data collection systems). Types include NUMERIC, DATALIST, TRUE/FALSE, DURATION, TEXT, TABLEREFERENCE, and TABLEOPTIONS. Their values are set at runtime through evidence collection.
Derived measurements
Measurements whose values are computed from other measurements using a formula. The DERIVED type requires a definition field containing a mathematical expression that references other measurement IDs.

1.5. Usage modes

Measurements support two usage modes:

Single use (provide instance)
A measurement value is provided once for a specific process instance. The user enters the value when executing the process, and it is validated against the validate_measurement expression. Example: entering the number of failed logins for a monitoring period.
API (collect data continuously)
Measurement data is collected continuously through automated systems or APIs. The values are aggregated and evaluated against validation expressions on an ongoing basis. Example: continuously monitoring connection counts and triggering alerts when thresholds are exceeded.

1.6. Relationship to other MMEL parts

This part builds on the core MMEL syntax defined in MN 113 and relates to other parts as follows:

  • MN 113 (Core specification) -- defines the base syntax for measurements and validate_measurement
  • MN 113-4 (Compliance and Requirements) -- defines provisions and conformance testing, which work alongside measurements
  • MN 113-3 (Process Model) -- defines processes that carry validate_measurement bindings and gateway edge conditions

2. Measurement types

2.1. General

MMEL supports the following measurement types. Each type defines how the measurement value is collected, stored, and used in validation expressions.

2.2. NUMERIC

A single numeric value. Used for scalar measurements such as counts, percentages, voltages, or any single quantitative value.

measurement <MeasurementID> {
  type NUMERIC
  description "Human-readable description"
}

2.2.1. Example

measurement NumFailLogin {
  type NUMERIC
  description "Number of failed login attempts"
}
measurement NumLogin {
  type NUMERIC
  description "Number of login attempts"
}
measurement OpV {
  type NUMERIC
  description "Maximum permanent operating voltage"
}
measurement thickness {
  type NUMERIC
  description "Radial thickness of the insulation"
}

In validation expressions, NUMERIC values are referenced directly: [OpV] <= 820 , [thickness] >= [thicknessReq] * 0.9 - 0.1 .

2.3. DATALIST

A list (collection) of numeric values. Supports aggregation operators for computing statistics over the list.

measurement <MeasurementID> {
  type DATALIST
  description "Human-readable description"
}

DATALIST measurements support the following aggregation operators:

Operator Description
.max Maximum value in the list
.min Minimum value in the list
.sum Sum of all values in the list
.count Number of values in the list
.average Arithmetic mean of all values in the list

2.3.1. Example

measurement NumConnection {
  type DATALIST
  description "Number of connections within 10 seconds (for each user)"
}
measurement Excluded_Emission {
  type DATALIST
  description "Excluded emissions"
}
measurement Included_Emission {
  type DATALIST
  description "Emissions of the subject (including Scope 1, Scope 2 and Scope 3)"
}

In validation expressions, DATALIST values use aggregation operators: [NumConnection].max <= 100 , [Included_Emission].sum / [Total_Emission] .

2.4. DERIVED

A computed value derived from other measurements using a mathematical expression. The definition field is required and contains the computation formula.

measurement <MeasurementID> {
  type DERIVED
  definition "<expression>"
  description "Human-readable description"
}

The definition field contains an expression that references other measurement IDs using the [MeasurementID] notation, with optional aggregation operators and arithmetic operations.

2.4.1. Example

measurement Total_Emission {
  type DERIVED
  definition "[Included_Emission].sum + [Excluded_Emission].sum"
  description "Total emission"
}
measurement Largest_Emission_In_Percentage {
  type DERIVED
  definition "[Included_Emission].max / [Total_Emission]"
  description "The largest emission source"
}
measurement Total_Emission_Excluded_Max {
  type DERIVED
  definition "[Total_Emission] - [Included_Emission].max"
  description "The total emission excluding the largest emission"
}
measurement Excluded_Emssions_Without_Max_In_Percentage {
  type DERIVED
  definition "[Excluded_Emission].sum / [Total_Emission_Excluded_Max]"
  description "Percentage of excluded emissions"
}
measurement Total_Included_Emissions_In_Percentage {
  type DERIVED
  definition "[Included_Emission].sum / [Total_Emission]"
  description "Percentage of all included emissions"
}

DERIVED measurements can reference other DERIVED measurements, creating computation chains. The order of evaluation follows the dependency graph.

2.5. TRUE/FALSE

A boolean toggle measurement. Used for conditional branching in gateway edges and for binary conditions in validation expressions.

measurement <MeasurementID> {
  type TRUE/FALSE
  description "Human-readable description"
}

2.5.1. Example

measurement dc {
  type TRUE/FALSE
  description "The cable is for d.c."
}
measurement target {
  type TRUE/FALSE
  description "The cable is for conductor-conductor"
}
measurement implant {
  type TRUE/FALSE
  description "There is implantable medical device"
}
measurement outsourcing {
  type TRUE/FALSE
  description "There is outsourcing"
}

In gateway edge conditions, TRUE/FALSE measurements are compared with string literals: [dc] = 'true' , [target] = 'true' .

2.6. DURATION

A temporal duration value representing a time span. Used for timer events and time-based monitoring.

measurement <MeasurementID> {
  type DURATION
  description "Human-readable description"
}

2.6.1. Example

measurement AuditTimer {
  type DURATION
}
measurement CompetenceReviewTimer {
  type DURATION
}

DURATION measurements are used with timer events to define temporal conditions.

2.7. TEXT

A text input measurement. Used for qualitative data collection where the value is a free-text string rather than a numeric value.

measurement <MeasurementID> {
  type TEXT
  description "Human-readable description"
}

2.7.1. Example

measurement ComplianceNote {
  type TEXT
  description "Additional compliance notes"
}

TEXT measurements are referenced in validation expressions for string comparisons.

2.8. TABLE_REFERENCE

A measurement whose value is looked up from a table within the model. Used for data-driven specifications where the required value depends on other parameters (e.g. cable type and cross-sectional area determine the required insulation thickness).

measurement <MeasurementID> {
  type TABLE_REFERENCE
  definition "<table_name>,<column_index>,<filter_spec>,..."
  description "Human-readable description"
}

The definition field contains a comma-separated lookup specification. See table-lookup for full documentation of the lookup syntax.

2.8.1. Example

measurement thicknessReq {
  type TABLE_REFERENCE
  definition "data,4,0,type,2,area,3,class"
  description "Requirement of the radial thickness of insulation"
}
measurement sheathReq {
  type TABLE_REFERENCE
  definition "data,5,0,type,2,area,3,class"
  description "Requirement of radial thickness of sheath"
}
measurement isCircular {
  type TABLE_REFERENCE
  definition "data,13,0,type"
  description "Is the cable circular"
}

2.9. TABLE_OPTIONS

A measurement that provides selectable options from a table. Used for parameterized model views where the user selects from a set of valid options determined by table data.

measurement <MeasurementID> {
  type TABLE_OPTIONS
  definition "<table_name>,<column_index>,<filter_spec>,..."
  description "Human-readable description"
}

The definition field uses the same lookup syntax as TABLE_REFERENCE but returns matching rows as selectable options rather than a single value. See table-lookup for full documentation.

2.9.1. Example

measurement type {
  type TABLE_OPTIONS
  definition "data,0,2,area,3,class"
  description "Type of cable (e.g., 6181Y)"
}
measurement area {
  type TABLE_OPTIONS
  definition "data,2,0,type,3,class"
  description "Nominal cross-sectional area of conductors"
}
measurement class {
  type TABLE_OPTIONS
  definition "data,3,2,area,0,type"
  description "Class of conductor (1 / 2)"
}

2.10. DATAITEM (deprecated)

The DATAITEM measurement type is deprecated and superseded by NUMERIC. It was used in earlier versions of MMEL for single numeric values.

measurement <MeasurementID> {
  type DATAITEM
  description "Human-readable description"
}

DATAITEM is documented here for backward compatibility only. New models SHALL use the NUMERIC type instead. Tools SHALL accept DATAITEM for backward compatibility but SHOULD emit a deprecation warning.

2.11. Summary of measurement types

Type Category Description
NUMERIC User-defined Single numeric value
DATALIST User-defined List of numeric values with aggregation operators
DERIVED Computed Formula referencing other measurements
TRUE/FALSE User-defined Boolean toggle for conditional branching
DURATION User-defined Time span for temporal monitoring
TEXT User-defined Free-text input
TABLE_REFERENCE Lookup Single value looked up from a table
TABLE_OPTIONS Lookup Selectable options from a table
DATAITEM User-defined Deprecated single numeric value (use NUMERIC)

3. Validation expressions

3.1. General

Validation expressions are used in validate_measurement properties on processes to define quantitative conditions that must be met for a process to be considered compliant. They reference measurement IDs and apply comparison, arithmetic, and list aggregation operators.

3.2. Syntax

process <ProcessID> {
  name "Process name"
  validate_measurement {
    "<measurement expression>"
  }
}

The expression is a string containing measurement references, operators, and literal values.

3.3. Measurement reference format

Measurements are referenced using square bracket notation:

[MeasurementID]

This references the current value of the named measurement. For DATALIST measurements, aggregation operators may be appended:

[MeasurementID].max
[MeasurementID].min
[MeasurementID].sum
[MeasurementID].count
[MeasurementID].average

3.4. Comparison operators

Operator Description
>= Greater than or equal to
<= Less than or equal to
= Equal to
> Greater than
< Less than

3.5. Arithmetic operators

Operator Description
+ Addition
- Subtraction
* Multiplication
/ Division

3.6. List operators

List operators are applied to DATALIST measurements to compute aggregate values:

Operator Description
.max Returns the maximum value in the list
.min Returns the minimum value in the list
.sum Returns the sum of all values in the list
.count Returns the number of values in the list
.average Returns the arithmetic mean of all values in the list

3.7. Order of operations

Expression evaluation follows this order of precedence (highest to lowest):

  1. List operators ( .max, .min, .sum, .count, .average) -- applied to DATALIST references first
  2. Arithmetic operators ( *, /, then +, -) -- standard mathematical precedence
  3. Comparison operators ( >=, <=, >, <, =) -- applied last

Parentheses may be used to override the default precedence.

3.8. String comparisons

For TRUE/FALSE measurements, the comparison uses string literals:

[dc] = 'true'
[target] = 'true'

The value ’ true ‘ and ’ false ‘ are string comparisons against the boolean measurement value.

3.9. Examples

3.9.1. Simple numeric comparison

From the BS 6004 model -- voltage validation:

process RatedVoltageEarthAC {
  name "Rated Voltage for conductor-earth (ac)"
  validate_provision {
    Provision6
  }
  validate_measurement {
    "[OpV] <= 320"
  }
}
process RatedVoltageConductorAC {
  name "Rated Voltage for conductor-conductor (ac)"
  validate_provision {
    Provision7
  }
  validate_measurement {
    "[OpV] <= 550"
  }
}
process RatedVoltageEarthDC {
  name "Rated Voltage for conductor-earth (dc)"
  validate_provision {
    Provision8
  }
  validate_measurement {
    "[OpV] <= 410"
  }
}
process RatedVoltageConductorDC {
  name "Rated Voltage for conductor-conductor (dc)"
  validate_provision {
    Provision9
  }
  validate_measurement {
    "[OpV] <= 820"
  }
}

3.9.2. Ratio with division

From the RiboseImplementation model -- failed login ratio:

process FailedLoginMonitor {
  name "Failed login monitoring"
  validate_measurement {
    "[NumFailLogin] / [NumLogin] <= 0.4"
  }
}

3.9.3. DATALIST aggregation with comparison

From the RiboseImplementation model -- traffic monitoring:

process TrafficMonitor {
  name "Traffic monitor"
  validate_measurement {
    "[NumConnection].max <= 100"
  }
}

3.9.4. Derived measurement in validation

From the PAS 2060 model -- emission coverage:

process ApplyOverallCoverageRule {
  name "Apply the overall coverage principle"
  actor entity
  modality SHALL
  validate_provision {
    Provision47
  }
  validate_measurement {
    "[Total_Included_Emissions_In_Percentage] >= 0.95"
  }
}

3.9.5. Complex derived expression in validation

From the PAS 2060 model -- excluded emission validation:

process AlternativeCoverageValidation {
  name "Apply the alternative coverage principle"
  actor entity
  modality SHALL
  validate_provision {
    Provision46
  }
  validate_measurement {
    "[Excluded_Emssions_Without_Max_In_Percentage] < 0.05"
  }
}
process ExcludeEmissionSource {
  name "Exclude emission source"
  actor entity
  modality MAY
  validate_provision {
    Provision45
    Provision48
    Provision98
    Provision99
  }
  validate_measurement {
    "[Excluded_Emission].max / [Total_Emission] < 0.01"
  }
}

3.9.6. Table lookup with arithmetic

From the BS 6004 model -- insulation thickness with tolerance:

process InsulationThickness {
  name "Thickness"
  validate_provision {
    Provision15
    Provision16
  }
  validate_measurement {
    "[thickness] >= [thicknessReq] * 0.9 - 0.1"
  }
}

This expression allows a 10% tolerance minus 0.1 units from the table-looked-up requirement value.

4. Table lookup measurements

4.1. General

TABLE REFERENCE and TABLE OPTIONS are measurement types that look up values from tables defined within the same model. They enable data-driven specifications where the required value or valid options depend on other measurement parameters.

4.2. TABLE_REFERENCE

TABLE_REFERENCE returns a single value from a table by column lookup. It is used when a specification requires looking up a specific value (e.g. insulation thickness requirement) based on parameter combinations (e.g. cable type, cross-sectional area, conductor class).

4.2.1. Syntax

measurement <MeasurementID> {
  type TABLE_REFERENCE
  definition "<table_name>,<column_index>,<filter_column>,<filter_data>,..."
  description "Human-readable description"
}

4.2.2. Definition format

The definition field contains a comma-separated lookup specification with the following structure:

<table_name>,<target_column>,<filter1_column>,<filter1_data>,<filter2_column>,<filter2_data>,...
Component Description
table_name The ID of the table construct to look up from.
target_column The column index to retrieve the value from. Column indices start at 0.
filter_column The column index to filter on.
filter_data The measurement ID whose value is used as the filter criterion.

Column indices start at 0 (the first column is index 0, the second is 1, etc.).

4.2.3. Examples from BS 6004 model

The BS 6004 model (cable specifications) uses TABLE_REFERENCE extensively with 67 records across Tables 3--6:

measurement thicknessReq {
  type TABLE_REFERENCE
  definition "data,4,0,type,2,area,3,class"
  description "Requirement of the radial thickness of insulation"
}

This definition means:

  • Look up from table data
  • Return the value in column 4 (target column)
  • Filter by column 0 matching the type measurement value
  • Filter by column 2 matching the area measurement value
  • Filter by column 3 matching the class measurement value

Additional TABLE_REFERENCE measurements:

measurement sheathReq {
  type TABLE_REFERENCE
  definition "data,5,0,type,2,area,3,class"
  description "Requirement of radial thickness of sheath"
}
measurement isCircular {
  type TABLE_REFERENCE
  definition "data,13,0,type"
  description "Is the cable circular"
}

The sheathReq measurement uses the same filter chain but targets column 5 instead of column 4. The isCircular measurement uses only one filter (column 0 matching type ).

4.3. TABLE_OPTIONS

TABLE_OPTIONS returns matching rows as selectable options. It is used for parameterized model views where the user selects from a set of valid options determined by table data and current measurement values.

4.3.1. Syntax

measurement <MeasurementID> {
  type TABLE_OPTIONS
  definition "<table_name>,<target_column>,<filter_column>,<filter_data>,..."
  description "Human-readable description"
}

The definition format is identical to TABLE_REFERENCE. The difference is in the result: TABLE_OPTIONS returns all distinct matching values from the target column as a set of selectable options.

4.3.2. Examples from BS 6004 model

measurement type {
  type TABLE_OPTIONS
  definition "data,0,2,area,3,class"
  description "Type of cable (e.g., 6181Y)"
}
measurement area {
  type TABLE_OPTIONS
  definition "data,2,0,type,3,class"
  description "Nominal cross-sectional area of conductors"
}
measurement class {
  type TABLE_OPTIONS
  definition "data,3,2,area,0,type"
  description "Class of conductor (1 / 2)"
}

These three measurements form a mutually-filtering set:

  • type returns cable types filtered by area and class
  • area returns cross-sectional areas filtered by type and class
  • class returns conductor classes filtered by area and type

When the user selects a value for one, the options for the others are narrowed accordingly.

4.4. Lookup semantics

The lookup process follows these steps:

  1. Resolve the current values of all filter_data measurements.
  2. Scan the table rows for matches where each filter_column value equals the corresponding filter_data measurement value.
  3. For TABLE REFERENCE: return the value from the targetcolumn of the first (or only) matching row.
  4. For TABLE_OPTIONS: return the set of distinct values from the target_column across all matching rows.

4.5. Error handling

When no matching row is found in the table:

  • TABLE_REFERENCE returns an undefined/error value. Validation expressions using this value will fail.
  • TABLE_OPTIONS returns an empty set of options.

When multiple rows match and the target column has different values:

  • TABLE_REFERENCE returns the value from the first matching row.
  • TABLE_OPTIONS returns all distinct values as selectable options.

4.6. Column index convention

Column indices in the definition string start at 0:

Index Column
0 First column
1 Second column
2 Third column
... ...
N Column N+1

4.7. Data scale in production models

The BS 6004 model demonstrates table lookup at scale:

  • The model contains tables with 67 records from Tables 3--6 of the BS 6004 standard.
  • Multiple TABLE_REFERENCE measurements look up requirements (thickness, sheath, circularity) based on cable parameters.
  • TABLE_OPTIONS measurements provide interactive filtering for cable type, cross-sectional area, and conductor class.

5. View profiles

5.1. General

View profiles provide a mechanism for parameterized model views. A view profile pre-sets measurement data with default values, editability toggles, and importance settings, allowing users to customize the model view based on their specific parameters without modifying the underlying model.

5.2. Syntax

view_profile <ProfileID> {
  parameter <MeasurementID> {
    default "<default-value>"
    editable true | false
    setting RECOMMEND | MUST
  }
  parameter <MeasurementID> {
    default "<default-value>"
    editable true | false
    setting RECOMMEND | MUST
  }
  ...
}
  1. The default value for the parameter. Used when the user has not provided a value.
  2. Whether the user can modify this parameter's value. true allows user editing; false locks the parameter to its default value.
  3. The importance level of the parameter. RECOMMEND indicates the parameter is recommended but optional; MUST indicates the parameter is required for the view to be valid.

5.3. Profile fields

Each parameter in a view profile corresponds to a measurement in the model. The profile field acts as a wrapper that controls how the measurement value is presented and edited in the model view.

Field Required Description
default yes The default value for the measurement parameter. Type depends on the underlying measurement type (numeric string for NUMERIC, `'true'` or `'false'` for TRUE/FALSE, etc.).
editable yes Whether the user can modify this parameter. `true` allows editing; `false` locks the parameter.
setting yes The importance level. `RECOMMEND` marks the parameter as recommended; `MUST` marks it as required.

5.4. Use cases

5.4.1. Branching by external factors

View profiles are used when a model supports multiple scenarios based on external factors. For example, a medical device standard model may branch depending on whether the device is sterile or non-sterile:

view_profile DeviceProfile {
  parameter sterile {
    default "false"
    editable true
    setting MUST
  }
  parameter implant {
    default "false"
    editable true
    setting RECOMMEND
  }
  parameter outsourcing {
    default "false"
    editable false
    setting RECOMMEND
  }
}

In this example:

  • sterile is a required parameter with default false. The user must confirm or change it.
  • implant is a recommended parameter with default false. The user may change it.
  • outsourcing is locked to false and cannot be edited by the user.

When the sterile parameter is set to ’ true ‘ , the model view adjusts to show only the processes and provisions relevant to sterile devices. When set to ’ false ‘ , the non-sterile path is shown. This is achieved through gateway edge conditions that reference the measurement value:

Edge1 {
  from SterileGateway
  to SterileProcessPath
  description "Yes"
  condition "[sterile] = 'true'"
}
Edge2 {
  from SterileGateway
  to NonSterileProcessPath
  description "No"
  condition "default"
}

5.4.2. Pre-configured compliance views

View profiles can pre-configure compliance views for specific regulatory contexts:

view_profile EURegulatoryView {
  parameter jurisdiction {
    default "EU"
    editable false
    setting MUST
  }
  parameter riskClass {
    default "IIa"
    editable true
    setting MUST
  }
}

5.5. Relationship to measurements

View profiles reference existing measurement IDs. The measurement must be defined in the model before it can be used in a view profile parameter. The profile parameter's default value overrides the measurement's initial value when the profile is applied.

When a view profile is active:

  1. Each parameter's default value is applied to the corresponding measurement.
  2. If editable is true, the user can modify the measurement value through the profile interface.
  3. If editable is false, the measurement is locked to the default value.
  4. The setting field indicates whether the parameter is recommended or mandatory.

5.6. External factor settings

View profiles support external factor settings that allow tooling to categorize parameters:

  • Parameters with setting MUST are highlighted as required inputs. The user cannot proceed without confirming or providing a value.
  • Parameters with setting RECOMMEND are shown as optional inputs. The model can be viewed without providing values for these parameters.

This categorization enables tooling to create guided workflows where users first set required parameters, then optionally adjust recommended parameters, and finally view the parameterized model.

6. Gateway conditions

6.1. General

Gateway conditions are measurement-based expressions used on the edges of exclusive gateways in subprocess diagrams. They determine which outgoing path from a gateway is taken based on the current values of measurement variables. This enables parameterized process flows that adapt to measurement data.

6.2. Edge condition syntax

In a subprocess process_flow section, edges may carry a condition attribute:

subprocess <SubprocessID> {
  process_flow {
    Edge<EdgeNumber> {
      from <GatewayID>
      to <ProcessID>
      description "Branch label"
      condition "<condition expression>"
    }
  }
}

The condition attribute contains a measurement expression or the special value ” default “ .

6.3. With conditions (parameterized branching)

When gateway edges carry measurement-based conditions, the path is selected by evaluating the condition against the current measurement values. Exactly one edge whose condition evaluates to true is followed.

6.3.1. Boolean measurement conditions

TRUE/FALSE measurements are compared with string literals:

Edge3 {
  from DCGateway
  to DCEarthGateway
  description "Yes"
  condition "[dc] = 'true'"
}

This edge is taken when the dc measurement (TRUE/FALSE type) has the value ’ true ‘ , indicating the cable is for direct current.

Edge4 {
  from ACEarthGateway
  to RatedVoltageEarthAC
  description "Yes"
  condition "[target] = 'true'"
}

This edge is taken when the target measurement indicates conductor-to-conductor mode.

6.3.2. Table lookup conditions

TABLE_REFERENCE measurements return values that can be compared numerically:

Edge8 {
  from CableTable6Gateway
  to TwoPulleyFlexingTest
  description "Yes"
  condition "[tableRef] = 6"
}

This edge is taken when the looked-up table reference value equals 6.

Edge9 {
  from CableTable6Gateway
  to AlternativeTest
  description "No"
  condition "[tableRef] < 6"
}

6.3.3. Is-circular conditions

Edge2 {
  from DimensionCableTypeGateway
  to DimensionsForCircularCables
  description "Yes"
  condition "[isCircular] = 'true'"
}
Edge3 {
  from DimensionCableTypeGateway
  to DimensionsForFlatCables
  description "No"
  condition "default"
}

6.4. Without conditions (default gateway behavior)

When a gateway has no edge conditions (or only ” default “ conditions), it follows the default gateway behavior: the gateway is fulfilled if at least one of its outgoing paths is fulfilled.

The ” default “ condition marks the fallback path from a gateway:

Edge5 {
  from ACEarthGateway
  to RatedVoltageConductorAC
  description "No"
  condition "default"
}

An edge with condition "default" is taken when no other edge from the same gateway has a condition that evaluates to true. Every gateway SHOULD have exactly one edge with the ” default “ condition as a fallback.

6.5. Condition writer

The condition expression format in gateway edges follows the same rules as validate_measurement expressions:

  • [MeasurementID] references a measurement value
  • = 'true' or = 'false' for boolean comparisons
  • = <number> for numeric equality
  • < <number> and > <number> for numeric comparison
  • ” default “ for the default fallback path

6.6. Examples

6.6.1. DC/AC branching in BS 6004

The BS 6004 model uses gateway conditions to branch between DC and AC test paths based on the dc and target measurements:

subprocess Page1 {
  process_flow {
    Edge3 {
      from DCGateway
      to DCEarthGateway
      description "Yes"
      condition "[dc] = 'true'"
    }
    Edge4 {
      from ACEarthGateway
      to RatedVoltageEarthAC
      description "Yes"
      condition "[target] = 'true'"
    }
    Edge5 {
      from ACEarthGateway
      to RatedVoltageConductorAC
      description "No"
      condition "default"
    }
    Edge6 {
      from DCEarthGateway
      to RatedVoltageEarthDC
      description "Yes"
      condition "[target] = 'true'"
    }
    Edge7 {
      from DCEarthGateway
      to RatedVoltageConductorDC
      description "No"
      condition "default"
    }
  }
}

This creates a two-level branching structure:

  1. First, branch on DC vs AC ( [dc] = 'true')
  2. Then, for each branch, select conductor-to-earth vs conductor-to-conductor ( [target] = 'true')

6.6.2. Circular vs flat cable in BS 6004

subprocess Page17 {
  process_flow {
    Edge2 {
      from DimensionCableTypeGateway
      to DimensionsForCircularCables
      description "Yes"
      condition "[isCircular] = 'true'"
    }
    Edge3 {
      from DimensionCableTypeGateway
      to DimensionsForFlatCables
      description "No"
      condition "default"
    }
  }
}

The isCircular measurement is a TABLE_REFERENCE that returns ’ true ‘ or ’ false ‘ based on the cable type, determining which dimensional path to follow.

6.6.3. Voltage validation with measurement expressions

The validation expressions on processes that follow gateway branches test against specific thresholds:

process RatedVoltageEarthAC {
  name "Rated Voltage for conductor-earth (ac)"
  validate_measurement {
    "[OpV] <= 320"
  }
}
process RatedVoltageEarthDC {
  name "Rated Voltage for conductor-earth (dc)"
  validate_measurement {
    "[OpV] <= 410"
  }
}

The gateway conditions select the appropriate test path, and the validate_measurement on each process tests against the correct threshold for that path.

7. Formal grammar (EBNF)

This clause provides the EBNF grammar for measurement-related constructs in MMEL. The grammar extends the base MMEL grammar defined in MN 113.

7.1. Measurement declaration

MeasurementDecl  ::= 'measurement' IDENTIFIER '{' MeasurementField* '}'
MeasurementField ::= 'type' MEASUREMENT_TYPE
                   | 'definition' STRING
                   | 'description' STRING
MEASUREMENT_TYPE ::= 'NUMERIC'
                   | 'DATALIST'
                   | 'DERIVED'
                   | 'TRUE/FALSE'
                   | 'DURATION'
                   | 'TEXT'
                   | 'TABLE_REFERENCE'
                   | 'TABLE_OPTIONS'
                   | 'DATAITEM'

The definition field is required for DERIVED , TABLE_REFERENCE , and TABLE_OPTIONS types. It is optional (and typically absent) for NUMERIC , DATALIST , TRUE/FALSE , DURATION , and TEXT types.

The DATAITEM type is deprecated and superseded by NUMERIC .

7.2. Validation expression

ValidateMeasurement ::= 'validate_measurement' '{' STRING '}'

The STRING contains a measurement expression following the grammar below.

7.3. Measurement expression

MeasurementExpr    ::= ComparisonExpr
ComparisonExpr     ::= ArithExpr CompOp ArithExpr
                      | ArithExpr '=' STRING_LITERAL
CompOp             ::= '>=' | '<=' | '>' | '<'
ArithExpr          ::= ArithExpr ('+' | '-') MulDivExpr
                      | MulDivExpr
MulDivExpr         ::= MulDivExpr ('*' | '/') MeasurementRef
                      | MeasurementRef
MeasurementRef     ::= '[' IDENTIFIER ']' ListOp?
ListOp             ::= '.' ('max' | 'min' | 'sum' | 'count' | 'average')
STRING_LITERAL     ::= "'" ( "true" | "false" | CHAR* ) "'"

The expression grammar supports:

  • Measurement references: [MeasurementID]
  • List aggregation: [MeasurementID].max, [MeasurementID].sum, etc.
  • Arithmetic: +, -, *, /
  • Comparison: >=, <=, >, <, = (with numeric or string literal)
  • String comparison for booleans: [dc] = 'true'

7.4. Gateway edge condition

EdgeDecl          ::= 'Edge' INTEGER '{'
                      'from' IDENTIFIER 'to' IDENTIFIER
                      ('description' STRING)?
                      ('condition' EdgeCondition)? '}'
EdgeCondition     ::= MeasurementExpr
                    | '"default"'

Gateway edges may carry measurement expressions or the special ” default “ condition for the fallback path.

7.5. Table lookup definition

TableLookupDef    ::= TableID ',' ColumnIndex
                      (',' ColumnIndex ',' MeasurementID)*
TableID           ::= IDENTIFIER
ColumnIndex       ::= INTEGER

The table lookup definition is the value of the definition field in TABLE REFERENCE and TABLE OPTIONS measurements. It specifies the source table, target column, and zero or more filter column-measurement pairs.

7.6. View profile

ViewProfileDecl   ::= 'view_profile' IDENTIFIER '{' ProfileParameter* '}'
ProfileParameter  ::= 'parameter' IDENTIFIER '{'
                      'default' STRING
                      'editable' ('true' | 'false')
                      'setting' ('RECOMMEND' | 'MUST')
                      '}'

7.7. Complete measurement example in grammar

(* Numeric measurement *)
measurement NumFailLogin {
  type NUMERIC
  description "Number of failed login attempts"
}
(* DATALIST measurement *)
measurement NumConnection {
  type DATALIST
  description "Number of connections within 10 seconds (for each user)"
}
(* DERIVED measurement *)
measurement Total_Emission {
  type DERIVED
  definition "[Included_Emission].sum + [Excluded_Emission].sum"
  description "Total emission"
}
(* TRUE/FALSE measurement *)
measurement dc {
  type TRUE/FALSE
  description "The cable is for d.c."
}
(* TABLE_REFERENCE measurement *)
measurement thicknessReq {
  type TABLE_REFERENCE
  definition "data,4,0,type,2,area,3,class"
  description "Requirement of the radial thickness of insulation"
}
(* TABLE_OPTIONS measurement *)
measurement type {
  type TABLE_OPTIONS
  definition "data,0,2,area,3,class"
  description "Type of cable (e.g., 6181Y)"
}