remove unused simple_hvdc_costs

This commit is contained in:
Fabian Neumann 2022-03-24 14:47:00 +01:00
parent 8f74d1e266
commit c54ddab4a3
4 changed files with 10 additions and 13 deletions

View File

@ -62,6 +62,7 @@ Upcoming Release
* New network topology extracted from the ENTSO-E interactive map.
* The unused argument ``simple_hvdc_costs`` in :mod:`add_electricity` was removed.
PyPSA-Eur 0.4.0 (22th September 2021)
=====================================

View File

@ -227,7 +227,7 @@ def attach_load(n, regions, load, nuts3_shapes, countries, scaling=1.):
n.madd("Load", substation_lv_i, bus=substation_lv_i, p_set=load)
def update_transmission_costs(n, costs, length_factor=1.0, simple_hvdc_costs=False):
def update_transmission_costs(n, costs, length_factor=1.0):
# TODO: line length factor of lines is applied to lines and links.
# Separate the function to distinguish.
@ -242,10 +242,6 @@ def update_transmission_costs(n, costs, length_factor=1.0, simple_hvdc_costs=Fal
# may be missing. Therefore we have to return here.
if n.links.loc[dc_b].empty: return
if simple_hvdc_costs:
costs = (n.links.loc[dc_b, 'length'] * length_factor *
costs.at['HVDC overhead', 'capital_cost'])
else:
costs = (n.links.loc[dc_b, 'length'] * length_factor *
((1. - n.links.loc[dc_b, 'underwater_fraction']) *
costs.at['HVDC overhead', 'capital_cost'] +

View File

@ -404,7 +404,7 @@ def make_summaries(networks_dict, paths, config, country='all'):
Nyears = n.snapshot_weightings.objective.sum() / 8760.
costs = load_costs(paths[0], config['costs'], config['electricity'], Nyears)
update_transmission_costs(n, costs, simple_hvdc_costs=False)
update_transmission_costs(n, costs)
assign_carriers(n)

View File

@ -104,7 +104,7 @@ def set_transmission_limit(n, ll_type, factor, costs, Nyears=1):
ref = (lines_s_nom @ n.lines[col] +
n.links.loc[links_dc_b, "p_nom"] @ n.links.loc[links_dc_b, col])
update_transmission_costs(n, costs, simple_hvdc_costs=False)
update_transmission_costs(n, costs)
if factor == 'opt' or float(factor) > 1.0:
n.lines['s_nom_min'] = lines_s_nom