Skip to content

Commit

Permalink
fix pylint
Browse files Browse the repository at this point in the history
  • Loading branch information
k-rieck committed Sep 26, 2024
1 parent faa6d65 commit e9761fa
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions hisim/building_sizer_utils/interface_configs/kpi_config.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
"""KPI config module."""

from dataclasses import dataclass
from dataclasses_json import dataclass_json
import enum
from dataclasses_json import dataclass_json


@enum.unique
Expand Down Expand Up @@ -33,11 +33,11 @@ def get_kpi(self, chosen_kpi: KpiForOptimization) -> float:
Also referred to as "rating" or "fitness" in the evolutionary algorithm of the building sizer.
"""
self.chosen_kpi = chosen_kpi
if self.chosen_kpi == KpiForOptimization.SELFSUFFICIENCY:

if chosen_kpi == KpiForOptimization.SELFSUFFICIENCY:
return self.self_sufficiency_rate_in_percent
elif self.chosen_kpi == KpiForOptimization.TOTAL_COSTS:
if chosen_kpi == KpiForOptimization.TOTAL_COSTS:
return self.total_costs_in_euro
elif self.chosen_kpi == KpiForOptimization.TOTAL_CO2_EMISSION:
if chosen_kpi == KpiForOptimization.TOTAL_CO2_EMISSION:
return self.total_co2_emissions_in_kg

raise ValueError(f"Chosen KPI {self.chosen_kpi} not recognized.")

0 comments on commit e9761fa

Please sign in to comment.