looking for a bug
This commit is contained in:
parent
aca1bab882
commit
0e7acd89d1
|
@ -1,3 +1,4 @@
|
|||
#
|
||||
# Prepare your environment
|
||||
|
||||
Download the latest version of python and Microsoft c++ redistributable
|
||||
|
|
|
@ -28,9 +28,13 @@ class NrelCatalog(Catalog):
|
|||
with open(archetypes_path) as xml:
|
||||
self._archetypes = xmltodict.parse(xml.read(), force_list=('archetype', 'construction'))
|
||||
self._catalog_windows = self._load_windows()
|
||||
print('windows', self._catalog_windows)
|
||||
self._catalog_materials = self._load_materials()
|
||||
print('materials', self._catalog_materials)
|
||||
self._catalog_constructions = self._load_constructions()
|
||||
print('constructions', self._catalog_constructions)
|
||||
self._catalog_archetypes = self._load_archetypes()
|
||||
print('archetypes', self._catalog_archetypes)
|
||||
|
||||
# store the full catalog data model in self._content
|
||||
self._content = Content(self._catalog_archetypes,
|
||||
|
|
|
@ -173,7 +173,6 @@ class Idf:
|
|||
return file_name
|
||||
|
||||
def _add_file_schedule(self, usage, schedule, file_name):
|
||||
print(file_name)
|
||||
_schedule = self._idf.newidfobject(self._FILE_SCHEDULE, Name=f'{schedule.type} schedules {usage}')
|
||||
_schedule.Schedule_Type_Limits_Name = self.idf_type_limits[schedule.data_type]
|
||||
_schedule.File_Name = file_name
|
||||
|
|
|
@ -33,10 +33,12 @@ class UsPhysicsParameters(NrelPhysicsInterface):
|
|||
city = self._city
|
||||
for building in city.buildings:
|
||||
try:
|
||||
print(building.function, building.year_of_construction, self._climate_zone)
|
||||
archetype = self._search_archetype(building.function, building.year_of_construction, self._climate_zone)
|
||||
except KeyError:
|
||||
sys.stderr.write(f'Building {building.name} has unknown archetype for building function: {building.function} '
|
||||
f'and building year of construction: {building.year_of_construction}\n')
|
||||
f'and building year of construction: {building.year_of_construction} '
|
||||
f'and climate zone reference norm {self._climate_zone}\n')
|
||||
return
|
||||
|
||||
# if building has no thermal zones defined from geometry, one thermal zone per storey is assigned
|
||||
|
@ -64,7 +66,10 @@ class UsPhysicsParameters(NrelPhysicsInterface):
|
|||
@staticmethod
|
||||
def _search_archetype(function, year_of_construction, climate_zone):
|
||||
nrel_catalog = ConstructionCatalogFactory('nrel').catalog
|
||||
print(nrel_catalog.names)
|
||||
nrel_archetypes = nrel_catalog.entries('archetypes')
|
||||
for nrel_archetype in nrel_archetypes:
|
||||
print(nrel_archetype.name)
|
||||
for building_archetype in nrel_archetypes:
|
||||
construction_period_limits = building_archetype.construction_period.split(' - ')
|
||||
if construction_period_limits[1] == 'PRESENT':
|
||||
|
|
Loading…
Reference in New Issue
Block a user