Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug fixing for kpis preparation in districts #357

Merged
merged 6 commits into from
Sep 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading