Page MenuHomec4science

generic_interfaces.py
No OneTemporary

File Metadata

Created
Wed, Nov 6, 20:07

generic_interfaces.py

__author__ = 'Olivier Van Cutsem'
from building_data_management.interface_management.interface_properties import *
class BasicInterface:
def __init__(self, s, t, thProp=None, lumProp=None):
self.__surface = s
self.__thickness = t
# Thermal property of this interface
self.__thermalProp = None
if thProp is not None:
self.__thermalProp = InterfaceThermalProperty(thProp)
# Luminosity property of this interface
self.__luminosityProp = None
if lumProp is not None:
self.__thermalProp = InterfaceLuminosityProperty(lumProp)
@property
def thermalProp(self):
return self.__thermalProp
@thermalProp.setter
def thermalProp(self, thProp):
self.__thermalProp = thProp
@property
def luminosityProp(self):
return self.__thermalProp
@luminosityProp.setter
def luminosityProp(self, lumProp):
self.__luminosityProp = lumProp
@property
def surface(self):
return self.__surface
@property
def thickness(self):
return self.__thickness
### SPECIFIC INTERFACES ###
class WallInterface(BasicInterface):
"""
Basic one, no actuator and no luminosity property
"""
def __init__(self, s, t, thProp):
super(BasicInterface, self).__init__(s, t, thProp, None)
@property
def luminosityProp(self):
return None
class WindowInterface(BasicInterface):
"""
A window interface, having thermal and luminosity property
May have two actuator linked:
- for the window to open/close
- for the blind
"""
def __init__(self, s, t, thProp, lumProp, irr_to_heat):
super(BasicInterface, self).__init__(s, t, thProp, lumProp)
self.__luminosityProp = None
# The list of actuators IDs
self.__actuators = {'OPENING': None, 'BLIND': None}
# The conversion model from irradiance to heat
self.__irrTransfer = irr_to_heat # Todo !
@property
def openingActuator(self):
return self.__actuators['OPENING']
@openingActuator.setter
def openingActuator(self, id):
self.__actuators['OPENING'] = id
@property
def blindActuator(self):
return self.__actuators['BLIND']
@blindActuator.setter
def blindActuator(self, id):
self.__actuators['BLIND'] = id
class DoorInterface(WallInterface):
"""
Basic one, no actuator and no luminosity property
"""
def __init__(self, s, t, thProp):
super(WallInterface, self).__init__(s, t, thProp, None)
# The list of actuators IDs
self.__actuator = None
@property
def openingActuator(self):
return self.__actuator
@openingActuator.setter
def openingActuator(self, id):
self.__actuator = id

Event Timeline