2020-10-15 09:18:35 -04:00
|
|
|
"""
|
|
|
|
Building module
|
|
|
|
SPDX - License - Identifier: LGPL - 3.0 - or -later
|
|
|
|
Copyright © 2020 Project Author Sanam Dabirian sanam.dabirian@mail.concordia.ca
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
|
|
class Occupancy:
|
|
|
|
"""
|
|
|
|
Occupancy class
|
|
|
|
"""
|
|
|
|
|
|
|
|
def __init__(self, internal_heat_gain, heat_dissipation, occupant_rate, occupant_type, occupant_zone,
|
2020-10-26 08:26:31 -04:00
|
|
|
number_of_occupants, arrival_time=None, departure_time=None, break_time=None, day_of_week=None,
|
|
|
|
pd_of_meetings_duration=None, occupant_schedule=None):
|
2020-10-15 09:18:35 -04:00
|
|
|
"""
|
|
|
|
Constructor
|
|
|
|
"""
|
|
|
|
|
|
|
|
self._internal_heat_gain = internal_heat_gain
|
|
|
|
self._heat_dissipation = heat_dissipation
|
|
|
|
self._occupant_rate = occupant_rate
|
|
|
|
self._occupant_type = occupant_type
|
|
|
|
self._occupant_zone = occupant_zone
|
2020-10-26 08:26:31 -04:00
|
|
|
self._occupant_schedule = occupant_schedule
|
2020-10-15 09:18:35 -04:00
|
|
|
self._number_of_occupants = number_of_occupants
|
2020-10-26 08:26:31 -04:00
|
|
|
self._arrival_time = arrival_time
|
|
|
|
self._departure_time = departure_time
|
|
|
|
self._break_time = break_time
|
|
|
|
self._day_of_week = day_of_week
|
|
|
|
self._pd_of_meetings_duration = pd_of_meetings_duration
|
2020-10-15 09:18:35 -04:00
|
|
|
|
|
|
|
@property
|
|
|
|
def internal_heat_gain(self):
|
|
|
|
"""
|
|
|
|
Get internal heat gain of occupants
|
|
|
|
:return: occupant heat gain
|
|
|
|
"""
|
|
|
|
return self._internal_heat_gain
|
|
|
|
|
|
|
|
@property
|
|
|
|
def heat_dissipation(self):
|
|
|
|
"""
|
|
|
|
Get heat dissipation of occupants
|
|
|
|
:return: heat dissipation
|
|
|
|
"""
|
|
|
|
return self._heat_dissipation
|
|
|
|
|
|
|
|
@property
|
|
|
|
def occupant_rate(self):
|
|
|
|
"""
|
|
|
|
Get rate of occupancy
|
|
|
|
:return: rate of occupancy
|
|
|
|
"""
|
|
|
|
return self._occupant_rate
|
|
|
|
|
2020-10-19 14:32:48 -04:00
|
|
|
@property
|
2020-10-15 09:18:35 -04:00
|
|
|
def occupant_type(self):
|
|
|
|
"""
|
|
|
|
Get type of occupancy
|
|
|
|
:return: type of occupancy
|
|
|
|
"""
|
|
|
|
return self._occupant_type
|
|
|
|
|
|
|
|
@property
|
|
|
|
def occupant_zone(self):
|
|
|
|
"""
|
|
|
|
Get the zone that occupant is in it
|
|
|
|
:return: occupant zone
|
|
|
|
"""
|
|
|
|
return self._occupant_zone
|
|
|
|
|
2020-10-26 08:26:31 -04:00
|
|
|
@property
|
|
|
|
def occupant_schedule(self):
|
|
|
|
"""
|
|
|
|
Get the schedule when an occupant is in a zone
|
|
|
|
:return: occupant schedule
|
|
|
|
"""
|
|
|
|
return self._occupant_schedule
|
|
|
|
|
2020-10-15 09:18:35 -04:00
|
|
|
@property
|
|
|
|
def number_of_occupants(self):
|
|
|
|
"""
|
|
|
|
Get the number of occupants
|
|
|
|
:return: number of occupants
|
|
|
|
"""
|
|
|
|
return self._number_of_occupants
|
|
|
|
|
|
|
|
@property
|
2020-10-16 01:25:22 -04:00
|
|
|
def arrival_time(self):
|
2020-10-15 09:18:35 -04:00
|
|
|
"""
|
2020-10-16 01:25:22 -04:00
|
|
|
Get the arrival time of the occupant (for office building)
|
2020-10-15 09:18:35 -04:00
|
|
|
:return: arrival time
|
|
|
|
"""
|
|
|
|
return self._arrival_time
|
|
|
|
|
|
|
|
@property
|
2020-10-16 01:25:22 -04:00
|
|
|
def departure_time(self):
|
2020-10-15 09:18:35 -04:00
|
|
|
"""
|
2020-10-16 01:25:22 -04:00
|
|
|
Get the departure time of the occupant (for office building)
|
2020-10-15 09:18:35 -04:00
|
|
|
:return: departure time
|
|
|
|
"""
|
|
|
|
return self._departure_time
|
|
|
|
|
|
|
|
@property
|
2020-10-16 01:25:22 -04:00
|
|
|
def break_time(self):
|
2020-10-15 09:18:35 -04:00
|
|
|
"""
|
2020-10-16 01:25:22 -04:00
|
|
|
Get the lunch or break time of the occupant (for office building)
|
2020-10-15 09:18:35 -04:00
|
|
|
:return: break time
|
|
|
|
"""
|
|
|
|
return self._break_time
|
|
|
|
|
|
|
|
@property
|
2020-10-26 08:26:31 -04:00
|
|
|
def day_of_week(self):
|
2020-10-15 09:18:35 -04:00
|
|
|
"""
|
|
|
|
Get the day of the week
|
|
|
|
:return: day of the week
|
|
|
|
"""
|
|
|
|
return self._day_of_week
|
|
|
|
|
|
|
|
@property
|
2020-10-16 01:25:22 -04:00
|
|
|
def pd_of_meetings_duration(self):
|
2020-10-15 09:18:35 -04:00
|
|
|
"""
|
|
|
|
Get the probability distribution of the meeting duration
|
|
|
|
:return: probability distribution of the meeting duration
|
|
|
|
"""
|
2020-10-26 08:26:31 -04:00
|
|
|
return self._pd_of_meetings_duration
|