Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F91002477
generic_interfaces.py
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Wed, Nov 6, 20:07
Size
2 KB
Mime Type
text/x-python
Expires
Fri, Nov 8, 20:07 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
22177665
Attached To
R3852 EMS for Smart-Building
generic_interfaces.py
View Options
__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
Log In to Comment