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

cancel()[source]

Cancel the simulation

get_steps() List[int][source]
Returns:

name = 'Inputs Analysis'
run() None[source]

Pack run_pf for the QThread :return:

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_batteries_df() DataFrame[source]
Returns:

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 -1 means 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 -1 means 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 -1 means 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 -1 means 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 -1 means 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 -1 means 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 -1 means 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 -1 means 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_current_injections_df() DataFrame[source]
Returns:

get_external_grids_df() DataFrame[source]
Returns:

get_generators_df() DataFrame[source]
Returns:

get_loads_df() DataFrame[source]
Returns:

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_shunts_df() DataFrame[source]
Returns:

get_snapshot_result_types() List[ResultTypes][source]

Get the available snapshot result types for inputs analysis.

Returns:

List of snapshot result types

get_static_generators_df() DataFrame[source]
Returns:

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

Module contents