Distribution Regulator#

pydantic model gdm.distribution.components.DistributionRegulator#

Show JSON schema
{
   "title": "DistributionRegulator",
   "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 distribution buses in the same order as windings. ",
         "items": {
            "$ref": "#/$defs/DistributionBus"
         },
         "title": "Buses",
         "type": "array"
      },
      "winding_phases": {
         "description": "List of phases for each winding, using the winding\n            order defined in the DistributionTransformerModel",
         "items": {
            "items": {
               "$ref": "#/$defs/Phase"
            },
            "type": "array"
         },
         "title": "Winding Phases",
         "type": "array"
      },
      "equipment": {
         "$ref": "#/$defs/DistributionTransformerEquipment",
         "description": "Transformer info object."
      },
      "controllers": {
         "description": "The regulators that are used to control voltage on each phase of the transformer",
         "items": {
            "$ref": "#/$defs/RegulatorController"
         },
         "title": "Controllers",
         "type": "array"
      }
   },
   "$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": null,
               "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"
      },
      "DistributionTransformerEquipment": {
         "additionalProperties": false,
         "description": "Data model for distribution transformer info.",
         "properties": {
            "uuid": {
               "format": "uuid",
               "title": "Uuid",
               "type": "string"
            },
            "name": {
               "title": "Name",
               "type": "string"
            },
            "mounting": {
               "$ref": "#/$defs/TransformerMounting",
               "default": "POLE_MOUNT"
            },
            "pct_no_load_loss": {
               "description": "Percentage no load losses for this transformer.",
               "maximum": 100.0,
               "minimum": 0.0,
               "title": "Pct No Load Loss",
               "type": "number"
            },
            "pct_full_load_loss": {
               "description": "Percentage no load losses for this transformer.",
               "maximum": 100.0,
               "minimum": 0.0,
               "title": "Pct Full Load Loss",
               "type": "number"
            },
            "windings": {
               "description": "List of windings for this transformer.",
               "items": {
                  "$ref": "#/$defs/WindingEquipment"
               },
               "title": "Windings",
               "type": "array"
            },
            "coupling_sequences": {
               "description": "List of pair\n            of sequence numbers for coupling ",
               "items": {
                  "$ref": "#/$defs/SequencePair"
               },
               "title": "Coupling Sequences",
               "type": "array"
            },
            "winding_reactances": {
               "description": "Winding coupling reactances in the\n            \"same order as coupling sequences.",
               "items": {
                  "maximum": 100.0,
                  "minimum": 0.0,
                  "type": "number"
               },
               "title": "Winding Reactances",
               "type": "array"
            },
            "is_center_tapped": {
               "description": "Is this transformer center tapped.",
               "title": "Is Center Tapped",
               "type": "boolean"
            }
         },
         "required": [
            "name",
            "pct_no_load_loss",
            "pct_full_load_loss",
            "windings",
            "coupling_sequences",
            "winding_reactances",
            "is_center_tapped"
         ],
         "title": "DistributionTransformerEquipment",
         "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"
      },
      "RegulatorController": {
         "additionalProperties": false,
         "description": "Data model for a Regulator Controller.",
         "properties": {
            "uuid": {
               "format": "uuid",
               "title": "Uuid",
               "type": "string"
            },
            "name": {
               "default": "",
               "description": "Name of the regulator controller.",
               "title": "Name",
               "type": "string"
            },
            "delay": {
               "default": null,
               "description": "Delay for the first tap change operation",
               "title": "Delay",
               "type": "string"
            },
            "v_setpoint": {
               "default": null,
               "description": "The target control voltage for regulator controller.",
               "title": "V Setpoint",
               "type": "string"
            },
            "min_v_limit": {
               "default": null,
               "description": "The minimum voltage limit for regulator controller.",
               "title": "Min V Limit",
               "type": "string"
            },
            "max_v_limit": {
               "default": null,
               "description": "The maximum voltage limit for regulator controller.",
               "title": "Max V Limit",
               "type": "string"
            },
            "pt_ratio": {
               "description": "Value of the voltage (potential) transformer ratio used to step down the voltage for the controller.",
               "minimum": 0.0,
               "title": "Pt Ratio",
               "type": "number"
            },
            "use_ldc": {
               "description": "Boolean value representing whether the line drop compensator is used or not.",
               "title": "Use Ldc",
               "type": "boolean"
            },
            "is_reversible": {
               "description": "Boolean value representing whether the tap change is reversible or not.",
               "title": "Is Reversible",
               "type": "boolean"
            },
            "ldc_R": {
               "default": null,
               "description": "R setting on the line drop compensator of the regulator in Volts.",
               "title": "Ldc R",
               "type": "string"
            },
            "ldc_X": {
               "default": null,
               "description": "X setting on the line drop compensator of the regulator in Volts.",
               "title": "Ldc X",
               "type": "string"
            },
            "ct_primary": {
               "default": null,
               "description": "Current at which the line drop compensator voltages match the R and X settings.",
               "title": "Ct Primary",
               "type": "string"
            },
            "max_step": {
               "description": "Maximum number of steps upwards or downwards that can be made per control iteration.",
               "minimum": 0,
               "title": "Max Step",
               "type": "integer"
            },
            "bandwidth": {
               "default": null,
               "description": "The total voltage bandwidth for the controller",
               "title": "Bandwidth",
               "type": "string"
            },
            "controlled_bus": {
               "$ref": "#/$defs/DistributionBus",
               "description": "The bus that is being controlled by the controller."
            },
            "controlled_phase": {
               "$ref": "#/$defs/Phase",
               "description": "The phase that is being controlled by the controller."
            }
         },
         "required": [
            "delay",
            "v_setpoint",
            "min_v_limit",
            "max_v_limit",
            "pt_ratio",
            "use_ldc",
            "is_reversible",
            "max_step",
            "bandwidth",
            "controlled_bus",
            "controlled_phase"
         ],
         "title": "RegulatorController",
         "type": "object"
      },
      "SequencePair": {
         "maxItems": 2,
         "minItems": 2,
         "prefixItems": [
            {
               "minimum": 0,
               "title": "From Index",
               "type": "integer"
            },
            {
               "minimum": 0,
               "title": "To Index",
               "type": "integer"
            }
         ],
         "type": "array"
      },
      "TransformerMounting": {
         "description": "Transformer mounting type.",
         "enum": [
            "POLE_MOUNT",
            "PAD_MOUNT",
            "UNDERGROUND_VAULT"
         ],
         "title": "TransformerMounting",
         "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": null,
               "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"
      },
      "WindingEquipment": {
         "additionalProperties": false,
         "description": "Data model for winding.",
         "properties": {
            "uuid": {
               "format": "uuid",
               "title": "Uuid",
               "type": "string"
            },
            "name": {
               "default": "",
               "description": "Name of the winding.",
               "title": "Name",
               "type": "string"
            },
            "resistance": {
               "description": "Percentage resistance for this winding.",
               "maximum": 100.0,
               "minimum": 0.0,
               "title": "Resistance",
               "type": "number"
            },
            "is_grounded": {
               "description": "Is this winding grounded or not.",
               "title": "Is Grounded",
               "type": "boolean"
            },
            "rated_voltage": {
               "default": null,
               "description": "rated voltage rating for this winding.",
               "title": "Rated Voltage",
               "type": "string"
            },
            "voltage_type": {
               "$ref": "#/$defs/VoltageTypes",
               "description": "Set voltage type for rated voltage."
            },
            "rated_power": {
               "default": null,
               "description": "Rated power for this winding.",
               "title": "Rated Power",
               "type": "string"
            },
            "num_phases": {
               "description": "Number of phases for this winding.",
               "maximum": 3,
               "minimum": 1,
               "title": "Num Phases",
               "type": "integer"
            },
            "connection_type": {
               "$ref": "#/$defs/ConnectionType",
               "description": "Connection type for this winding."
            },
            "tap_positions": {
               "description": "List of per unit tap positions for each phase. Centered at 0.",
               "items": {
                  "type": "number"
               },
               "title": "Tap Positions",
               "type": "array"
            },
            "total_taps": {
               "default": 32,
               "description": "Total number of taps along the bandwidth.",
               "title": "Total Taps",
               "type": "integer"
            },
            "min_tap_pu": {
               "default": 0.9,
               "description": "Min tap in pu for this winding.",
               "maximum": 1.0,
               "minimum": 0.0,
               "title": "Min Tap Pu",
               "type": "number"
            },
            "max_tap_pu": {
               "default": 1.1,
               "description": "Min tap in pu for this winding.",
               "minimum": 1.0,
               "title": "Max Tap Pu",
               "type": "number"
            }
         },
         "required": [
            "resistance",
            "is_grounded",
            "rated_voltage",
            "voltage_type",
            "rated_power",
            "num_phases",
            "connection_type",
            "tap_positions"
         ],
         "title": "WindingEquipment",
         "type": "object"
      }
   },
   "additionalProperties": false,
   "required": [
      "name",
      "buses",
      "winding_phases",
      "equipment",
      "controllers"
   ]
}

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])

  • controllers (list[gdm.distribution.controllers.distribution_regulator_controller.RegulatorController])

  • equipment (gdm.distribution.equipment.distribution_transformer_equipment.DistributionTransformerEquipment)

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

  • in_service (bool)

  • name (str)

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

  • uuid (uuid.UUID)

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

