mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-07-12 13:29:04 +00:00
document component types
This commit is contained in:
parent
cfdfa8581a
commit
aa084a20df
2 changed files with 56 additions and 19 deletions
|
|
@ -58,7 +58,7 @@ def handler():
|
||||||
df = df.reset_index(drop=True)
|
df = df.reset_index(drop=True)
|
||||||
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
idx = 24
|
idx = 27
|
||||||
record = df[df.index == idx].to_dict("records")[0]
|
record = df[df.index == idx].to_dict("records")[0]
|
||||||
record = {k: v for k, v in record.items() if v not in [None, np.nan]}
|
record = {k: v for k, v in record.items() if v not in [None, np.nan]}
|
||||||
from pprint import pprint
|
from pprint import pprint
|
||||||
|
|
|
||||||
|
|
@ -3,42 +3,73 @@ from epc_data.attributes.attribute_utils import clean_description, remove_punctu
|
||||||
|
|
||||||
|
|
||||||
class HotWaterAttributes:
|
class HotWaterAttributes:
|
||||||
|
# HEATER_TYPES refer to the main devices used for heating water. These devices can be powered by different energy
|
||||||
|
# sources.
|
||||||
HEATER_TYPES = [
|
HEATER_TYPES = [
|
||||||
'gas instantaneous',
|
'gas instantaneous', # A water heater that provides hot water only as it is needed
|
||||||
'electric heat pump',
|
'electric heat pump',
|
||||||
'electric immersion',
|
# A device that transfers heat from a source (like the ground or air) into a building to provide hot water
|
||||||
'gas boiler',
|
'electric immersion', # An electric device that heats water using electric resistance
|
||||||
'electric instantaneous',
|
'gas boiler', # A boiler that uses gas as fuel to heat water
|
||||||
'gas multipoint',
|
'electric instantaneous', # Similar to gas instantaneous, but uses electricity as its energy source
|
||||||
|
'gas multipoint', # A gas water heater that can supply hot water to multiple points of use at once
|
||||||
|
'heat pump' # A general category for heat pumps, regardless of the energy source
|
||||||
]
|
]
|
||||||
|
|
||||||
|
# SYSTEM_TYPES refer to the larger system within which the heater operates.
|
||||||
SYSTEM_TYPES = [
|
SYSTEM_TYPES = [
|
||||||
'from main system',
|
'from main system', # The hot water is provided by the main heating system of the building
|
||||||
'from secondary system',
|
'from secondary system',
|
||||||
'community scheme',
|
# The hot water is provided by a secondary (or supplementary) heating system in the building
|
||||||
|
'community scheme', # The hot water is provided by a community heating system
|
||||||
]
|
]
|
||||||
|
|
||||||
|
# THERMOSTAT_CHARACTERISTICS refer to features related to temperature control in the system.
|
||||||
THERMOSTAT_CHARACTERISTICS = [
|
THERMOSTAT_CHARACTERISTICS = [
|
||||||
'no cylinder thermostat',
|
'no cylinder thermostat', # Indicates that the hot water cylinder does not have a thermostat
|
||||||
]
|
]
|
||||||
|
|
||||||
|
# HEATING_SCOPE refers to the specific role of the heater in the heating system.
|
||||||
HEATING_SCOPE = [
|
HEATING_SCOPE = [
|
||||||
'water heating only',
|
'water heating only', # Indicates that the heater is used only for water heating, not space heating
|
||||||
]
|
]
|
||||||
|
|
||||||
OTHER_CHARACTERISTICS = [
|
# ENERGY_RECOVERY refers to systems or attributes that recover and utilize waste energy.
|
||||||
|
ENERGY_RECOVERY = [
|
||||||
'waste water heat recovery',
|
'waste water heat recovery',
|
||||||
'plus solar',
|
# A system that recovers heat from waste hot water (e.g., from showers) to preheat incoming cold water
|
||||||
'off-peak',
|
'flue gas heat recovery', # A system that recovers heat from the flue gases of a boiler or furnace
|
||||||
'flue gas heat recovery',
|
|
||||||
'standard tariff',
|
|
||||||
'chp',
|
|
||||||
]
|
]
|
||||||
|
|
||||||
|
# TARIFF_TYPE relates to the energy pricing structure or tariff that applies to the system.
|
||||||
|
TARIFF_TYPE = [
|
||||||
|
'standard tariff', # The energy used by the system is billed at a standard rate
|
||||||
|
'off-peak', # The energy used by the system is primarily used during off-peak hours when rates are lower
|
||||||
|
]
|
||||||
|
|
||||||
|
# EXTRA_FEATURES are additional features or systems that enhance the efficiency or capability of the hot water
|
||||||
|
# system.
|
||||||
|
EXTRA_FEATURES = [
|
||||||
|
'plus solar', # Indicates that the system includes solar thermal panels to assist in water heating
|
||||||
|
]
|
||||||
|
|
||||||
|
# CHP_SYSTEMS is specifically for the Combined Heat and Power systems.
|
||||||
|
CHP_SYSTEMS = [
|
||||||
|
'chp',
|
||||||
|
# Combined Heat and Power system, a system that simultaneously produces heat and electricity from the same
|
||||||
|
# energy source
|
||||||
|
]
|
||||||
|
|
||||||
|
# NO_SYSTEM_PRESENT_KEYWORDS indicates there is no specific hot water system present.
|
||||||
NO_SYSTEM_PRESENT_KEYWORDS = [
|
NO_SYSTEM_PRESENT_KEYWORDS = [
|
||||||
'no system present',
|
'no system present',
|
||||||
]
|
]
|
||||||
|
|
||||||
|
# DISTRIBUTION_SYSTEM_KEYWORDS refers to components that assist in the distribution of the heated water.
|
||||||
|
DISTRIBUTION_SYSTEM_KEYWORDS = [
|
||||||
|
'circulator', # A pump used to circulate hot water in the system
|
||||||
|
]
|
||||||
|
|
||||||
def __init__(self, description: str):
|
def __init__(self, description: str):
|
||||||
self.description: str = clean_description(description.lower())
|
self.description: str = clean_description(description.lower())
|
||||||
|
|
||||||
|
|
@ -49,7 +80,10 @@ class HotWaterAttributes:
|
||||||
self.SYSTEM_TYPES,
|
self.SYSTEM_TYPES,
|
||||||
self.THERMOSTAT_CHARACTERISTICS,
|
self.THERMOSTAT_CHARACTERISTICS,
|
||||||
self.HEATING_SCOPE,
|
self.HEATING_SCOPE,
|
||||||
self.OTHER_CHARACTERISTICS,
|
self.ENERGY_RECOVERY,
|
||||||
|
self.TARIFF_TYPE,
|
||||||
|
self.EXTRA_FEATURES,
|
||||||
|
self.CHP_SYSTEMS,
|
||||||
self.NO_SYSTEM_PRESENT_KEYWORDS,
|
self.NO_SYSTEM_PRESENT_KEYWORDS,
|
||||||
]
|
]
|
||||||
):
|
):
|
||||||
|
|
@ -64,8 +98,11 @@ class HotWaterAttributes:
|
||||||
"system_type": find_keyword(self.description, self.SYSTEM_TYPES),
|
"system_type": find_keyword(self.description, self.SYSTEM_TYPES),
|
||||||
"thermostat_characteristics": find_keyword(self.description, self.THERMOSTAT_CHARACTERISTICS),
|
"thermostat_characteristics": find_keyword(self.description, self.THERMOSTAT_CHARACTERISTICS),
|
||||||
"heating_scope": find_keyword(self.description, self.HEATING_SCOPE),
|
"heating_scope": find_keyword(self.description, self.HEATING_SCOPE),
|
||||||
"other_characteristics": [find_keyword(self.description, [keyword]) for keyword in
|
"energy_recovery": find_keyword(self.description, self.ENERGY_RECOVERY),
|
||||||
self.OTHER_CHARACTERISTICS if find_keyword(self.description, [keyword])],
|
"tariff_type": find_keyword(self.description, self.TARIFF_TYPE),
|
||||||
|
"extra_features": find_keyword(self.description, self.EXTRA_FEATURES),
|
||||||
|
"chp_systems": find_keyword(self.description, self.CHP_SYSTEMS),
|
||||||
|
"distribution_system": find_keyword(self.description, self.DISTRIBUTION_SYSTEM_KEYWORDS),
|
||||||
"no_system_present": find_keyword(self.description, self.NO_SYSTEM_PRESENT_KEYWORDS),
|
"no_system_present": find_keyword(self.description, self.NO_SYSTEM_PRESENT_KEYWORDS),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue