Distribution Bus#

pydantic model gdm.distribution.components.DistributionBus#

Data model for distribution bus.

Examples

>>> from gdm import DistributionBus
>>> DistributionBus.example()

Show JSON schema
{
   "title": "DistributionBus",
   "description": "Data model for distribution bus.\n\nExamples:\n    >>> from gdm import DistributionBus\n    >>> DistributionBus.example()",
   "type": "object",
   "properties": {
      "uuid": {
         "format": "uuid",
         "title": "Uuid",
         "type": "string"
      },
      "name": {
         "title": "Name",
         "type": "string"
      },
      "substation": {
         "anyOf": [
            {
               "$ref": "#/$defs/DistributionSubstation"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Name of the substation."
      },
      "feeder": {
         "anyOf": [
            {
               "$ref": "#/$defs/DistributionFeeder"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Name of the feeder."
      },
      "in_service": {
         "default": true,
         "description": "Is the component in service?",
         "title": "In Service",
         "type": "boolean"
      },
      "voltage_type": {
         "$ref": "#/$defs/VoltageTypes",
         "description": "Voltage types for buses."
      },
      "phases": {
         "description": "List of phases for this bus.",
         "items": {
            "$ref": "#/$defs/Phase"
         },
         "title": "Phases",
         "type": "array"
      },
      "voltagelimits": {
         "default": [],
         "description": "List of voltage limit sets for this bus.",
         "items": {
            "$ref": "#/$defs/VoltageLimitSet"
         },
         "title": "Voltagelimits",
         "type": "array"
      },
      "rated_voltage": {
         "default": "OVERHEAD",
         "description": "rated voltage for this bus.",
         "title": "Rated Voltage",
         "type": "string"
      },
      "coordinate": {
         "anyOf": [
            {
               "$ref": "#/$defs/Location"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Coordinate for the power system bus."
      }
   },
   "$defs": {
      "DistributionFeeder": {
         "additionalProperties": false,
         "description": "Class interface for distribution feeder.",
         "properties": {
            "uuid": {
               "format": "uuid",
               "title": "Uuid",
               "type": "string"
            },
            "name": {
               "title": "Name",
               "type": "string"
            }
         },
         "required": [
            "name"
         ],
         "title": "DistributionFeeder",
         "type": "object"
      },
      "DistributionSubstation": {
         "additionalProperties": false,
         "description": "Class interface for distribution feeder.",
         "properties": {
            "uuid": {
               "format": "uuid",
               "title": "Uuid",
               "type": "string"
            },
            "name": {
               "title": "Name",
               "type": "string"
            },
            "feeders": {
               "description": "List of feeders for this substation.",
               "items": {
                  "$ref": "#/$defs/DistributionFeeder"
               },
               "title": "Feeders",
               "type": "array"
            }
         },
         "required": [
            "name",
            "feeders"
         ],
         "title": "DistributionSubstation",
         "type": "object"
      },
      "LimitType": {
         "description": "Operational limit types.",
         "enum": [
            "min",
            "max"
         ],
         "title": "LimitType",
         "type": "string"
      },
      "Location": {
         "additionalProperties": false,
         "description": "Specifies geographic location.",
         "properties": {
            "uuid": {
               "format": "uuid",
               "title": "Uuid",
               "type": "string"
            },
            "name": {
               "default": "",
               "title": "Name",
               "type": "string"
            },
            "x": {
               "title": "X",
               "type": "number"
            },
            "y": {
               "title": "Y",
               "type": "number"
            },
            "crs": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Crs"
            }
         },
         "required": [
            "x",
            "y"
         ],
         "title": "Location",
         "type": "object"
      },
      "Phase": {
         "description": "This class is used to represent a single phase from a set of possible values.",
         "enum": [
            "A",
            "B",
            "C",
            "N",
            "S1",
            "S2"
         ],
         "title": "Phase",
         "type": "string"
      },
      "VoltageLimitSet": {
         "additionalProperties": false,
         "description": "Data model for voltage limit set.",
         "properties": {
            "uuid": {
               "format": "uuid",
               "title": "Uuid",
               "type": "string"
            },
            "name": {
               "default": "",
               "description": "Name of the voltage limit set.",
               "title": "Name",
               "type": "string"
            },
            "limit_type": {
               "$ref": "#/$defs/LimitType",
               "description": "Limit type used."
            },
            "value": {
               "default": "OVERHEAD",
               "description": "Voltage threshold.",
               "title": "Value",
               "type": "string"
            }
         },
         "required": [
            "limit_type",
            "value"
         ],
         "title": "VoltageLimitSet",
         "type": "object"
      },
      "VoltageTypes": {
         "description": "Identifier of voltage types referenced in distribution models.",
         "enum": [
            "line-to-line",
            "line-to-ground"
         ],
         "title": "VoltageTypes",
         "type": "string"
      }
   },
   "additionalProperties": false,
   "required": [
      "name",
      "voltage_type",
      "phases",
      "rated_voltage"
   ]
}

Config:
  • str_strip_whitespace: bool = True

  • validate_assignment: bool = True

  • validate_default: bool = True

  • extra: str = forbid

  • use_enum_values: bool = False

  • arbitrary_types_allowed: bool = True

  • populate_by_name: bool = True

Fields:
  • coordinate (infrasys.location.Location | None)

  • feeder (gdm.distribution.components.distribution_feeder.DistributionFeeder | None)

  • in_service (bool)

  • name (str)

  • phases (list[gdm.distribution.enums.Phase])

  • rated_voltage (infrasys.quantities.Voltage)

  • substation (gdm.distribution.components.distribution_substation.DistributionSubstation | None)

  • uuid (uuid.UUID)

  • voltage_type (gdm.distribution.enums.VoltageTypes)

  • voltagelimits (list[gdm.distribution.common.limitset.VoltageLimitSet])

field coordinate: Annotated[Location | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Coordinate for the power system bus.')] = None#

Coordinate for the power system bus.

field feeder: Annotated[DistributionFeeder | None, Field(None, description='Name of the feeder.')] = None#

Name of the feeder.

field in_service: Annotated[bool, Field(True, description='Is the component in service?')] = True#

Is the component in service?

field phases: Annotated[list[Phase], FieldInfo(annotation=NoneType, required=True, description='List of phases for this bus.')] [Required]#

List of phases for this bus.

field rated_voltage: ', metadata=[Gt(gt=0)])] [Required]#

rated voltage for this bus.

Constraints:
  • json_schema = {‘type’: ‘string’, ‘default’: ‘OVERHEAD’}

  • gt = 0

field substation: Annotated[DistributionSubstation | None, Field(None, description='Name of the substation.')] = None#

Name of the substation.

field voltage_type: Annotated[VoltageTypes, FieldInfo(annotation=NoneType, required=True, description='Voltage types for buses.')] [Required]#

Voltage types for buses.

field voltagelimits: Annotated[list[VoltageLimitSet], FieldInfo(annotation=NoneType, required=False, default=[], description='List of voltage limit sets for this bus.')] = []#

List of voltage limit sets for this bus.