added four more properties to usage_zone.py that can be extracted from de_library.xml
This commit is contained in:
parent
e535bf8280
commit
8ad203bc90
|
@ -20,8 +20,12 @@ class UsageZone:
|
|||
self._heating_setpoint = None
|
||||
self._heating_setback = None
|
||||
self._cooling_setpoint = None
|
||||
self._occupancy_density = None
|
||||
self._hours_day = None
|
||||
self._days_year = None
|
||||
self._dhw_average_volume_pers_day = None
|
||||
self._dhw_preparation_temperature = None
|
||||
self._electrical_app_average_consumption_sqm_year = None
|
||||
# todo: mechanical_air_change must come from library, talk to Rabeeh
|
||||
self._mechanical_air_change = ConfigurationHelper().min_air_change
|
||||
self._occupancy = None
|
||||
|
@ -207,7 +211,76 @@ class UsageZone:
|
|||
@heating_schedule.setter
|
||||
def heating_schedule(self, values):
|
||||
"""
|
||||
Get heating schedule
|
||||
heating schedule
|
||||
:param values: dict{DtaFrame(int)}
|
||||
"""
|
||||
self._heating_schedule = values
|
||||
|
||||
@property
|
||||
def occupancy_density(self):
|
||||
# todo: review units
|
||||
"""
|
||||
Get occupancy density in persons per m2
|
||||
:return: float
|
||||
"""
|
||||
return self._occupancy_density
|
||||
|
||||
@occupancy_density.setter
|
||||
def occupancy_density(self, values):
|
||||
"""
|
||||
occupancy density in persons per m2
|
||||
:param values: float
|
||||
"""
|
||||
self._occupancy_density = values
|
||||
|
||||
@property
|
||||
def dhw_average_volume_pers_day(self):
|
||||
# todo: review units
|
||||
"""
|
||||
Get average DHW consumption in liters per person per day
|
||||
:return: float
|
||||
"""
|
||||
return self._dhw_average_volume_pers_day
|
||||
|
||||
@dhw_average_volume_pers_day.setter
|
||||
def dhw_average_volume_pers_day(self, values):
|
||||
"""
|
||||
average DHW consumption in liters per person per day
|
||||
:param values: float
|
||||
"""
|
||||
self._dhw_average_volume_pers_day = values
|
||||
|
||||
@property
|
||||
def dhw_preparation_temperature(self):
|
||||
# todo: review units
|
||||
"""
|
||||
Get preparation temperature of the DHW in degree Celsius
|
||||
:return: float
|
||||
"""
|
||||
return self._dhw_preparation_temperature
|
||||
|
||||
@dhw_preparation_temperature.setter
|
||||
def dhw_preparation_temperature(self, values):
|
||||
"""
|
||||
preparation temperature of the DHW in degree Celsius
|
||||
:param values: float
|
||||
"""
|
||||
self._dhw_preparation_temperature = values
|
||||
|
||||
@property
|
||||
def electrical_app_average_consumption_sqm_year(self):
|
||||
# todo: review units
|
||||
"""
|
||||
Get average consumption of electrical appliances in Watts per m2 and year
|
||||
:return: float
|
||||
"""
|
||||
return self._electrical_app_average_consumption_sqm_year
|
||||
|
||||
@electrical_app_average_consumption_sqm_year.setter
|
||||
def electrical_app_average_consumption_sqm_year(self, values):
|
||||
"""
|
||||
average consumption of electrical appliances in Watts per m2 and year
|
||||
:param values: float
|
||||
"""
|
||||
self._electrical_app_average_consumption_sqm_year = values
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ class DemoOccupancyParameters:
|
|||
schedules = dict()
|
||||
occupancy = pd.read_excel(xls, sheet_name=OccupancyHelper.pluto_occupancy_function(building.function),
|
||||
skiprows=[0, 1, 2, 3], nrows=39, usecols="A:AA")
|
||||
# todo: should we safe the data type? How?
|
||||
# todo: should we save the data type? How?
|
||||
for index in range(0, 13):
|
||||
data = pd.DataFrame()
|
||||
columns_names = []
|
||||
|
|
|
@ -44,13 +44,26 @@ class UsBaseUsageParameters:
|
|||
|
||||
@staticmethod
|
||||
def _parse_zone_usage_type(zone_usage_type, usage_zone):
|
||||
usage_zone.occupancy_density = zone_usage_type['occupancy']['occupancyDensity']
|
||||
usage_zone.hours_day = zone_usage_type['occupancy']['usageHoursPerDay']
|
||||
usage_zone.days_year = zone_usage_type['occupancy']['usageDaysPerYear']
|
||||
usage_zone.cooling_setpoint = zone_usage_type['endUses']['space_cooling']['coolingSetPointTemperature']
|
||||
usage_zone.heating_setpoint = zone_usage_type['endUses']['space_heating']['heatingSetPointTemperature']
|
||||
usage_zone.heating_setback = zone_usage_type['endUses']['space_heating']['heatingSetBackTemperature']
|
||||
# todo: schedules set points!!!
|
||||
if 'ventilation' in zone_usage_type['endUses'] and zone_usage_type['endUses']['ventilation'] is not None:
|
||||
usage_zone.mechanical_air_change = zone_usage_type['endUses']['ventilation']['mechanicalAirChangeRate']
|
||||
usage_zone.dhw_average_volume_pers_day = \
|
||||
zone_usage_type['endUses']['domestic_hot_water']['averageVolumePerPersAndDay']
|
||||
usage_zone.dhw_preparation_temperature = \
|
||||
zone_usage_type['endUses']['domestic_hot_water']['preparationTemperature']
|
||||
# todo: are there more than one of these electrical values?
|
||||
# todo: schedules!!
|
||||
if 'all_electrical_appliances' in zone_usage_type['endUses']:
|
||||
if 'averageConsumptionPerSqmAndYear' in zone_usage_type['endUses']['all_electrical_appliances']:
|
||||
usage_zone.electrical_app_average_consumption_sqm_year = \
|
||||
zone_usage_type['endUses']['all_electrical_appliances']['averageConsumptionPerSqmAndYear']
|
||||
|
||||
int_gains = InternalGains()
|
||||
int_gains.latent_fraction = zone_usage_type['occupancy']['internGains']['latentFraction']
|
||||
int_gains.convective_fraction = zone_usage_type['occupancy']['internGains']['convectiveFraction']
|
||||
|
|
Loading…
Reference in New Issue
Block a user