forked from CERC/documentation
Updated with a minor modification
This commit is contained in:
parent
aacc756805
commit
a784710fd3
28
support_material/tutorial_2/main_level_2.py
Normal file
28
support_material/tutorial_2/main_level_2.py
Normal file
@ -0,0 +1,28 @@
|
||||
from hub.imports.geometry_factory import GeometryFactory
|
||||
from hub.helpers.dictionaries import Dictionaries
|
||||
from hub.imports.construction_factory import ConstructionFactory
|
||||
from hub.imports.usage_factory import UsageFactory
|
||||
from hub.exports.energy_building_exports_factory import EnergyBuildingsExportsFactory
|
||||
|
||||
geojson_file = './test_one_building.geojson'
|
||||
city = GeometryFactory('geojson',
|
||||
geojson_file,
|
||||
height_field='citygml_me',
|
||||
year_of_construction_field='ANNEE_CONS',
|
||||
function_field='CODE_UTILI',
|
||||
function_to_hub=Dictionaries().montreal_function_to_hub_function).city
|
||||
|
||||
ConstructionFactory('nrcan', city).enrich()
|
||||
UsageFactory('nrcan' , city).enrich()
|
||||
|
||||
for building in city.buildings:
|
||||
print(building.function)
|
||||
for internal_zone in building.internal_zones:
|
||||
for usage in internal_zone.usages:
|
||||
print('Occupancy density in persons per m2:', usage.occupancy.occupancy_density)
|
||||
for schedule in usage.occupancy.occupancy_schedules:
|
||||
print(schedule.day_types, schedule.values)
|
||||
|
||||
# Export to IDF (Energy+)
|
||||
EnergyBuildingsExportsFactory('idf', city, './').export()
|
||||
|
Loading…
Reference in New Issue
Block a user