dragonfly_energy.opendss.connector module¶
Electrical connector in OpenDSS.
- class dragonfly_energy.opendss.connector.ElectricalConnector(identifier, geometry, power_line)[source]¶
Bases:
_GeometryBase
Represents an electrical connector carrying wires in OpenDSS.
- Parameters
identifier – Text string for a unique electrical connector ID. Must contain only characters that are acceptable in OpenDSS. This will be used to identify the object across the exported geoJSON and OpenDSS files.
geometry – A LineSegment2D or Polyline2D representing the geometry of the electrical connector.
power_line – A PowerLine object representing the wires carried along the electrical connector and their arrangement.
- Properties:
identifier
display_name
geometry
power_line
phase_count
nominal_voltage
- ToString()¶
- duplicate()¶
Get a copy of this object.
- classmethod from_dict(data)[source]¶
Initialize an ElectricalConnector from a dictionary.
- Parameters
data – A dictionary representation of an ElectricalConnector object.
- classmethod from_dict_abridged(data, power_lines)[source]¶
Initialize an ElectricalConnector from an abridged dictionary.
- Parameters
data – A ElectricalConnectorAbridged dictionary.
power_lines – A dictionary with identifiers of PowerLines as keys and Python PowerLine objects as values.
- classmethod from_rnm_geojson_dict(data, origin_lon_lat, conversion_factors, power_lines)[source]¶
Get an ElectricalConnector from a dictionary as it appears in an RNM GeoJSON.
- Parameters
data – A GeoJSON dictionary representation of an ElectricalConnector feature.
origin_lon_lat – An array of two numbers in degrees. The first value represents the longitude of the scene origin in degrees (between -180 and +180). The second value represents latitude of the scene origin in degrees (between -90 and +90). Note that the “scene origin” is the (0, 0) coordinate in the 2D space of the input polygon.
conversion_factors – A tuple with two values used to translate between meters and longitude, latitude.
power_lines – A dictionary with identifiers of PowerLines as keys and Python PowerLine objects as values.
- move(moving_vec)¶
Move this object along a vector.
- Parameters
moving_vec – A ladybug_geometry Vector3D with the direction and distance to move the object.
- reflect(plane)¶
Reflect this object across a plane.
- Parameters
plane – A ladybug_geometry Plane across which the object will be reflected.
- rotate_xy(angle, origin)¶
Rotate this object counterclockwise in the XY plane by a certain angle.
- Parameters
angle – An angle in degrees.
origin – A ladybug_geometry Point3D for the origin around which the object will be rotated.
- scale(factor, origin=None)¶
Scale this object by a factor from an origin point.
- Parameters
factor – A number representing how much the object should be scaled.
origin – A ladybug_geometry Point3D representing the origin from which to scale. If None, it will be scaled from the World origin (0, 0, 0).
- to_dict(abridged=False)[source]¶
ElectricalConnector dictionary representation.
- Parameters
abridged – Boolean to note whether the full dictionary describing the object should be returned (False) or just an abridged version (True), which only specifies the identifier of the power line. (Default: False).
- to_geojson_dict(start_id, end_id, origin_lon_lat, conversion_factors)[source]¶
Get ElectricalConnector dictionary as it appears in an URBANopt geoJSON.
- Parameters
start_id – Identifier of the junction at the start of the wire.
end_id – Identifier of the junction at the end of the wire.
origin_lon_lat – An array of two numbers in degrees. The first value represents the longitude of the scene origin in degrees (between -180 and +180). The second value represents latitude of the scene origin in degrees (between -90 and +90). Note that the “scene origin” is the (0, 0) coordinate in the 2D space of the input polygon.
conversion_factors – A tuple with two values used to translate between meters and longitude, latitude.
- property display_name¶
Get or set a string for the object name without any character restrictions.
If not set, this will be equal to the identifier.
- property geometry¶
Get a LineSegment2D or Polyline2D representing the electrical connector.
- property identifier¶
Get or set the text string for unique object identifier.
- property nominal_voltage¶
Get an integer for the nominal voltage of this connector.
- property phase_count¶
Get an integer for the number of phases this connector supports.
- property power_line¶
Get or set the PowerLine object carried along the electrical connector.