From 22f1b87a7361e6a3f46fd6abcf75ab4b804938b9 Mon Sep 17 00:00:00 2001 From: johburger <63449992+johburger@users.noreply.github.com> Date: Tue, 30 Apr 2024 17:15:45 +0200 Subject: [PATCH] Fix capex linear initialization bug for PWA --- .../model/objects/technology/conversion_technology.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/zen_garden/model/objects/technology/conversion_technology.py b/zen_garden/model/objects/technology/conversion_technology.py index 149a4b264..959c207f0 100644 --- a/zen_garden/model/objects/technology/conversion_technology.py +++ b/zen_garden/model/objects/technology/conversion_technology.py @@ -136,9 +136,9 @@ def get_capex_all_elements(cls, optimization_setup, index_names=None): # extract for pwa if not getattr(element, is_pwa_attribute): dict_of_attributes, _, dict_of_units = optimization_setup.append_attribute_of_element_to_dict(element, attribute_name_linear, dict_of_attributes, dict_of_units={}) - if not dict_of_attributes: - _, index_names = cls.create_custom_set(index_names, optimization_setup) - return dict_of_attributes, index_names, dict_of_units + if not dict_of_attributes: + _, index_names = cls.create_custom_set(index_names, optimization_setup) + return dict_of_attributes, index_names, dict_of_units dict_of_attributes = pd.concat(dict_of_attributes, keys=dict_of_attributes.keys()) if not index_names: logging.warning(f"Initializing the parameter capex without the specifying the index names will be deprecated!")