Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed May 12, 2023
1 parent 99963ed commit 3343394
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions scripts/prepare_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,8 +233,13 @@ def enforce_autarky(n, only_crossborder=False):
n.mremove("Link", links_rm)


def set_line_nom_max(n, s_nom_max_set=np.inf, p_nom_max_set=np.inf, s_nom_max_ext=np.inf, p_nom_max_ext=np.inf):

def set_line_nom_max(
n,
s_nom_max_set=np.inf,
p_nom_max_set=np.inf,
s_nom_max_ext=np.inf,
p_nom_max_ext=np.inf,
):
if np.isfinite(s_nom_max_ext) and s_nom_max_ext > 0:
logger.info(f"Limiting line extensions to {s_nom_max_ext} MW")
n.lines["s_nom_max"] = n.lines["s_nom"] + s_nom_max_ext
Expand Down

0 comments on commit 3343394

Please sign in to comment.