Skip to content

Commit

Permalink
Add logging information
Browse files Browse the repository at this point in the history
  • Loading branch information
birgits committed Feb 16, 2024
1 parent 70c3264 commit 85b49f4
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions edisgo/tools/temporal_complexity_reduction.py
Original file line number Diff line number Diff line change
Expand Up @@ -956,6 +956,12 @@ def get_most_critical_time_steps(
f"{len(loading_scores)} time steps are exported."
)
num_steps_loading = len(loading_scores)
elif num_steps_loading < len(loading_scores):
logger.info(
f"{num_steps_loading} of a total of {len(loading_scores)} relevant "
f"time steps for overloading issues are chosen for the selection "
f"of most critical time steps."
)
steps = loading_scores[:num_steps_loading].index

# Select most critical steps based on voltage violations
Expand All @@ -973,6 +979,12 @@ def get_most_critical_time_steps(
f"{len(voltage_scores)} time steps are exported."
)
num_steps_voltage = len(voltage_scores)
elif num_steps_voltage < len(voltage_scores):
logger.info(
f"{num_steps_voltage} of a total of {len(voltage_scores)} relevant "
f"time steps for voltage issues are chosen for the selection "
f"of most critical time steps."
)
steps = steps.append(voltage_scores[:num_steps_voltage].index)

if len(steps) == 0:
Expand Down

0 comments on commit 85b49f4

Please sign in to comment.