Criterion

PartDraftv1.0.0-rc.2

A criterion: one rule that must be checked. It compares a metric, summed up by a statistic over a period, with a limit, for the features it applies to.

https://opendevelopmentstandards.org/schema/1.0.0-rc.2/core/Criterion.json

Fields

  • id
    textnot empty

    The record's id: unique within the document.

  • nameRequired
    text

    The name people use for the record.

  • description
    text

    What the record is, in words.

  • citation

    The part of the published framework that states the rule, such as its section, its table or its numbered requirement.

  • metric

    What is measured or calculated, as a code from a quantities vocabulary, such as a_weighted_sound_pressure_level.

  • statistic

    How the metric sums up the data, such as the energy mean.

  • averaging
    duration (ISO 8601)

    The time each value of the metric covers, such as PT1H.

  • period

    The window that repeats which the metric covers, such as night-time.

  • comparison
    One ofthe codes below

    How the metric is compared with the limit.

    less
    The metric must be less than the limit.
    less_or_equal
    The metric must be at most the limit.
    greater
    The metric must be more than the limit.
    greater_or_equal
    The metric must be at least the limit.
    equal
    The metric must equal the limit.
  • limit

    The limit: a Value, a variable, or a formula, such as the ambient level plus 5 dB.

  • appliesTo
  • when

    When the criterion applies. Leave it out when it always applies.

  • mode
    One ofthe codes below

    How the criterion combines with the other criteria that apply.

    additive
    Its controls add to the governing set.
    exclusive
    It replaces the controls of the other criteria that apply.
    restrictive
    Only its stricter controls add to the governing set.
    mandatory
    It always applies.
  • priority
    number

    Its order among criteria that apply together: higher first.

  • dependencies

    The criteria that must be checked first.

  • controls

    The controls that hold when the criterion applies.

AppliesTo

What the criterion applies to. A feature must match every list given.

Links

Examples

An id that another example defines opens that record.

Example 2

{
  "id": "criterion-night",
  "name": "Night-time permissible sound level",
  "metric": "a_weighted_sound_pressure_level",
  "statistic": {
    "type": "energy_mean"
  },
  "period": "period-night",
  "comparison": "less_or_equal",
  "limit": {
    "variable": "variable-night-psl"
  },
  "appliesTo": {
    "receptorClasses": [
      "dwelling"
    ]
  },
  "mode": "mandatory"
}
Show 1 more example

Example 1

{
  "id": "criterion-1",
  "name": "Night-time permissible sound level"
}

Changes and file

Changes

  1. 0.1.0 First version.

Schema file

