Distribution Load#

pydantic model gdm.distribution.components.DistributionLoad#

Data model for distribution load.

Show JSON schema
{
   "title": "DistributionLoad",
   "description": "Data model for distribution load.",
   "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"
      },
      "bus": {
         "$ref": "#/$defs/DistributionBus",
         "description": "Distribution bus to which this load is connected to."
      },
      "phases": {
         "description": "Phases to which this load is connected to.",
         "items": {
            "$ref": "#/$defs/Phase"
         },
         "title": "Phases",
         "type": "array"
      },
      "equipment": {
         "$ref": "#/$defs/LoadEquipment",
         "description": "Load model."
      }
   },
   "$defs": {
      "ConnectionType": {
         "description": "Winding connection types.",
         "enum": [
            "STAR",
            "DELTA",
            "OPEN_DELTA",
            "OPEN_STAR",
            "ZIG_ZAG"
         ],
         "title": "ConnectionType",
         "type": "string"
      },
      "DistributionBus": {
         "additionalProperties": false,
         "description": "Data model for distribution bus.\n\nExamples:\n    >>> from gdm import DistributionBus\n    >>> DistributionBus.example()",
         "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": "0 kilovar",
               "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."
            }
         },
         "required": [
            "name",
            "voltage_type",
            "phases",
            "rated_voltage"
         ],
         "title": "DistributionBus",
         "type": "object"
      },
      "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"
      },
      "LoadEquipment": {
         "additionalProperties": false,
         "description": "Data model for load model.",
         "properties": {
            "uuid": {
               "format": "uuid",
               "title": "Uuid",
               "type": "string"
            },
            "name": {
               "title": "Name",
               "type": "string"
            },
            "phase_loads": {
               "description": "List of phase loads.",
               "items": {
                  "$ref": "#/$defs/PhaseLoadEquipment"
               },
               "title": "Phase Loads",
               "type": "array"
            },
            "connection_type": {
               "$ref": "#/$defs/ConnectionType",
               "default": "STAR",
               "description": "Connection type for multi phase load."
            }
         },
         "required": [
            "name",
            "phase_loads"
         ],
         "title": "LoadEquipment",
         "type": "object"
      },
      "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"
      },
      "PhaseLoadEquipment": {
         "additionalProperties": false,
         "description": "Data model for single phase load equipment.",
         "properties": {
            "uuid": {
               "format": "uuid",
               "title": "Uuid",
               "type": "string"
            },
            "name": {
               "title": "Name",
               "type": "string"
            },
            "real_power": {
               "default": "0 kilowatt",
               "description": "Base real power for the ZIP model. (P_0) ",
               "title": "Real Power",
               "type": "string"
            },
            "reactive_power": {
               "default": "0 kilovar",
               "description": "Base reactive power for the ZIP model. (Q_0) ",
               "title": "Reactive Power",
               "type": "string"
            },
            "z_real": {
               "description": "Constant impedance zip load real component. (a_p)",
               "title": "Z Real",
               "type": "number"
            },
            "z_imag": {
               "description": "Constant impedance zip load imaginary component. (a_q)",
               "title": "Z Imag",
               "type": "number"
            },
            "i_real": {
               "description": "Constant current zip load real component. (b_p)",
               "title": "I Real",
               "type": "number"
            },
            "i_imag": {
               "description": "Constant current zip load imaginary component. (b_q)",
               "title": "I Imag",
               "type": "number"
            },
            "p_real": {
               "description": "Constant power zip load real component. (c_p)",
               "title": "P Real",
               "type": "number"
            },
            "p_imag": {
               "description": "Constant power zip load imaginary component. (c_q)",
               "title": "P Imag",
               "type": "number"
            },
            "num_customers": {
               "anyOf": [
                  {
                     "exclusiveMinimum": 0,
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "Number of customers for this load",
               "title": "Num Customers"
            }
         },
         "required": [
            "name",
            "z_real",
            "z_imag",
            "i_real",
            "i_imag",
            "p_real",
            "p_imag"
         ],
         "title": "PhaseLoadEquipment",
         "type": "object"
      },
      "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": "0 kilovar",
               "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",
      "bus",
      "phases",
      "equipment"
   ]
}

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:
  • bus (gdm.distribution.components.distribution_bus.DistributionBus)

  • equipment (gdm.distribution.equipment.load_equipment.LoadEquipment)

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

  • in_service (bool)

  • name (str)

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

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

  • uuid (uuid.UUID)

Validators:
  • validate_fields » all fields

field bus: Annotated[DistributionBus, FieldInfo(annotation=NoneType, required=True, description='Distribution bus to which this load is connected to.')] [Required]#

Distribution bus to which this load is connected to.

Validated by:
  • validate_fields

field equipment: Annotated[LoadEquipment, FieldInfo(annotation=NoneType, required=True, description='Load model.')] [Required]#

Load model.

Validated by:
  • validate_fields

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

Name of the feeder.

Validated by:
  • validate_fields

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

Is the component in service?

Validated by:
  • validate_fields

field phases: Annotated[list[Phase], FieldInfo(annotation=NoneType, required=True, description='Phases to which this load is connected to.')] [Required]#

Phases to which this load is connected to.

Validated by:
  • validate_fields

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

Name of the substation.

Validated by:
  • validate_fields

classmethod aggregate(instances: list[DistributionLoad], bus: DistributionBus, name: str, split_phase_mapping: dict[str, set[Phase]]) Self#