Validators:
  • validate_fields » all fields

  • validate_fields_base » all fields

field buses: Annotated[list[DistributionBus], Field(..., description='List of distribution buses in the same order as windings. ')] [Required]#

List of distribution buses in the same order as windings.

Validated by:
  • validate_fields

  • validate_fields_base

field controllers: Annotated[list[RegulatorController], FieldInfo(annotation=NoneType, required=True, description='The regulators that are used to control voltage on each phase of the transformer')] [Required]#

The regulators that are used to control voltage on each phase of the transformer

Validated by:
  • validate_fields

  • validate_fields_base

field equipment: Annotated[DistributionTransformerEquipment, Field(..., description='Transformer info object.')] [Required]#

Transformer info object.

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 substation: Annotated[DistributionSubstation | None, Field(None, description='Name of the substation.')] = None#

Name of the substation.

Validated by:
  • validate_fields

  • validate_fields_base

field winding_phases: Annotated[list[list[Phase]], Field(..., description='List of phases for each winding, using the winding\n            order defined in the DistributionTransformerModel')] [Required]#

List of phases for each winding, using the winding order defined in the DistributionTransformerModel

Validated by:
  • validate_fields

  • validate_fields_base

validator validate_fields_base  »  all fields#

Custom validator for distribution transformer.