VeraGridEngine.Simulations.InputsAnalysis packageο
Submodulesο
VeraGridEngine.Simulations.InputsAnalysis.inputs_analysis_driver moduleο
- class VeraGridEngine.Simulations.InputsAnalysis.inputs_analysis_driver.InputsAnalysisDriver(grid: MultiCircuit)[source]ο
Bases:
DriverTemplate- name = 'Inputs Analysis'ο
- tpe = 'Inputs Analysis'ο
- class VeraGridEngine.Simulations.InputsAnalysis.inputs_analysis_driver.InputsAnalysisResults(grid: MultiCircuit, opf_results: None | OptimalPowerFlowResults = None, opf_time_series_results: None | OptimalPowerFlowTimeSeriesResults = None)[source]ο
Bases:
ResultsTemplate- CLASS_DATA_VARIABLES = {}ο
- CLASS_RESULTS_DECLARATIONS = ()ο
- LOCAL_RESULTS_DECLARATIONS = ()ο
- area_names: ndarray[tuple[Any, ...], dtype[str_]] | Noneο
- battery_dataο
- bus_area_indices: ndarray[tuple[Any, ...], dtype[int64]] | Noneο
- bus_community_indicesο
- bus_country_indicesο
- bus_dictο
- bus_municipality_indicesο
- bus_region_indicesο
- bus_substation_indicesο
- bus_voltage_level_indicesο
- bus_zone_indicesο
- community_namesο
- country_namesο
- current_injection_dataο
- external_grid_dataο
- gen_dataο
- get_aggregation_device_type(aggregation: str) DeviceType[source]ο
Get the device type associated to an aggregation.
- Parameters:
aggregation β Aggregation name
- Returns:
Corresponding device type
- get_aggregation_elements(aggregation: str) List[Any][source]ο
Get the aggregation objects associated to an aggregation name.
This method preserves the collection order used by the bus-to-index maps so that time-series matrices and index lookups share the same coordinate system.
- Parameters:
aggregation β Aggregation name
- Returns:
Ordered list of aggregation objects
- get_aggregation_headers() List[str][source]ο
Get the dataframe aggregation column headers.
- Returns:
Ordered list of aggregation column names
- get_aggregation_names(aggregation: str) List[str][source]ο
Get the names associated to an aggregation type.
- Parameters:
aggregation β Aggregation name
- Returns:
List of aggregation names
- get_available_results(has_time_series: bool) dict[ResultTypes, List[ResultTypes]][source]ο
Get the available results grouped by spatial aggregation.
- Parameters:
has_time_series β Whether time-series results are available
- Returns:
Available results grouped by aggregation
- get_bus_aggregation_values(bus: Bus | None) List[str][source]ο
Get the aggregation names associated to a bus.
The bus getter methods are used so that direct bus assignments have priority over values inferred from higher-level structures.
- Parameters:
bus β Bus object or
None- Returns:
Aggregation names in dataframe column order
- get_bus_area_indices() ndarray[tuple[Any, ...], dtype[int64]][source]ο
Get the area index of each bus.
A value of
-1means that the bus is not associated to any area.- Returns:
Area indices per bus
- get_bus_community_indices() ndarray[tuple[Any, ...], dtype[int64]][source]ο
Get the community index of each bus.
A value of
-1means that the bus is not associated to any community.- Returns:
Community indices per bus
- get_bus_country_indices() ndarray[tuple[Any, ...], dtype[int64]][source]ο
Get the country index of each bus.
A value of
-1means that the bus is not associated to any country.- Returns:
Country indices per bus
- get_bus_municipality_indices() ndarray[tuple[Any, ...], dtype[int64]][source]ο
Get the municipality index of each bus.
A value of
-1means that the bus is not associated to any municipality.- Returns:
Municipality indices per bus
- get_bus_region_indices() ndarray[tuple[Any, ...], dtype[int64]][source]ο
Get the region index of each bus.
A value of
-1means that the bus is not associated to any region.- Returns:
Region indices per bus
- get_bus_substation_indices() ndarray[tuple[Any, ...], dtype[int64]][source]ο
Get the substation index of each bus.
A value of
-1means that the bus is not associated to any substation.- Returns:
Substation indices per bus
- get_bus_voltage_level_indices() ndarray[tuple[Any, ...], dtype[int64]][source]ο
Get the voltage-level index of each bus.
A value of
-1means that the bus is not associated to any voltage level.- Returns:
Voltage-level indices per bus
- get_bus_zone_indices() ndarray[tuple[Any, ...], dtype[int64]][source]ο
Get the zone index of each bus.
A value of
-1means that the bus is not associated to any zone.- Returns:
Zone indices per bus
- get_collection_attr_series(elms, magnitude: str, aggregation='Area')[source]ο
- Parameters:
elms
magnitude β Snapshot property name
aggregation
- Returns:
- get_collection_names(elements: List[Any]) List[str][source]ο
Get the unique names of a collection of aggregation objects.
- Parameters:
elements β List of aggregation objects
- Returns:
Sorted list of names
- get_result_aggregation(result_type: ResultTypes) str[source]ο
Get the aggregation name corresponding to a result type.
- Parameters:
result_type β Result type
- Returns:
Aggregation name
- get_series_result_types() List[ResultTypes][source]ο
Get the available time-series result types for inputs analysis.
- Returns:
List of time-series result types
- get_snapshot_result_types() List[ResultTypes][source]ο
Get the available snapshot result types for inputs analysis.
- Returns:
List of snapshot result types
- gridο
- group_by(group: str)[source]ο
Return a DataFrame grouped by the requested aggregation.
- Parameters:
group β Aggregation name
- Returns:
Group DataFrame
- load_dataο
- mdl(result_type: ResultTypes) ResultsTable[source]ο
Plot the results :param result_type: type of results (string) :return: DataFrame of the results
(or None if the result was not understood)
- municipality_namesο
- opf_resultsο
- opf_time_series_resultsο
- region_namesο
- shunt_dataο
- static_gen_dataο
- substation_namesο
- tpe = 'Inputs Analysis'ο
- voltage_level_namesο
- zone_namesο