From cd99089628ea3c54925ddef7fa190a2d9e3bb729 Mon Sep 17 00:00:00 2001 From: Fabian Neumann Date: Fri, 9 Jul 2021 13:10:43 +0200 Subject: [PATCH] account for underwater fraction --- scripts/prepare_sector_network.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/scripts/prepare_sector_network.py b/scripts/prepare_sector_network.py index 0552790a..aced4719 100644 --- a/scripts/prepare_sector_network.py +++ b/scripts/prepare_sector_network.py @@ -100,12 +100,13 @@ def create_network_topology(n, prefix, connector=" -> "): pd.DataFrame with columns bus0, bus1 and length """ - attrs = ["bus0", "bus1", "length"] + ln_attrs = ["bus0", "bus1", "length"] + lk_attrs = ["bus0", "bus1", "length", "underwater_fraction"] candidates = pd.concat([ - n.lines[attrs], - n.links.loc[n.links.carrier == "DC", attrs] - ]) + n.lines[ln_attrs], + n.links.loc[n.links.carrier == "DC", lk_attrs] + ]).fillna(0) positive_order = candidates.bus0 < candidates.bus1 candidates_p = candidates[positive_order] @@ -400,6 +401,10 @@ def add_co2_tracking(n, options): def add_co2_network(n, costs): co2_links = create_network_topology(n, "CO2 pipeline ") + + cost_onshore = (1 - co2_links.underwater_fraction) * costs.at['CO2 pipeline', 'fixed'] * co2_links.length + cost_submarine = co2_links.underwater_fraction * costs.at['CO2 pipeline submarine', 'fixed'] * co2_links.length + capital_cost = cost_onshore + cost_submarine n.madd("Link", co2_links.index, @@ -408,7 +413,7 @@ def add_co2_network(n, costs): p_min_pu=-1, p_nom_extendable=True, length=co2_links.length.values, - capital_cost=costs.at['CO2 pipeline', 'fixed'] * co2_links.length.values, + capital_cost=capital_cost.values, carrier="CO2 pipeline", lifetime=costs.at['CO2 pipeline', 'lifetime'] )