From fd789932ddbae013611c9305963138204fee5aac Mon Sep 17 00:00:00 2001 From: martacki Date: Wed, 6 Dec 2023 07:58:20 -0800 Subject: [PATCH] district heating bugfix when no progress is assumed --- scripts/prepare_sector_network.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/prepare_sector_network.py b/scripts/prepare_sector_network.py index f585ad04..66fb91c8 100644 --- a/scripts/prepare_sector_network.py +++ b/scripts/prepare_sector_network.py @@ -2003,7 +2003,7 @@ def add_heat(n, costs): space_heat_demand = demand * w_space[sec][node] # normed time profile of space heat demand 'space_pu' (values between 0-1), # p_max_pu/p_min_pu of retrofitting generators - space_pu = (space_heat_demand / space_heat_demand.max()).to_frame(name=node) + space_pu = (space_heat_demand / space_heat_demand.max()).to_frame(name=node).fillna(0) # minimum heat demand 'dE' after retrofitting in units of original heat demand (values between 0-1) dE = retro_data.loc[(ct, sec), ("dE")] @@ -2015,6 +2015,9 @@ def add_heat(n, costs): * floor_area_node / ((1 - dE) * space_heat_demand.max()) ) + if space_heat_demand.max() == 0: + capital_cost = capital_cost.apply(lambda b: 0 if b == np.inf else b) + # number of possible retrofitting measures 'strengths' (set in list at config.yaml 'l_strength') # given in additional insulation thickness [m] # for each measure, a retrofitting generator is added at the node