Compare commits
7 Commits
Author | SHA1 | Date | |
---|---|---|---|
512e6e2282 | |||
c4852ee9b7 | |||
97bc73e526 | |||
3d49fbcfdf | |||
e71afa4ff9 | |||
7baff0b846 | |||
4e8d09c067 |
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -1 +1,3 @@
|
||||||
.idea
|
.idea
|
||||||
|
cerc_costs.egg-info
|
||||||
|
dist
|
|
@ -1,9 +0,0 @@
|
||||||
Metadata-Version: 2.1
|
|
||||||
Name: cerc-costs
|
|
||||||
Version: 0.1.0.2
|
|
||||||
Summary: CERC costs contains the basic cost calculation per CERC-Hub building
|
|
||||||
Classifier: License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)
|
|
||||||
Classifier: Programming Language :: Python
|
|
||||||
Classifier: Programming Language :: Python :: 3
|
|
||||||
|
|
||||||
CERC costs contains the basic cost calculation per CERC-Hub building
|
|
|
@ -1,22 +0,0 @@
|
||||||
README.md
|
|
||||||
pyproject.toml
|
|
||||||
requirements.txt
|
|
||||||
setup.py
|
|
||||||
cerc_costs.egg-info/PKG-INFO
|
|
||||||
cerc_costs.egg-info/SOURCES.txt
|
|
||||||
cerc_costs.egg-info/dependency_links.txt
|
|
||||||
cerc_costs.egg-info/requires.txt
|
|
||||||
cerc_costs.egg-info/top_level.txt
|
|
||||||
costs/__init__.py
|
|
||||||
costs/__main__.py
|
|
||||||
costs/capital_costs.py
|
|
||||||
costs/configuration.py
|
|
||||||
costs/constants.py
|
|
||||||
costs/cost.py
|
|
||||||
costs/cost_base.py
|
|
||||||
costs/end_of_life_costs.py
|
|
||||||
costs/peak_load.py
|
|
||||||
costs/total_maintenance_costs.py
|
|
||||||
costs/total_operational_costs.py
|
|
||||||
costs/total_operational_incomes.py
|
|
||||||
costs/version.py
|
|
|
@ -1 +0,0 @@
|
||||||
|
|
|
@ -1,4 +0,0 @@
|
||||||
numpy_financial
|
|
||||||
cerc_hub
|
|
||||||
pandas
|
|
||||||
setuptools
|
|
|
@ -1 +0,0 @@
|
||||||
costs
|
|
|
@ -39,9 +39,9 @@ class CapitalCosts(CostBase):
|
||||||
dtype='float'
|
dtype='float'
|
||||||
)
|
)
|
||||||
self._yearly_capital_costs.loc[0, 'B2010_opaque_walls'] = 0
|
self._yearly_capital_costs.loc[0, 'B2010_opaque_walls'] = 0
|
||||||
self._yearly_capital_costs.loc[0]['B2020_transparent'] = 0
|
self._yearly_capital_costs.loc[0, 'B2020_transparent'] = 0
|
||||||
self._yearly_capital_costs.loc[0, 'B3010_opaque_roof'] = 0
|
self._yearly_capital_costs.loc[0, 'B3010_opaque_roof'] = 0
|
||||||
self._yearly_capital_costs.loc[0]['B10_superstructure'] = 0
|
self._yearly_capital_costs.loc[0, 'B10_superstructure'] = 0
|
||||||
self._yearly_capital_costs.loc[0, 'D3020_heat_generating_systems'] = 0
|
self._yearly_capital_costs.loc[0, 'D3020_heat_generating_systems'] = 0
|
||||||
self._yearly_capital_costs.loc[0, 'D3030_cooling_generation_systems'] = 0
|
self._yearly_capital_costs.loc[0, 'D3030_cooling_generation_systems'] = 0
|
||||||
self._yearly_capital_costs.loc[0, 'D3040_distribution_systems'] = 0
|
self._yearly_capital_costs.loc[0, 'D3040_distribution_systems'] = 0
|
||||||
|
@ -107,9 +107,9 @@ class CapitalCosts(CostBase):
|
||||||
capital_cost_roof = surface_roof * chapter.item('B3010_opaque_roof').refurbishment[0]
|
capital_cost_roof = surface_roof * chapter.item('B3010_opaque_roof').refurbishment[0]
|
||||||
capital_cost_ground = surface_ground * chapter.item('B10_superstructure').refurbishment[0]
|
capital_cost_ground = surface_ground * chapter.item('B10_superstructure').refurbishment[0]
|
||||||
self._yearly_capital_costs.loc[0, 'B2010_opaque_walls'] = capital_cost_opaque * own_capital
|
self._yearly_capital_costs.loc[0, 'B2010_opaque_walls'] = capital_cost_opaque * own_capital
|
||||||
self._yearly_capital_costs.loc[0]['B2020_transparent'] = capital_cost_transparent * own_capital
|
self._yearly_capital_costs.loc[0, 'B2020_transparent'] = capital_cost_transparent * own_capital
|
||||||
self._yearly_capital_costs.loc[0, 'B3010_opaque_roof'] = capital_cost_roof * own_capital
|
self._yearly_capital_costs.loc[0, 'B3010_opaque_roof'] = capital_cost_roof * own_capital
|
||||||
self._yearly_capital_costs.loc[0]['B10_superstructure'] = capital_cost_ground * own_capital
|
self._yearly_capital_costs.loc[0, 'B10_superstructure'] = capital_cost_ground * own_capital
|
||||||
|
|
||||||
if self._configuration.retrofit_scenario in (SYSTEM_RETROFIT_AND_PV, SKIN_RETROFIT_AND_SYSTEM_RETROFIT_AND_PV):
|
if self._configuration.retrofit_scenario in (SYSTEM_RETROFIT_AND_PV, SKIN_RETROFIT_AND_SYSTEM_RETROFIT_AND_PV):
|
||||||
chapter = self._capital_costs_chapter.chapter('D_services')
|
chapter = self._capital_costs_chapter.chapter('D_services')
|
||||||
|
@ -119,7 +119,7 @@ class CapitalCosts(CostBase):
|
||||||
capital_cost_distribution_equipment = peak_cooling * chapter.item('D3040_distribution_systems').initial_investment[0]
|
capital_cost_distribution_equipment = peak_cooling * chapter.item('D3040_distribution_systems').initial_investment[0]
|
||||||
capital_cost_other_hvac_ahu = peak_cooling * chapter.item('D3080_other_hvac_ahu').initial_investment[0]
|
capital_cost_other_hvac_ahu = peak_cooling * chapter.item('D3080_other_hvac_ahu').initial_investment[0]
|
||||||
capital_cost_lighting = self._total_floor_area * chapter.item('D5020_lighting_and_branch_wiring').initial_investment[0]
|
capital_cost_lighting = self._total_floor_area * chapter.item('D5020_lighting_and_branch_wiring').initial_investment[0]
|
||||||
self._yearly_capital_costs.loc[0]['D301010_photovoltaic_system'] = capital_cost_pv
|
self._yearly_capital_costs.loc[0, 'D301010_photovoltaic_system'] = capital_cost_pv
|
||||||
self._yearly_capital_costs.loc[0, 'D3020_heat_generating_systems'] = capital_cost_heating_equipment * own_capital
|
self._yearly_capital_costs.loc[0, 'D3020_heat_generating_systems'] = capital_cost_heating_equipment * own_capital
|
||||||
self._yearly_capital_costs.loc[0, 'D3030_cooling_generation_systems'] = capital_cost_cooling_equipment * own_capital
|
self._yearly_capital_costs.loc[0, 'D3030_cooling_generation_systems'] = capital_cost_cooling_equipment * own_capital
|
||||||
self._yearly_capital_costs.loc[0, 'D3040_distribution_systems'] = capital_cost_distribution_equipment * own_capital
|
self._yearly_capital_costs.loc[0, 'D3040_distribution_systems'] = capital_cost_distribution_equipment * own_capital
|
||||||
|
@ -219,7 +219,7 @@ class CapitalCosts(CostBase):
|
||||||
|
|
||||||
if self._configuration.retrofit_scenario in (SYSTEM_RETROFIT_AND_PV, SKIN_RETROFIT_AND_SYSTEM_RETROFIT_AND_PV):
|
if self._configuration.retrofit_scenario in (SYSTEM_RETROFIT_AND_PV, SKIN_RETROFIT_AND_SYSTEM_RETROFIT_AND_PV):
|
||||||
if (year % chapter.item('D301010_photovoltaic_system').lifetime) == 0:
|
if (year % chapter.item('D301010_photovoltaic_system').lifetime) == 0:
|
||||||
self._yearly_capital_costs.loc[year]['D301010_photovoltaic_system'] += (
|
self._yearly_capital_costs.loc[year, 'D301010_photovoltaic_system'] += (
|
||||||
surface_pv * chapter.item('D301010_photovoltaic_system').reposition[0] * costs_increase
|
surface_pv * chapter.item('D301010_photovoltaic_system').reposition[0] * costs_increase
|
||||||
)
|
)
|
||||||
capital_cost_skin = capital_cost_opaque + capital_cost_ground + capital_cost_transparent + capital_cost_roof
|
capital_cost_skin = capital_cost_opaque + capital_cost_ground + capital_cost_transparent + capital_cost_roof
|
||||||
|
|
|
@ -54,7 +54,7 @@ class TotalOperationalCosts(CostBase):
|
||||||
fixed_gas_cost_year_0 = archetype.operational_cost.fuels[1].fixed_monthly * 12 * factor_residential
|
fixed_gas_cost_year_0 = archetype.operational_cost.fuels[1].fixed_monthly * 12 * factor_residential
|
||||||
variable_gas_cost_year_0 = (
|
variable_gas_cost_year_0 = (
|
||||||
(building.heating_consumption[cte.YEAR][0] + building.domestic_hot_water_consumption[cte.YEAR][0])
|
(building.heating_consumption[cte.YEAR][0] + building.domestic_hot_water_consumption[cte.YEAR][0])
|
||||||
/ 1000 * cte.WATTS_HOUR_TO_JULES * archetype.operational_cost.fuels[1].variable[0]
|
/ (1000 * cte.WATTS_HOUR_TO_JULES) * archetype.operational_cost.fuels[1].variable[0]
|
||||||
)
|
)
|
||||||
if self._configuration.fuel_type == 0:
|
if self._configuration.fuel_type == 0:
|
||||||
electricity_heating = building.heating_consumption[cte.YEAR][0] / 1000
|
electricity_heating = building.heating_consumption[cte.YEAR][0] / 1000
|
||||||
|
@ -73,8 +73,9 @@ class TotalOperationalCosts(CostBase):
|
||||||
peak_electricity_load = PeakLoad(building).electricity_peak_load
|
peak_electricity_load = PeakLoad(building).electricity_peak_load
|
||||||
peak_load_value = peak_electricity_load.max(axis=1)
|
peak_load_value = peak_electricity_load.max(axis=1)
|
||||||
peak_electricity_demand = peak_load_value[1] / 1000 # self._peak_electricity_demand adapted to kW
|
peak_electricity_demand = peak_load_value[1] / 1000 # self._peak_electricity_demand adapted to kW
|
||||||
variable_electricity_cost_year_0 = \
|
variable_electricity_cost_year_0 = (
|
||||||
total_electricity_consumption * cte.WATTS_HOUR_TO_JULES * archetype.operational_cost.fuels[0].variable[0]
|
total_electricity_consumption / cte.WATTS_HOUR_TO_JULES * archetype.operational_cost.fuels[0].variable[0]
|
||||||
|
)
|
||||||
peak_electricity_cost_year_0 = peak_electricity_demand * archetype.operational_cost.fuels[0].fixed_power * 12
|
peak_electricity_cost_year_0 = peak_electricity_demand * archetype.operational_cost.fuels[0].fixed_power * 12
|
||||||
monthly_electricity_cost_year_0 = archetype.operational_cost.fuels[0].fixed_monthly * 12 * factor_residential
|
monthly_electricity_cost_year_0 = archetype.operational_cost.fuels[0].fixed_monthly * 12 * factor_residential
|
||||||
|
|
||||||
|
|
|
@ -28,15 +28,16 @@ class TotalOperationalIncomes(CostBase):
|
||||||
:return: pd.DataFrame
|
:return: pd.DataFrame
|
||||||
"""
|
"""
|
||||||
building = self._building
|
building = self._building
|
||||||
|
archetype = self._archetype
|
||||||
if cte.YEAR not in building.onsite_electrical_production:
|
if cte.YEAR not in building.onsite_electrical_production:
|
||||||
onsite_electricity_production = 0
|
onsite_electricity_production = 0
|
||||||
else:
|
else:
|
||||||
onsite_electricity_production = building.onsite_electrical_production[cte.YEAR][0] / 1000
|
onsite_electricity_production = building.onsite_electrical_production[cte.YEAR][0]
|
||||||
|
|
||||||
for year in range(1, self._configuration.number_of_years + 1):
|
for year in range(1, self._configuration.number_of_years + 1):
|
||||||
price_increase_electricity = math.pow(1 + self._configuration.electricity_price_index, year)
|
price_increase_electricity = math.pow(1 + self._configuration.electricity_price_index, year)
|
||||||
# todo: check the adequate assignation of price. Pilar
|
# todo: check the adequate assignation of price. Pilar
|
||||||
price_export = 0.075 # archetype.income.electricity_export
|
price_export = archetype.income.electricity_export * cte.WATTS_HOUR_TO_JULES * 1000 # to account for unit change
|
||||||
self._yearly_operational_incomes.loc[year, 'Incomes electricity'] = (
|
self._yearly_operational_incomes.loc[year, 'Incomes electricity'] = (
|
||||||
onsite_electricity_production * price_export * price_increase_electricity
|
onsite_electricity_production * price_export * price_increase_electricity
|
||||||
)
|
)
|
||||||
|
|
|
@ -5,4 +5,4 @@ Copyright © 2023 Project Coder Guille Gutierrez guillermo.gutierrezmorote@conco
|
||||||
Code contributor Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca
|
Code contributor Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca
|
||||||
Code contributor Oriol Gavalda Torrellas oriol.gavalda@concordia.ca
|
Code contributor Oriol Gavalda Torrellas oriol.gavalda@concordia.ca
|
||||||
"""
|
"""
|
||||||
__version__ = '0.1.0.4'
|
__version__ = '0.1.0.6'
|
||||||
|
|
|
@ -1,121 +0,0 @@
|
||||||
{
|
|
||||||
"type": "FeatureCollection",
|
|
||||||
"features": [
|
|
||||||
{
|
|
||||||
"type": "Feature",
|
|
||||||
"id": 2864,
|
|
||||||
"geometry": {
|
|
||||||
"type": "Polygon",
|
|
||||||
"coordinates": [
|
|
||||||
[
|
|
||||||
[
|
|
||||||
-73.55628837310991,
|
|
||||||
45.60732526295055
|
|
||||||
],
|
|
||||||
[
|
|
||||||
-73.55628287285629,
|
|
||||||
45.607324262904456
|
|
||||||
],
|
|
||||||
[
|
|
||||||
-73.55609247288925,
|
|
||||||
45.607288563416546
|
|
||||||
],
|
|
||||||
[
|
|
||||||
-73.55607107262188,
|
|
||||||
45.60734486277528
|
|
||||||
],
|
|
||||||
[
|
|
||||||
-73.55612487276466,
|
|
||||||
45.60735496306114
|
|
||||||
],
|
|
||||||
[
|
|
||||||
-73.55609867281544,
|
|
||||||
45.60742366317157
|
|
||||||
],
|
|
||||||
[
|
|
||||||
-73.55624087271804,
|
|
||||||
45.60745026331904
|
|
||||||
],
|
|
||||||
[
|
|
||||||
-73.55628837310991,
|
|
||||||
45.60732526295055
|
|
||||||
]
|
|
||||||
]
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"properties": {
|
|
||||||
"OBJECTID_12_13": 2864,
|
|
||||||
"ID_UEV": "02033771",
|
|
||||||
"CIVIQUE_DE": " 8212",
|
|
||||||
"CIVIQUE_FI": " 8212",
|
|
||||||
"NOM_RUE": "avenue Peterborough (ANJ)",
|
|
||||||
"SUITE_DEBU": " ",
|
|
||||||
"MUNICIPALI": "50",
|
|
||||||
"ETAGE_HORS": 1,
|
|
||||||
"NOMBRE_LOG": 1,
|
|
||||||
"ANNEE_CONS": 1960,
|
|
||||||
"CODE_UTILI": "1000",
|
|
||||||
"LETTRE_DEB": " ",
|
|
||||||
"LETTRE_FIN": " ",
|
|
||||||
"LIBELLE_UT": "Logement",
|
|
||||||
"CATEGORIE_": "R\u00c3\u00a9gulier",
|
|
||||||
"MATRICULE8": "0051-49-2041-2-000-0000",
|
|
||||||
"SUPERFICIE": 450,
|
|
||||||
"SUPERFIC_1": 176,
|
|
||||||
"NO_ARROND_": "REM09",
|
|
||||||
"Shape_Leng": 0.000666191644361,
|
|
||||||
"OBJECTID": 2864,
|
|
||||||
"Join_Count": 1,
|
|
||||||
"TARGET_FID": 2864,
|
|
||||||
"feature_id": "bdd1f0fe-89de-46d2-80dc-87d3636df60a",
|
|
||||||
"md_id": " ",
|
|
||||||
"acqtech": 1360,
|
|
||||||
"acqtech_en": "Lidar",
|
|
||||||
"acqtech_fr": "Lidar",
|
|
||||||
"provider": 461,
|
|
||||||
"provideren": "Municipal",
|
|
||||||
"providerfr": "Municipal",
|
|
||||||
"datemin": "20151124",
|
|
||||||
"datemax": "20151208",
|
|
||||||
"haccmin": 2,
|
|
||||||
"haccmax": 2,
|
|
||||||
"vaccmin": 1,
|
|
||||||
"vaccmax": 1,
|
|
||||||
"heightmin": 1.17,
|
|
||||||
"heightmax": 7.5,
|
|
||||||
"elevmin": 45.48,
|
|
||||||
"elevmax": 45.96,
|
|
||||||
"bldgarea": 193.18,
|
|
||||||
"comment": " ",
|
|
||||||
"OBJECTID_1": 2864,
|
|
||||||
"Shape_Le_1": 0.000666191644361,
|
|
||||||
"Shape_Ar_1": 2.22753099997e-08,
|
|
||||||
"OBJECTID_12": 2864,
|
|
||||||
"Join_Count_1": 1,
|
|
||||||
"TARGET_FID_1": 2863,
|
|
||||||
"g_objectid": "897744",
|
|
||||||
"g_co_mrc": "66023",
|
|
||||||
"g_code_mun": "66023",
|
|
||||||
"g_arrond": "REM09",
|
|
||||||
"g_anrole": "2019",
|
|
||||||
"g_usag_pre": "R\u00c3\u00a9sidentiel",
|
|
||||||
"g_no_lot": "1113400",
|
|
||||||
"g_nb_poly_": "1",
|
|
||||||
"g_utilisat": "1000",
|
|
||||||
"g_nb_logem": "1",
|
|
||||||
"g_nb_locau": " ",
|
|
||||||
"g_descript": "Unit\u00c3\u00a9 d'\u00c3\u00a9valuation",
|
|
||||||
"g_id_provi": "66023005149204120000000",
|
|
||||||
"g_sup_tota": "450.1",
|
|
||||||
"g_geometry": "0.000958907",
|
|
||||||
"g_geomet_1": "5.20226e-008",
|
|
||||||
"g_dat_acqu": "2020-02-12 00:00:00.0000000",
|
|
||||||
"g_dat_char": "2020-02-17 00:00:00.0000000",
|
|
||||||
"Shape_Leng_1": 0.000666191644361,
|
|
||||||
"Shape_Area_1": 2.22753099997e-08,
|
|
||||||
"Shape_Length": 0.0006661919640545334,
|
|
||||||
"Shape_Area": 2.22753099997e-08
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user