2022-11-02 17:28:51 -04:00
|
|
|
"""
|
|
|
|
Costs Workflow
|
|
|
|
SPDX - License - Identifier: LGPL - 3.0 - or -later
|
|
|
|
Copyright © 2022 Project Author Pilar Monsalvete Álvarez de Uribarri pilar.monsalvete@concordia.ca
|
|
|
|
"""
|
|
|
|
|
|
|
|
from pathlib import Path
|
|
|
|
from imports.geometry_factory import GeometryFactory
|
2023-01-11 04:56:02 -05:00
|
|
|
from capital_cost import CapitalCost
|
2022-11-02 17:28:51 -04:00
|
|
|
from life_cycle_costs import LifeCycleCosts
|
2023-01-11 04:56:02 -05:00
|
|
|
from imports.construction_factory import ConstructionFactory
|
2022-11-02 17:28:51 -04:00
|
|
|
|
2023-01-11 04:56:02 -05:00
|
|
|
gml_file = 'one_building_in_kelowna.gml'
|
2022-11-02 17:28:51 -04:00
|
|
|
file = Path(gml_file).resolve()
|
2023-01-11 04:56:02 -05:00
|
|
|
city = GeometryFactory('citygml', file).city
|
|
|
|
ConstructionFactory('nrel', city).enrich()
|
|
|
|
# print(city.buildings)
|
2022-11-02 17:28:51 -04:00
|
|
|
|
|
|
|
number_of_years = 40
|
|
|
|
consumer_price_index = 0.1
|
|
|
|
|
|
|
|
for building in city.buildings:
|
2023-01-11 04:56:02 -05:00
|
|
|
print("for building in city.buildings:")
|
|
|
|
LifeCycleCosts.capital_cost(building)
|
|
|
|
# lcc = LifeCycleCosts(building, number_of_years, consumer_price_index, costs_catalog)
|
|
|
|
# total_capital_costs = lcc.calculate_capital_costs()
|
|
|
|
# end_of_life_costs = lcc.calculate_end_of_life_costs()
|
|
|
|
# total_operational_costs = lcc.calculate_total_operational_costs()
|
|
|
|
# total_maintenance_costs = lcc.calculate_total_maintenance_costs()
|
|
|
|
# life_cycle_costs = total_capital_costs + end_of_life_costs + total_operational_costs + total_maintenance_costs
|
|
|
|
#
|
|
|
|
# print(f'Building name: {building.name}')
|
|
|
|
# print(f'Capital costs: {total_capital_costs}')
|
|
|
|
# print(f'End of life costs: {end_of_life_costs}')
|
|
|
|
# print(f'Operational costs: {total_operational_costs}')
|
|
|
|
# print(f'Maintenance costs: {total_maintenance_costs}')
|
|
|
|
# print(f'Life cycle costs: {life_cycle_costs}')
|