edisgo.tools.temporal_complexity_reduction
¶
Module Contents¶
Functions¶

Get time intervals sorted by severity of overloadings as well as voltage issues. 

Get the time steps with the most critical overloading and voltage issues. 
 edisgo.tools.temporal_complexity_reduction.get_most_critical_time_intervals(edisgo_obj, num_time_intervals=None, percentage=1.0, time_steps_per_time_interval=168, time_step_day_start=0, save_steps=False, path='', use_troubleshooting_mode=True, overloading_factor=0.95, voltage_deviation_factor=0.95)[source]¶
Get time intervals sorted by severity of overloadings as well as voltage issues.
The overloading and voltage issues are weighed by the estimated expansion costs solving the issue would require. The length of the time intervals and hour of day at which the time intervals should begin can be set through the parameters time_steps_per_time_interval and time_step_day_start.
This function currently only works for an hourly resolution!
 Parameters
edisgo_obj (
EDisGo
) – The eDisGo API objectnum_time_intervals (int) – The number of time intervals of most critical line loading and voltage issues to select. If None, percentage is used. Default: None.
percentage (float) – The percentage of most critical time intervals to select. The default is 1.0, in which case all most critical time steps are selected. Default: 1.0.
time_steps_per_time_interval (int) – Amount of continuous time steps in an interval that violation is determined for. Currently, these can only be multiples of 24. Default: 168.
time_step_day_start (int) – Time step of the day at which each interval should start. If you want it to start at midnight, this should be set to 0. Default: 0.
save_steps (bool) – If set to True, dataframe with time intervals is saved to csv file. The path can be specified through parameter path. Default: False.
path (str) – Directory the csv file is saved to. Per default, it takes the current working directory.
use_troubleshooting_mode (bool) – If set to True, nonconvergence issues in power flow are tried to be handled by reducing load and feedin in steps of 10% down to 20% of the original load and feedin until the power flow converges. The most critical time intervals are then determined based on the power flow results with the reduced load and feedin. If False, an error will be raised in case time steps do not converge. Default: True.
overloading_factor (float) – Factor at which an overloading of a component is considered to be close enough to the highest overloading of that component. This is used to determine the number of components that reach their highest overloading in each time interval. Per default, it is set to 0.95, which means that if the highest overloading of a component is 2, it will be considered maximally overloaded at an overloading of higher or equal to 2*0.95. Default: 0.95.
voltage_deviation_factor (float) – Factor at which a voltage deviation at a bus is considered to be close enough to the highest voltage deviation at that bus. This is used to determine the number of buses that reach their highest voltage deviation in each time interval. Per default, it is set to 0.95. This means that if the highest voltage deviation at a bus is 0.2, it will be included in the determination of number of buses that reach their maximum voltage deviation in a certain time interval at a voltage deviation of higher or equal to 0.2*0.95. Default: 0.95.
 Returns
Contains time intervals in which grid expansion needs due to overloading and voltage issues are detected. The time intervals are determined independently for overloading and voltage issues and sorted descending by the expected cumulated grid expansion costs, so that the time intervals with the highest expected costs correspond to index 0. In case of overloading, the time steps in the respective time interval are given in column “time_steps_overloading” and the share of components for which the maximum overloading is reached during the time interval is given in column “percentage_max_overloaded_components”. For voltage issues, the time steps in the respective time interval are given in column “time_steps_voltage_issues” and the share of buses for which the maximum voltage deviation is reached during the time interval is given in column “percentage_buses_max_voltage_deviation”.
 Return type
 edisgo.tools.temporal_complexity_reduction.get_most_critical_time_steps(edisgo_obj: edisgo.EDisGo, num_steps_loading=None, num_steps_voltage=None, percentage: float = 1.0, use_troubleshooting_mode=True) pandas.DatetimeIndex [source]¶
Get the time steps with the most critical overloading and voltage issues.
 Parameters
edisgo_obj (
EDisGo
) – The eDisGo API objectnum_steps_loading (int) – The number of most critical overloading events to select. If None, percentage is used. Default: None.
num_steps_voltage (int) – The number of most critical voltage issues to select. If None, percentage is used. Default: None.
percentage (float) – The percentage of most critical time steps to select. The default is 1.0, in which case all most critical time steps are selected. Default: 1.0.
use_troubleshooting_mode (bool) – If set to True, nonconvergence issues in power flow are tried to be handled by reducing load and feedin in steps of 10% down to 20% of the original load and feedin until the power flow converges. The most critical time steps are then determined based on the power flow results with the reduced load and feedin. If False, an error will be raised in case time steps do not converge. Default: True.
 Returns
Time index with unique time steps where maximum overloading or maximum voltage deviation is reached for at least one component respectively bus.
 Return type