Show the JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://opendevelopmentstandards.org/schema/1.0.0-rc.2/core/Criterion.json",
  "title": "Criterion",
  "description": "A criterion: one rule that must be checked. It compares a metric, summed up by a statistic over a period, with a limit, for the features it applies to.",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "minLength": 1,
      "description": "The record's id: unique within the document."
    },
    "name": {
      "type": "string",
      "description": "The name people use for the record."
    },
    "description": {
      "type": "string",
      "description": "What the record is, in words."
    },
    "citation": {
      "$ref": "Citation.json",
      "description": "The part of the published framework that states the rule, such as its section, its table or its numbered requirement."
    },
    "metric": {
      "type": "string",
      "pattern": "^[a-z0-9]+(_[a-z0-9]+)*(\\.[a-z0-9]+(_[a-z0-9]+)*)*$",
      "x-ods-vocabulary": "*/quantities",
      "description": "What is measured or calculated, as a code from a quantities vocabulary, such as `a_weighted_sound_pressure_level`."
    },
    "statistic": {
      "$ref": "Statistic.json",
      "description": "How the metric sums up the data, such as the energy mean."
    },
    "averaging": {
      "type": "string",
      "pattern": "^-?P(?!$)(\\d+(\\.\\d+)?Y)?(\\d+(\\.\\d+)?M)?(\\d+(\\.\\d+)?W)?(\\d+(\\.\\d+)?D)?(T(?=\\d)(\\d+(\\.\\d+)?H)?(\\d+(\\.\\d+)?M)?(\\d+(\\.\\d+)?S)?)?$",
      "description": "The time each value of the metric covers, such as PT1H."
    },
    "period": {
      "type": "string",
      "minLength": 1,
      "x-ods-ref": "Period",
      "description": "The window that repeats which the metric covers, such as night-time."
    },
    "comparison": {
      "type": "string",
      "enum": [
        "less",
        "less_or_equal",
        "greater",
        "greater_or_equal",
        "equal"
      ],
      "description": "How the metric is compared with the limit.",
      "x-ods-options": [
        {
          "value": "less",
          "title": "Less",
          "description": "The metric must be less than the limit."
        },
        {
          "value": "less_or_equal",
          "title": "Less or equal",
          "description": "The metric must be at most the limit."
        },
        {
          "value": "greater",
          "title": "Greater",
          "description": "The metric must be more than the limit."
        },
        {
          "value": "greater_or_equal",
          "title": "Greater or equal",
          "description": "The metric must be at least the limit."
        },
        {
          "value": "equal",
          "title": "Equal",
          "description": "The metric must equal the limit."
        }
      ]
    },
    "limit": {
      "$ref": "Expression.json",
      "description": "The limit: a Value, a variable, or a formula, such as the ambient level plus 5 dB."
    },
    "appliesTo": {
      "$ref": "#/$defs/AppliesTo"
    },
    "when": {
      "$ref": "Expression.json",
      "description": "When the criterion applies. Leave it out when it always applies."
    },
    "mode": {
      "type": "string",
      "enum": [
        "additive",
        "exclusive",
        "restrictive",
        "mandatory"
      ],
      "description": "How the criterion combines with the other criteria that apply.",
      "x-ods-options": [
        {
          "value": "additive",
          "title": "Additive",
          "description": "Its controls add to the governing set."
        },
        {
          "value": "exclusive",
          "title": "Exclusive",
          "description": "It replaces the controls of the other criteria that apply."
        },
        {
          "value": "restrictive",
          "title": "Restrictive",
          "description": "Only its stricter controls add to the governing set."
        },
        {
          "value": "mandatory",
          "title": "Mandatory",
          "description": "It always applies."
        }
      ]
    },
    "priority": {
      "type": "number",
      "description": "Its order among criteria that apply together: higher first."
    },
    "dependencies": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1,
        "x-ods-ref": "Criterion"
      },
      "description": "The criteria that must be checked first."
    },
    "controls": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1,
        "x-ods-ref": "Control"
      },
      "description": "The controls that hold when the criterion applies."
    }
  },
  "required": [
    "name"
  ],
  "patternProperties": {
    "^x-": {}
  },
  "unevaluatedProperties": false,
  "$defs": {
    "AppliesTo": {
      "type": "object",
      "properties": {
        "featureTypes": {
          "type": "array",
          "items": {
            "type": "string",
            "pattern": "^[a-z0-9]+(_[a-z0-9]+)*(\\.[a-z0-9]+(_[a-z0-9]+)*)*$",
            "x-ods-vocabulary": "core/feature_types",
            "description": "A feature type."
          },
          "description": "The feature types the criterion applies to."
        },
        "receptorClasses": {
          "type": "array",
          "items": {
            "type": "string",
            "pattern": "^[a-z0-9]+(_[a-z0-9]+)*(\\.[a-z0-9]+(_[a-z0-9]+)*)*$",
            "x-ods-vocabulary": "core/receptor_classes",
            "description": "A receptor class."
          },
          "description": "The receptor classes the criterion applies to."
        },
        "features": {
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1,
            "x-ods-ref": "Feature"
          },
          "description": "The features the criterion applies to, by id."
        }
      },
      "description": "What the criterion applies to. A feature must match every list given.",
      "patternProperties": {
        "^x-": {}
      },
      "unevaluatedProperties": false
    }
  },
  "examples": [
    {
      "id": "criterion-1",
      "name": "Night-time permissible sound level"
    },
    {
      "id": "criterion-night",
      "name": "Night-time permissible sound level",
      "metric": "a_weighted_sound_pressure_level",
      "statistic": {
        "type": "energy_mean"
      },
      "period": "period-night",
      "comparison": "less_or_equal",
      "limit": {
        "variable": "variable-night-psl"
      },
      "appliesTo": {
        "receptorClasses": [
          "dwelling"
        ]
      },
      "mode": "mandatory"
    }
  ],
  "x-ods-status": "draft",
  "x-ods-kind": "part",
  "x-ods-module": "core",
  "x-ods-changes": {
    "0.1.0": "First version."
  }
}