prepare: fix transmission limit when no HVDC links in network (#209)

This commit is contained in:
Fabian Neumann 2020-11-12 17:37:43 +01:00 committed by GitHub
parent 9c526687fd
commit 2e70e8d15b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -108,7 +108,7 @@ def set_transmission_limit(n, ll_type, factor, Nyears=1):
col = 'capital_cost' if ll_type == 'c' else 'length'
ref = (lines_s_nom @ n.lines[col] +
n.links[links_dc_b].p_nom @ n.links[links_dc_b][col])
n.links.loc[links_dc_b, "p_nom"] @ n.links.loc[links_dc_b, col])
costs = load_costs(Nyears, snakemake.input.tech_costs,
snakemake.config['costs'],