Skip to content

Commit

Permalink
Merge pull request #558 from RWTH-EBC/issue557_occupancy_profiles
Browse files Browse the repository at this point in the history
Issue557 occupancy profiles
  • Loading branch information
marcusfuchs authored Dec 19, 2018
2 parents fee0cc9 + 718bb4b commit b131255
Show file tree
Hide file tree
Showing 5 changed files with 58 additions and 9 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ models for all libraries supporting the

## Version

TEASER is a ongoing research project, the current version is 0.6.5, which is
TEASER is a ongoing research project, the current version is 0.6.6, which is
still a pre-release.

## How to use TEASER
Expand Down
2 changes: 1 addition & 1 deletion doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
# The short X.Y version.
version = '0.6.'
# The full version, including alpha/beta/rc tags.
release = '0.6.5'
release = '0.6.6'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from setuptools import setup

setup(name='teaser',
version='0.6.5',
version='0.6.6',
description='Tool for Energy Analysis and Simulation for '
'Efficient Retrofit ',
url='https://github.com/RWTH-EBC/TEASER',
Expand Down
20 changes: 14 additions & 6 deletions teaser/logic/buildingobjects/calculation/aixlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -373,13 +373,19 @@ def modelica_gains_boundary(

for i, time in enumerate(time_line):
if i == 0:
time.append(0)
time.append(0)
time.append(0)
time.append(
zone_count.use_conditions.profile_persons[i + 1])
time.append(
zone_count.use_conditions.profile_machines[i + 1])
time.append(
zone_count.use_conditions.profile_lighting[i + 1])
else:
time.append(zone_count.use_conditions.profile_persons[i - 1])
time.append(zone_count.use_conditions.profile_machines[i - 1])
time.append(zone_count.use_conditions.profile_lighting[i - 1])
time.append(
zone_count.use_conditions.profile_persons[i - 1])
time.append(
zone_count.use_conditions.profile_machines[i - 1])
time.append(
zone_count.use_conditions.profile_lighting[i - 1])

internal_boundary = np.array(time_line)

Expand All @@ -388,3 +394,5 @@ def modelica_gains_boundary(
mdict={'Internals': internal_boundary},
appendmat=False,
format='4')

return internal_boundary
41 changes: 41 additions & 0 deletions tests/test_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -3159,3 +3159,44 @@ def test_modelica_export_version(self):
assert ideas.replace('v', '') == ibpsa.version['IDEAS']
except IndexError:
warnings.warn('There was an index error for IDEAS', UserWarning)

def test_type_bldg_residential_profiles(self):
"""
Verification of the type building generation of an office building.
Values are compared with TEASER3 values.
"""
from teaser.logic.archetypebuildings.bmvbs.singlefamilydwelling \
import SingleFamilyDwelling

prj.set_default()
test_residential = SingleFamilyDwelling(parent=prj,
name="TestBuilding",
year_of_construction=1988,
number_of_floors=3,
height_of_floors=3,
net_leased_area=2500)

test_residential.generate_archetype()

prj.calc_all_buildings()

path_to_export = prj.export_aixlib(
internal_id=None,
path=None)

from scipy.io import loadmat
file = loadmat(os.path.join(
path_to_export,
"TestBuilding",
"InternalGains_TestBuilding.mat"))

use_cond = test_residential.thermal_zones[0].use_conditions

assert (file['Internals'].transpose()[1][1:] ==
use_cond.profile_persons).all()

assert (file['Internals'].transpose()[2][1:] ==
use_cond.profile_machines).all()

assert (file['Internals'].transpose()[3][1:] ==
use_cond.profile_lighting).all()

0 comments on commit b131255

Please sign in to comment.