GridWrapper#
- class wattson.powergrid.wrapper.grid_wrapper.GridWrapper(power_grid_model: PowerGridModel, datapoints: dict, logger: Logger | None, **kwargs)#
Bases:
object
This class wraps a PowerGridModel and provides additional functionalities for analysing the grid and associated measurements.
Methods
add_on_estimation_done_callback
add_on_estimation_started_callback
dp_get_cot
dp_get_type_id
export
export_grid_values
get_104_info
get_data_point
Given a single power grid value, compiles a list of data points that this value matches to
Given a single power grid element, compiles a list of data points that are associated with this element.
get_first_grid_value_for_data_point
Returns the pandapower elements of the specified type
get_grid_values_for_data_point
get_iec104_data_point
get_iec61850mms_data_point
get_measurement
Returns a pandapower representation of the power grid
handle_data_point_update
load_grid_value_csv
on_element_change
on_element_update
run_power_flow
start_measurement_export
start_periodic_export
start_power_flow_loop
start_state_estimation
start_timing_monitoring
stop_estimation
stop_estimations
stop_measurement_export
stop_periodic_export
stop_power_flow_loop
stop_timing_monitoring
update_grid_value
update_grid_value_by_identifiers
Updates all GridValues associated with the given COA and IOA to the given value.
Updates all GridValues associated with the given Server and MMS Path to the given value.
- __init__(power_grid_model: PowerGridModel, datapoints: dict, logger: Logger | None, **kwargs)#
- get_data_points_for_grid_value(grid_value: GridValue) List[dict] #
Given a single power grid value, compiles a list of data points that this value matches to
- Parameters:
grid_value (GridValue) – The grid value to search for
- Returns:
A list of data points
- Return type:
List[dict]
- get_datapoints_for_element(grid_element: GridElement) list #
Given a single power grid element, compiles a list of data points that are associated with this element.
- Parameters:
grid_element (GridElement) – The grid element
- Returns:
A list of datapoints
- Return type:
list
- get_grid_elements(element_type: str) List[GridElement] #
Returns the pandapower elements of the specified type
- Parameters:
element_type (str) – The elements to return, e.g., “sgen”
- Returns:
A dataframe with said elements in case the pp_type is valid. Otherwise, None
- Return type:
List[GridElement]
- get_pandapower_net()#
Returns a pandapower representation of the power grid
- update_iec104_value(coa, ioa, value) bool #
Updates all GridValues associated with the given COA and IOA to the given value. Returns whether any value has actually been changed.
- Parameters:
coa – The COA
ioa – The IOA
value – The value to apply
- update_iec61850mms_value(server, mms_path, value) bool #
Updates all GridValues associated with the given Server and MMS Path to the given value. Returns whether any value has actually been changed.
- Parameters:
server – The server ID
mms_path – The attributes MMS path
value – The value
- Returns:
Whether any value has actually been changed.
- Return type:
bool