GridWrapper#
- class wattson.powergrid.wrapper.grid_wrapper.GridWrapper(power_grid_model: PowerGridModel, datapoints: dict, logger: Logger | None, **kwargs)#
Bases:
objectThis class wraps a PowerGridModel and provides additional functionalities for analysing the grid and associated measurements.
Methods
add_on_estimation_done_callbackadd_on_estimation_started_callbackdp_get_cotdp_get_type_idexportexport_grid_valuesget_104_infoget_data_pointGiven 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_pointReturns the pandapower elements of the specified type
get_grid_values_for_data_pointget_iec104_data_pointget_iec61850mms_data_pointget_measurementReturns a pandapower representation of the power grid
handle_data_point_updateload_grid_value_csvon_element_changeon_element_updaterun_power_flowstart_measurement_exportstart_periodic_exportstart_power_flow_loopstart_state_estimationstart_timing_monitoringstop_estimationstop_estimationsstop_measurement_exportstop_periodic_exportstop_power_flow_loopstop_timing_monitoringupdate_grid_valueupdate_grid_value_by_identifiersUpdates 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