Skip to content

Commit

Permalink
bug fixing for kpis preparation in districts (#357)
Browse files Browse the repository at this point in the history
* bug fixing for kpis preparation in districts

* specify builing names due to problems when having more then 10 buildings

* renaming of kpi

* renaming of kpi

* renaming of kpi

* renaming of kpi
  • Loading branch information
Hoppe-J authored Sep 12, 2024
1 parent 10fa30e commit 3b47fcc
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 53 deletions.
6 changes: 3 additions & 3 deletions hisim/components/heating_meter.py
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ def get_component_kpi_entries(
break

total_heating_energy_consumption_in_building_in_kwh_entry = KpiEntry(
name="Total heating energy used in building",
name="Total heat consumption from grid",
unit="kWh",
value=total_used_energy_in_kwh,
tag=KpiTagEnumClass.HEATING_METER,
Expand All @@ -392,15 +392,15 @@ def get_component_kpi_entries(
# try to get opex costs
opex_costs = self.get_cost_opex(all_outputs=all_outputs, postprocessing_results=postprocessing_results)
opex_costs_in_euro_entry = KpiEntry(
name="Opex costs of heat consumption in building",
name="Opex costs of heat consumption from grid",
unit="Euro",
value=opex_costs.opex_energy_cost_in_euro,
tag=KpiTagEnumClass.HEATING_METER,
description=self.component_name,
)
list_of_kpi_entries.append(opex_costs_in_euro_entry)
co2_footprint_in_kg_entry = KpiEntry(
name="CO2 footprint of heat consumption in building",
name="CO2 footprint of heat consumption from grid",
unit="kg",
value=opex_costs.co2_footprint_in_kg,
tag=KpiTagEnumClass.HEATING_METER,
Expand Down
20 changes: 10 additions & 10 deletions hisim/postprocessing/kpi_computation/compute_kpis.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def __post_init__(self):
self.create_kpi_collection(building_objects_in_district)

for building_objects_in_district in self.building_objects_in_district_list:
if building_objects_in_district in DistrictNames.__members__:
if any(word in building_objects_in_district for word in DistrictNames):
self.create_overall_district_kpi(district_name=building_objects_in_district)

self.kpi_collection_dict_sorted = self.sort_kpi_collection_according_to_kpi_tags(
Expand Down Expand Up @@ -63,7 +63,7 @@ def create_kpi_collection(self, building_objects_in_district):
building_objects_in_district=building_objects_in_district,
kpi_tag=(
KpiTagEnumClass.GENERAL
if building_objects_in_district not in DistrictNames.__members__
if not any(word in building_objects_in_district for word in DistrictNames)
else KpiTagEnumClass.ELECTRICITY_GRID
),
)
Expand All @@ -76,7 +76,7 @@ def create_kpi_collection(self, building_objects_in_district):
building_objects_in_district=building_objects_in_district,
kpi_tag=(
KpiTagEnumClass.GENERAL
if building_objects_in_district not in DistrictNames.__members__
if not any(word in building_objects_in_district for word in DistrictNames)
else KpiTagEnumClass.ELECTRICITY_GRID
),
)
Expand All @@ -88,7 +88,7 @@ def create_kpi_collection(self, building_objects_in_district):
building_objects_in_district=building_objects_in_district,
kpi_tag=(
KpiTagEnumClass.GENERAL
if building_objects_in_district not in DistrictNames.__members__
if not any(word in building_objects_in_district for word in DistrictNames)
else KpiTagEnumClass.ELECTRICITY_GRID
),
)
Expand All @@ -100,7 +100,7 @@ def create_kpi_collection(self, building_objects_in_district):
building_objects_in_district=building_objects_in_district,
kpi_tag=(
KpiTagEnumClass.GENERAL
if building_objects_in_district not in DistrictNames.__members__
if not any(word in building_objects_in_district for word in DistrictNames)
else KpiTagEnumClass.ELECTRICITY_GRID
),
)
Expand All @@ -112,7 +112,7 @@ def create_kpi_collection(self, building_objects_in_district):
building_objects_in_district=building_objects_in_district,
kpi_tag=(
KpiTagEnumClass.GENERAL
if building_objects_in_district not in DistrictNames.__members__
if not any(word in building_objects_in_district for word in DistrictNames)
else KpiTagEnumClass.ELECTRICITY_GRID
),
)
Expand All @@ -125,7 +125,7 @@ def create_kpi_collection(self, building_objects_in_district):
building_objects_in_district=building_objects_in_district,
kpi_tag=(
KpiTagEnumClass.GENERAL
if building_objects_in_district not in DistrictNames.__members__
if not any(word in building_objects_in_district for word in DistrictNames)
else KpiTagEnumClass.ELECTRICITY_GRID
),
)
Expand All @@ -141,7 +141,7 @@ def create_kpi_collection(self, building_objects_in_district):
building_objects_in_district=building_objects_in_district,
kpi_tag=(
KpiTagEnumClass.GENERAL
if building_objects_in_district not in DistrictNames.__members__
if not any(word in building_objects_in_district for word in DistrictNames)
else KpiTagEnumClass.ELECTRICITY_GRID
),
)
Expand All @@ -152,7 +152,7 @@ def create_kpi_collection(self, building_objects_in_district):
building_objects_in_district=building_objects_in_district,
kpi_tag=(
KpiTagEnumClass.GENERAL
if building_objects_in_district not in DistrictNames.__members__
if not any(word in building_objects_in_district for word in DistrictNames)
else KpiTagEnumClass.ELECTRICITY_GRID
),
)
Expand All @@ -162,7 +162,7 @@ def create_kpi_collection(self, building_objects_in_district):
building_objects_in_district=building_objects_in_district,
kpi_tag=(
KpiTagEnumClass.GENERAL
if building_objects_in_district not in DistrictNames.__members__
if not any(word in building_objects_in_district for word in DistrictNames)
else KpiTagEnumClass.ELECTRICITY_GRID
),
)
Expand Down
Loading

0 comments on commit 3b47fcc

Please sign in to comment.