Skip to content

Commit

Permalink
Add return in case no timesteps for reinforcement exist
Browse files Browse the repository at this point in the history
  • Loading branch information
birgits committed Oct 23, 2023
1 parent bd5c888 commit c832690
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions edisgo/flex_opt/reinforce_grid.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,9 @@ def reinforce_grid(
use_troubleshooting_mode=kwargs.get("use_troubleshooting_mode", True),
run_initial_analyze=kwargs.get("run_initial_analyze", True),
)
if len(timesteps_pfa) == 0:
logger.debug("Zero time steps for grid reinforcement.")
return edisgo.results

edisgo.analyze(
mode=analyze_mode,
Expand Down

0 comments on commit c832690

Please sign in to comment.