Distribution Branch#

pydantic model gdm.distribution.components.SequenceImpedanceBranch#

Data model for sequence impedance branch.

Show JSON schema
{
   "title": "SequenceImpedanceBranch",
   "description": "Data model for sequence impedance branch.",
   "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"
      },
      "buses": {
         "description": "List of buses connecting a branch.",
         "items": {
            "$ref": "#/$defs/DistributionBus"
         },
         "title": "Buses",
         "type": "array"
      },
      "length": {
         "description": "Length of the branch.",
         "title": "Length",
         "type": "string"
      },
      "phases": {
         "description": "List of phases in the same order as conductors.",
         "items": {
            "$ref": "#/$defs/Phase"
         },
         "title": "Phases",
         "type": "array"
      },
      "equipment": {
         "$ref": "#/$defs/SequenceImpedanceBranchEquipment",
         "description": "Sequence impedance branch."
      }
   },
   "$defs": {
      "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": {
               "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"
      },
      "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"
      },
      "SequenceImpedanceBranchEquipment": {
         "additionalProperties": false,
         "description": "Data model for sequence impedance branch.",
         "properties": {
            "uuid": {
               "format": "uuid",
               "title": "Uuid",
               "type": "string"
            },
            "name": {
               "title": "Name",
               "type": "string"
            },
            "pos_seq_resistance": {
               "description": "Per unit length positive sequence resistance.",
               "title": "Pos Seq Resistance",
               "type": "string"
            },
            "zero_seq_resistance": {
               "description": "Per unit length zero sequence impedance.",
               "title": "Zero Seq Resistance",
               "type": "string"
            },
            "pos_seq_reactance": {
               "description": "Per unit length positive sequence impedance.",
               "title": "Pos Seq Reactance",
               "type": "string"
            },
            "zero_seq_reactance": {
               "description": "Per unit length zero sequence impedance.",
               "title": "Zero Seq Reactance",
               "type": "string"
            },
            "pos_seq_capacitance": {
               "description": "Per unit length positive sequence capacitance.",
               "title": "Pos Seq Capacitance",
               "type": "string"
            },
            "zero_seq_capacitance": {
               "description": "Per unit length zero sequence capacitance.",
               "title": "Zero Seq Capacitance",
               "type": "string"
            },
            "ampacity": {
               "description": "Ampacity of the conductor.",
               "title": "Ampacity",
               "type": "string"
            }
         },
         "required": [
            "name",
            "pos_seq_resistance",
            "zero_seq_resistance",
            "pos_seq_reactance",
            "zero_seq_reactance",
            "pos_seq_capacitance",
            "zero_seq_capacitance",
            "ampacity"
         ],
         "title": "SequenceImpedanceBranchEquipment",
         "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": {
               "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",
      "buses",
      "length",
      "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:
  • buses (list[gdm.distribution.components.distribution_bus.DistributionBus])

  • equipment (gdm.distribution.equipment.sequence_impedance_branch_equipment.SequenceImpedanceBranchEquipment)

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

  • in_service (bool)

  • length (infrasys.quantities.Distance)

  • name (str)

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

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

  • uuid (uuid.UUID)

Validators:
  • validate_fields » all fields

  • validate_fields_base » all fields

field buses: Annotated[list[DistributionBus], Field(..., description='List of buses connecting a branch.')] [Required]#

List of buses connecting a branch.

Validated by:
  • validate_fields

  • validate_fields_base

field equipment: Annotated[SequenceImpedanceBranchEquipment, FieldInfo(annotation=NoneType, required=True, description='Sequence impedance branch.')] [Required]#

Sequence impedance branch.

Validated by:
  • validate_fields

  • validate_fields_base

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

Name of the feeder.

Validated by:
  • validate_fields

  • validate_fields_base

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

Is the component in service?

Validated by:
  • validate_fields

  • validate_fields_base

field length: Annotated[Distance, PINT_SCHEMA, Field(..., description='Length of the branch.', gt=0)] [Required]#

Length of the branch.

Constraints:
  • json_schema = {‘type’: ‘string’}

  • gt = 0

Validated by:
  • validate_fields

  • validate_fields_base

field phases: Annotated[list[Phase], Field(..., description='List of phases in the same order as conductors.')] [Required]#

List of phases in the same order as conductors.

Validated by:
  • validate_fields

  • validate_fields_base

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

Name of the substation.

Validated by:
  • validate_fields

  • validate_fields_base

validator validate_fields_base  »  all fields#

Custom validator for base distribution branch.

pydantic model gdm.distribution.components.MatrixImpedanceBranch#

Data model for matrix impedance branch.

Show JSON schema
{
   "title": "MatrixImpedanceBranch",
   "description": "Data model for matrix impedance branch.",
   "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"
      },
      "buses": {
         "description": "List of buses connecting a branch.",
         "items": {
            "$ref": "#/$defs/DistributionBus"
         },
         "title": "Buses",
         "type": "array"
      },
      "length": {
         "default": "OVERHEAD",
         "description": "Length of the branch.",
         "title": "Length",
         "type": "string"
      },
      "phases": {
         "description": "List of phases in the same order as conductors.",
         "items": {
            "$ref": "#/$defs/Phase"
         },
         "title": "Phases",
         "type": "array"
      },
      "equipment": {
         "$ref": "#/$defs/MatrixImpedanceBranchEquipment",
         "description": "Matrix impedance branch equipment."
      }
   },
   "$defs": {
      "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": "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."
            }
         },
         "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"
      },
      "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"
      },
      "MatrixImpedanceBranchEquipment": {
         "additionalProperties": false,
         "properties": {
            "uuid": {
               "format": "uuid",
               "title": "Uuid",
               "type": "string"
            },
            "name": {
               "title": "Name",
               "type": "string"
            },
            "construction": {
               "default": "OVERHEAD",
               "description": "Construction type of MatrixImpedanceBranchEquipmentBase.",
               "type": "string"
            },
            "r_matrix": {
               "default": "OVERHEAD",
               "description": "Per unit length resistance matrix.",
               "title": "R Matrix",
               "type": "string"
            },
            "x_matrix": {
               "default": "OVERHEAD",
               "description": "Per unit length reactance matrix.",
               "title": "X Matrix",
               "type": "string"
            },
            "c_matrix": {
               "default": "OVERHEAD",
               "description": "Per unit length capacitance matrix.",
               "title": "C Matrix",
               "type": "string"
            },
            "ampacity": {
               "default": "OVERHEAD",
               "description": "Ampacity of the conductor.",
               "title": "Ampacity",
               "type": "string"
            }
         },
         "required": [
            "name",
            "r_matrix",
            "x_matrix",
            "c_matrix",
            "ampacity"
         ],
         "title": "MatrixImpedanceBranchEquipment",
         "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",
      "buses",
      "length",
      "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:
  • buses (list[gdm.distribution.components.distribution_bus.DistributionBus])

  • equipment (gdm.distribution.equipment.matrix_impedance_branch_equipment.MatrixImpedanceBranchEquipment)

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

  • in_service (bool)

  • length (infrasys.quantities.Distance)

  • name (str)

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

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

  • uuid (uuid.UUID)

Validators:
  • validate_fields » all fields

  • validate_fields_base » all fields

field buses: Annotated[list[DistributionBus], Field(..., description='List of buses connecting a branch.')] [Required]#

List of buses connecting a branch.

Validated by:
  • validate_fields

  • validate_fields_base

field equipment: Annotated[MatrixImpedanceBranchEquipment, FieldInfo(annotation=NoneType, required=True, description='Matrix impedance branch equipment.')] [Required]#

Matrix impedance branch equipment.

Validated by:
  • validate_fields

  • validate_fields_base

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

Name of the feeder.

Validated by:
  • validate_fields

  • validate_fields_base

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

Is the component in service?

Validated by:
  • validate_fields

  • validate_fields_base

field length: Annotated[Distance, PINT_SCHEMA, Field(..., description='Length of the branch.', gt=0)] [Required]#

Length of the branch.

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

  • gt = 0

Validated by:
  • validate_fields

  • validate_fields_base

field phases: Annotated[list[Phase], Field(..., description='List of phases in the same order as conductors.')] [Required]#

List of phases in the same order as conductors.

Validated by:
  • validate_fields

  • validate_fields_base

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

Name of the substation.

Validated by:
  • validate_fields

  • validate_fields_base

validator validate_fields_base  »  all fields#

Custom validator for base distribution branch.

pydantic model gdm.distribution.components.GeometryBranch#

Data model for distribution branches based on line geometry.

Show JSON schema
{
   "title": "GeometryBranch",
   "description": "Data model for distribution branches based on line geometry.",
   "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"
      },
      "buses": {
         "description": "List of buses connecting a branch.",
         "items": {
            "$ref": "#/$defs/DistributionBus"
         },
         "title": "Buses",
         "type": "array"
      },
      "length": {
         "default": 1.0,
         "description": "Length of the branch.",
         "title": "Length",
         "type": "string"
      },
      "phases": {
         "description": "List of phases in the same order as conductors.",
         "items": {
            "$ref": "#/$defs/Phase"
         },
         "title": "Phases",
         "type": "array"
      },
      "equipment": {
         "$ref": "#/$defs/GeometryBranchEquipment",
         "description": "Geometry branch equipment."
      }
   },
   "$defs": {
      "BareConductorEquipment": {
         "additionalProperties": false,
         "description": "Data model for conductor catalaog.",
         "properties": {
            "uuid": {
               "format": "uuid",
               "title": "Uuid",
               "type": "string"
            },
            "name": {
               "title": "Name",
               "type": "string"
            },
            "conductor_diameter": {
               "default": 1.0,
               "description": "Diameter of the conductor.",
               "title": "Conductor Diameter",
               "type": "string"
            },
            "conductor_gmr": {
               "default": 1.0,
               "description": "Geometric mean radius of the conductor.",
               "title": "Conductor Gmr",
               "type": "string"
            },
            "ampacity": {
               "default": 1.0,
               "description": "Ampacity of the conductor.",
               "title": "Ampacity",
               "type": "string"
            },
            "ac_resistance": {
               "default": 1.0,
               "description": "Per unit length positive alternating current resistance of the conductor.",
               "title": "Ac Resistance",
               "type": "string"
            },
            "emergency_ampacity": {
               "default": 1.0,
               "description": "Emergency ampacity for this conductor.",
               "title": "Emergency Ampacity",
               "type": "string"
            },
            "dc_resistance": {
               "default": 1.0,
               "description": "Per unit length positive direct current resistance of the conductor.",
               "title": "Dc Resistance",
               "type": "string"
            }
         },
         "required": [
            "name",
            "conductor_diameter",
            "conductor_gmr",
            "ampacity",
            "ac_resistance",
            "emergency_ampacity",
            "dc_resistance"
         ],
         "title": "BareConductorEquipment",
         "type": "object"
      },
      "ConcentricCableEquipment": {
         "additionalProperties": false,
         "description": "Data model for cable catalog.",
         "properties": {
            "uuid": {
               "format": "uuid",
               "title": "Uuid",
               "type": "string"
            },
            "name": {
               "title": "Name",
               "type": "string"
            },
            "strand_diameter": {
               "default": 1.0,
               "description": "Diameter of the cable strand.",
               "title": "Strand Diameter",
               "type": "string"
            },
            "conductor_diameter": {
               "default": 1.0,
               "description": "Diameter of the conductor inside cable.",
               "title": "Conductor Diameter",
               "type": "string"
            },
            "cable_diameter": {
               "default": 1.0,
               "description": "Diameter of the cable.",
               "title": "Cable Diameter",
               "type": "string"
            },
            "insulation_thickness": {
               "default": 1.0,
               "description": "Thickness of insulation.",
               "title": "Insulation Thickness",
               "type": "string"
            },
            "insulation_diameter": {
               "default": 1.0,
               "description": "Diameter of the insulation.",
               "title": "Insulation Diameter",
               "type": "string"
            },
            "ampacity": {
               "default": 1.0,
               "description": "Ampacity of the conductor.",
               "title": "Ampacity",
               "type": "string"
            },
            "conductor_gmr": {
               "default": 1.0,
               "description": "Geometric mean radius of the conductor.",
               "title": "Conductor Gmr",
               "type": "string"
            },
            "strand_gmr": {
               "default": 1.0,
               "description": "Geometric mean radius of the strand.",
               "title": "Strand Gmr",
               "type": "string"
            },
            "phase_ac_resistance": {
               "default": 1.0,
               "description": "Per unit length conductor ac resistance.",
               "title": "Phase Ac Resistance",
               "type": "string"
            },
            "strand_ac_resistance": {
               "default": 1.0,
               "description": "Per unit length ac resistance of the strand.",
               "title": "Strand Ac Resistance",
               "type": "string"
            },
            "num_neutral_strands": {
               "description": "Number of neutral strands in the cable.",
               "exclusiveMinimum": 0,
               "title": "Num Neutral Strands",
               "type": "integer"
            },
            "rated_voltage": {
               "default": 1.0,
               "description": "Rated voltage for the cable.",
               "title": "Rated Voltage",
               "type": "string"
            },
            "insulation": {
               "default": 2.25,
               "description": "Wire insulation type",
               "type": "string"
            }
         },
         "required": [
            "name",
            "strand_diameter",
            "conductor_diameter",
            "cable_diameter",
            "insulation_thickness",
            "insulation_diameter",
            "ampacity",
            "conductor_gmr",
            "strand_gmr",
            "phase_ac_resistance",
            "strand_ac_resistance",
            "num_neutral_strands",
            "rated_voltage"
         ],
         "title": "ConcentricCableEquipment",
         "type": "object"
      },
      "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": 1.0,
               "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"
      },
      "GeometryBranchEquipment": {
         "additionalProperties": false,
         "description": "Data model for geometry branch info.",
         "properties": {
            "uuid": {
               "format": "uuid",
               "title": "Uuid",
               "type": "string"
            },
            "name": {
               "title": "Name",
               "type": "string"
            },
            "conductors": {
               "anyOf": [
                  {
                     "items": {
                        "$ref": "#/$defs/BareConductorEquipment"
                     },
                     "type": "array"
                  },
                  {
                     "items": {
                        "$ref": "#/$defs/ConcentricCableEquipment"
                     },
                     "type": "array"
                  }
               ],
               "description": "List of overhead wires or cables.",
               "title": "Conductors"
            },
            "horizontal_positions": {
               "default": 2.25,
               "description": "Horizontal position of the conductor.",
               "title": "Horizontal Positions",
               "type": "string"
            },
            "vertical_positions": {
               "default": 2.25,
               "description": "Vertical position of the conductor.",
               "title": "Vertical Positions",
               "type": "string"
            },
            "insulation": {
               "default": 1.0,
               "description": "Wire insulation type",
               "type": "string"
            }
         },
         "required": [
            "name",
            "conductors",
            "horizontal_positions",
            "vertical_positions"
         ],
         "title": "GeometryBranchEquipment",
         "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": 1.0,
               "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",
      "buses",
      "length",
      "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:
  • buses (list[gdm.distribution.components.distribution_bus.DistributionBus])

  • equipment (gdm.distribution.equipment.geometry_branch_equipment.GeometryBranchEquipment)

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

  • in_service (bool)

  • length (infrasys.quantities.Distance)

  • name (str)

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

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

  • uuid (uuid.UUID)

Validators:
  • validate_fields_base » all fields

field buses: Annotated[list[DistributionBus], Field(..., description='List of buses connecting a branch.')] [Required]#

List of buses connecting a branch.

Validated by:
  • validate_fields_base

field equipment: Annotated[GeometryBranchEquipment, FieldInfo(annotation=NoneType, required=True, description='Geometry branch equipment.')] [Required]#

Geometry branch equipment.

Validated by:
  • validate_fields_base

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

Name of the feeder.

Validated by:
  • validate_fields_base

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

Is the component in service?

Validated by:
  • validate_fields_base

field length: Annotated[Distance, PINT_SCHEMA, Field(..., description='Length of the branch.', gt=0)] [Required]#

Length of the branch.

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

  • gt = 0

Validated by:
  • validate_fields_base

field phases: Annotated[list[Phase], Field(..., description='List of phases in the same order as conductors.')] [Required]#

List of phases in the same order as conductors.

Validated by:
  • validate_fields_base

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

Name of the substation.

Validated by:
  • validate_fields_base

to_matrix_representation(frequency_hz: float = 60, soil_resistivity_ohm_m: float = 100) MatrixImpedanceBranch#

Converts the geometry-based branch model to a matrix impedance representation.

This method transforms the current GeometryBranch instance into a MatrixImpedanceBranch by calculating the impedance matrix based on the specified frequency and soil resistivity. The conversion process involves using the equipment’s matrix representation method to obtain the necessary impedance data.

Parameters:
  • frequency_hz (float, optional) – The frequency in hertz used for impedance calculations. Defaults to 60 Hz.

  • soil_resistivity_ohm_m (float, optional) – The soil resistivity in ohm-meters used for impedance calculations. Defaults to 100 ohm-m.

Returns:

A new instance of MatrixImpedanceBranch representing the converted geometry branch.

Return type:

MatrixImpedanceBranch

Notes

  • The method uses the number of neutral phases to assist in the impedance calculation.

  • This conversion is essential for systems that require matrix impedance representations

for detailed electrical analysis.

validator validate_fields_base  »  all fields#

Custom validator for base distribution branch.