dragonfly_energy.opendss.colorobj module¶
Module for coloring OpenDSS geometry with attributes.
- class dragonfly_energy.opendss.colorobj.ColorNetwork(network, attr_name, legend_parameters=None)[source]¶
Bases:
_ColorObject
Object for visualizing ElectricalNetwork attributes.
- Parameters
network – An ElectricalNetwork object, which will be colored with the attribute.
attr_name – A text string of an attribute that the input network equipment has. This can have ‘.’ that separate the nested attributes from one another. For example, ‘properties.kva’ for the kva rating of transformers.
legend_parameters – An optional LegendParameter object to change the display of the results (Default: None).
- Properties:
network
attr_name
legend_parameters
attr_name_end
attributes
attributes_unique
attributes_original
geometries
graphic_container
min_point
max_point
- ToString()¶
Overwrite .NET ToString.
- property attr_name¶
Get a text string of an attribute that the input objects should have.
- property attr_name_end¶
Get text for the last attribute in the attr_name.
Useful when attr_name is nested.
- property attributes¶
Get a tuple of text for the attributes assigned to the objects.
If the input attr_name is a valid attribute for the object but None is assigned, the output will be ‘None’. If the input attr_name is not valid for the input object, ‘N/A’ will be returned.
- property attributes_original¶
Get a tuple of objects for the attributes assigned to the objects.
These will follow the original object typing of the attribute and won’t be strings like the attributes.
- property attributes_unique¶
Get a tuple of text for the unique attributes assigned to the objects.
- property geometries¶
A tuple of Polygon2D, Polyline2D and LineSegment2D aligned with attributes.
- property graphic_container¶
Get a ladybug GraphicContainer that relates to this object.
The GraphicContainer possesses almost all things needed to visualize the ColorRooms object including the legend, value_colors, etc.
- property legend_parameters¶
Get or set the legend parameters.
- property max_point¶
Get a Point3D for the maximum of the box around the objects.
- property min_point¶
Get a Point3D for the minimum of the box around the objects.
- property network¶
Get the ElectricalNetwork associated with this object.
- class dragonfly_energy.opendss.colorobj.ColorNetworkResults(data_collections, network, legend_parameters=None, attribute='max')[source]¶
Bases:
object
Class for coloring ElectricalNetwork geometry with simulation results.
- Parameters
data_collections – An array of data collections of the same data type, which will be used to color the network with simulation results. Data collections should all have headers with metadata dictionaries with ‘type’ and ‘name’ keys. These keys will be used to match the data in the collections to the input electrical network.
network – An ElectricalNetwork object, which will be colored with the attribute.
legend_parameters – An optional LegendParameter object to change the display of the ColorNetworkResults (Default: None).
attribute – Text to note the attribute of the data collections with which the network geometry should be colored. Typical values are max, min, average, median, or total. This input can also be an integer (greater than or equal to 0) to select a specific step of the data collections for which result values will be generated. (Default: “Max” to color with the peak value).
- Properties:
data_collections
network
legend_parameters
attribute
matched_geometries
matched_data
matched_values
graphic_container
title_text
data_type_text
data_type
unit
analysis_period
min_point
max_point
- time_interval_text(simulation_step)[source]¶
Get text for a specific time simulation_step of the data collections.
- Parameters
simulation_step – An integer for the step of simulation for which text should be generated.
- property analysis_period¶
The analysis_period of this object’s data collections.
- property attribute¶
Get or set text for the data attribute or an integer a specific data step.
- property data_collections¶
Get a tuple of data collections assigned to this object.
- property data_type¶
Text for the data type.
- property geometries¶
A tuple of Polygon2D, Polyline2D and LineSegment2D aligned with attributes.
- property graphic_container¶
Get a ladybug GraphicContainer that relates to this object.
The GraphicContainer possesses almost all things needed to visualize the object including the legend, value_colors, lower_title_location, upper_title_location, etc.
- property legend_parameters¶
Get or set the legend parameters.
- property matched_data¶
Get a tuple of data collections aligned with the matched_geometries.
- property matched_geometries¶
Get a tuple of geometries that were matched with the data collections.
- property matched_values¶
Get an array of numbers that correspond to the matched_geometries.
These values are derived from the data_collections but they will be averaged/totaled or for a specific time step depending on the other inputs to this object.
- property max_point¶
Get a Point3D for the maximum of the box around the objects.
- property min_point¶
Get a Point3D for the minimum of the box around the objects.
- property network¶
Get the ElectricalNetwork associated with this object.
- property title_text¶
Text string for the title of the object.
- property unit¶
The unit of this object’s data collections.