Skip to content

Commit

Permalink
Apply black
Browse files Browse the repository at this point in the history
  • Loading branch information
ClaraBuettner committed May 13, 2024
1 parent c5cd6bf commit e40673c
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions etrago/tools/calc_results.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,17 +139,19 @@ def _calc_network_expansion_length(self):
network = self.network

lines = (network.lines.s_nom_opt - network.lines.s_nom_min).mul(
network.lines.length)[
network.lines.s_nom_extendable
]
network.lines.length
)[network.lines.s_nom_extendable]

ext_links = network.links[network.links.p_nom_extendable]
ext_dc_lines = ext_links[ext_links.carrier == "DC"]

dc_links = (ext_dc_lines.p_nom_opt - ext_dc_lines.p_nom_min).mul(ext_dc_lines.length)
dc_links = (ext_dc_lines.p_nom_opt - ext_dc_lines.p_nom_min).mul(
ext_dc_lines.length
)

return lines.sum(), dc_links.sum()


def calc_investment_cost(self):
"""Function that calulates overall annualized investment costs.
Expand Down Expand Up @@ -792,8 +794,8 @@ def calc_etrago_results(self):
)

self.results.value["abs. electrical grid expansion length"] = (
_calc_network_expansion_length(self)[0] +
_calc_network_expansion_length(self)[1]
_calc_network_expansion_length(self)[0]
+ _calc_network_expansion_length(self)[1]
)

self.results.value["abs. electrical dc grid expansion"] = (
Expand Down

0 comments on commit e40673c

Please sign in to comment.