Credit option incorporated and working correctly
This commit is contained in:
parent
ad2cbad9d0
commit
5be5b3f51e
|
@ -18,6 +18,9 @@ SKIN_RETROFIT = 1
|
||||||
SYSTEM_RETROFIT_AND_PV = 2
|
SYSTEM_RETROFIT_AND_PV = 2
|
||||||
SKIN_RETROFIT_AND_SYSTEM_RETROFIT_AND_PV = 3
|
SKIN_RETROFIT_AND_SYSTEM_RETROFIT_AND_PV = 3
|
||||||
NUMBER_OF_YEARS = 31
|
NUMBER_OF_YEARS = 31
|
||||||
|
PERCENTAGE_CREDIT = 0
|
||||||
|
INTEREST_RATE = 0.04
|
||||||
|
CREDIT_YEARS = 15
|
||||||
CONSUMER_PRICE_INDEX = 0.04
|
CONSUMER_PRICE_INDEX = 0.04
|
||||||
ELECTRICITY_PEAK_INDEX = 0.05
|
ELECTRICITY_PEAK_INDEX = 0.05
|
||||||
ELECTRICITY_PRICE_INDEX = 0.05
|
ELECTRICITY_PRICE_INDEX = 0.05
|
||||||
|
|
|
@ -26,7 +26,7 @@ from life_cycle_costs import LifeCycleCosts
|
||||||
from costs import CLIMATE_REFERENCE_CITY, WEATHER_FILE, WEATHER_FORMAT, CONSTRUCTION_FORMAT, USAGE_FORMAT, RETROFITTING_YEAR_CONSTRUCTION
|
from costs import CLIMATE_REFERENCE_CITY, WEATHER_FILE, WEATHER_FORMAT, CONSTRUCTION_FORMAT, USAGE_FORMAT, RETROFITTING_YEAR_CONSTRUCTION
|
||||||
from costs import ENERGY_SYSTEM_FORMAT, ATTIC_HEATED_CASE, BASEMENT_HEATED_CASE, RETROFITTING_SCENARIOS, NUMBER_OF_YEARS
|
from costs import ENERGY_SYSTEM_FORMAT, ATTIC_HEATED_CASE, BASEMENT_HEATED_CASE, RETROFITTING_SCENARIOS, NUMBER_OF_YEARS
|
||||||
from costs import CONSUMER_PRICE_INDEX, ELECTRICITY_PEAK_INDEX, ELECTRICITY_PRICE_INDEX, GAS_PRICE_INDEX, DISCOUNT_RATE
|
from costs import CONSUMER_PRICE_INDEX, ELECTRICITY_PEAK_INDEX, ELECTRICITY_PRICE_INDEX, GAS_PRICE_INDEX, DISCOUNT_RATE
|
||||||
from costs import SKIN_RETROFIT, SYSTEM_RETROFIT_AND_PV, SKIN_RETROFIT_AND_SYSTEM_RETROFIT_AND_PV
|
from costs import SKIN_RETROFIT, SYSTEM_RETROFIT_AND_PV, SKIN_RETROFIT_AND_SYSTEM_RETROFIT_AND_PV, PERCENTAGE_CREDIT
|
||||||
|
|
||||||
# import paths
|
# import paths
|
||||||
from costs import file_path, tmp_folder, out_path
|
from costs import file_path, tmp_folder, out_path
|
||||||
|
|
|
@ -8,9 +8,9 @@ Code contributor Oriol Gavalda Torrellas oriol.gavalda@concordia.ca
|
||||||
import math
|
import math
|
||||||
|
|
||||||
import pandas as pd
|
import pandas as pd
|
||||||
|
import numpy_financial as npf
|
||||||
import hub.helpers.constants as cte
|
import hub.helpers.constants as cte
|
||||||
from costs import SKIN_RETROFIT, SYSTEM_RETROFIT_AND_PV, SKIN_RETROFIT_AND_SYSTEM_RETROFIT_AND_PV
|
from costs import SKIN_RETROFIT, SYSTEM_RETROFIT_AND_PV, SKIN_RETROFIT_AND_SYSTEM_RETROFIT_AND_PV, PERCENTAGE_CREDIT,INTEREST_RATE,CREDIT_YEARS
|
||||||
|
|
||||||
|
|
||||||
class LifeCycleCosts:
|
class LifeCycleCosts:
|
||||||
|
@ -134,10 +134,10 @@ class LifeCycleCosts:
|
||||||
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
|
self._yearly_capital_costs.loc[0, 'B2010_opaque_walls'] = capital_cost_opaque * (1-PERCENTAGE_CREDIT)
|
||||||
self._yearly_capital_costs.loc[0]['B2020_transparent'] = capital_cost_transparent
|
self._yearly_capital_costs.loc[0]['B2020_transparent'] = capital_cost_transparent * (1-PERCENTAGE_CREDIT)
|
||||||
self._yearly_capital_costs.loc[0, 'B3010_opaque_roof'] = capital_cost_roof
|
self._yearly_capital_costs.loc[0, 'B3010_opaque_roof'] = capital_cost_roof * (1-PERCENTAGE_CREDIT)
|
||||||
self._yearly_capital_costs.loc[0]['B10_superstructure'] = capital_cost_ground
|
self._yearly_capital_costs.loc[0]['B10_superstructure'] = capital_cost_ground * (1-PERCENTAGE_CREDIT)
|
||||||
|
|
||||||
|
|
||||||
if self._retrofitting_scenario in (SYSTEM_RETROFIT_AND_PV, SKIN_RETROFIT_AND_SYSTEM_RETROFIT_AND_PV):
|
if self._retrofitting_scenario in (SYSTEM_RETROFIT_AND_PV, SKIN_RETROFIT_AND_SYSTEM_RETROFIT_AND_PV):
|
||||||
|
@ -156,26 +156,49 @@ class LifeCycleCosts:
|
||||||
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 = total_floor_area * chapter.item('D5020_lighting_and_branch_wiring').initial_investment[0]
|
capital_cost_lighting = total_floor_area * chapter.item('D5020_lighting_and_branch_wiring').initial_investment[0]
|
||||||
|
|
||||||
self._yearly_capital_costs.loc[0, 'D3020_heat_generating_systems'], = capital_cost_heating_equipment
|
self._yearly_capital_costs.loc[0, 'D3020_heat_generating_systems'] = capital_cost_heating_equipment * (1-PERCENTAGE_CREDIT)
|
||||||
self._yearly_capital_costs.loc[0, 'D3030_cooling_generation_systems'] = capital_cost_cooling_equipment
|
self._yearly_capital_costs.loc[0, 'D3030_cooling_generation_systems'] = capital_cost_cooling_equipment * (1-PERCENTAGE_CREDIT)
|
||||||
self._yearly_capital_costs.loc[0, 'D3040_distribution_systems'] = capital_cost_distribution_equipment
|
self._yearly_capital_costs.loc[0, 'D3040_distribution_systems'] = capital_cost_distribution_equipment * (1-PERCENTAGE_CREDIT)
|
||||||
self._yearly_capital_costs.loc[0, 'D3080_other_hvac_ahu'] = capital_cost_other_hvac_ahu
|
self._yearly_capital_costs.loc[0, 'D3080_other_hvac_ahu'] = capital_cost_other_hvac_ahu * (1-PERCENTAGE_CREDIT)
|
||||||
self._yearly_capital_costs.loc[0, 'D5020_lighting_and_branch_wiring'] = capital_cost_lighting
|
self._yearly_capital_costs.loc[0, 'D5020_lighting_and_branch_wiring'] = capital_cost_lighting * (1-PERCENTAGE_CREDIT)
|
||||||
|
|
||||||
for year in range(1, self._number_of_years):
|
for year in range(1, self._number_of_years):
|
||||||
chapter = chapters.chapter('D_services')
|
chapter = chapters.chapter('D_services')
|
||||||
costs_increase = math.pow(1 + self._consumer_price_index, year)
|
costs_increase = math.pow(1 + self._consumer_price_index, year)
|
||||||
|
self._yearly_capital_costs.loc[year, 'B2010_opaque_walls'] = -npf.pmt(INTEREST_RATE, CREDIT_YEARS,
|
||||||
|
capital_cost_opaque * (PERCENTAGE_CREDIT))
|
||||||
|
self._yearly_capital_costs.loc[year, 'B2020_transparent'] = -npf.pmt(INTEREST_RATE, CREDIT_YEARS,
|
||||||
|
capital_cost_transparent * (PERCENTAGE_CREDIT)
|
||||||
|
)
|
||||||
|
self._yearly_capital_costs.loc[year, 'B3010_opaque_roof'] = -npf.pmt(INTEREST_RATE, CREDIT_YEARS,capital_cost_roof
|
||||||
|
* (PERCENTAGE_CREDIT))
|
||||||
|
self._yearly_capital_costs.loc[year, 'B10_superstructure'] = -npf.pmt(INTEREST_RATE, CREDIT_YEARS,
|
||||||
|
capital_cost_ground * (PERCENTAGE_CREDIT))
|
||||||
|
self._yearly_capital_costs.loc[year, 'D3020_heat_generating_systems'] = -npf.pmt(INTEREST_RATE,CREDIT_YEARS,
|
||||||
|
capital_cost_heating_equipment
|
||||||
|
* (PERCENTAGE_CREDIT))
|
||||||
|
self._yearly_capital_costs.loc[year, 'D3030_cooling_generation_systems'] = -npf.pmt(INTEREST_RATE, CREDIT_YEARS,
|
||||||
|
capital_cost_cooling_equipment
|
||||||
|
* (PERCENTAGE_CREDIT))
|
||||||
|
self._yearly_capital_costs.loc[year, 'D3040_distribution_systems'] = -npf.pmt(INTEREST_RATE, CREDIT_YEARS,
|
||||||
|
capital_cost_distribution_equipment
|
||||||
|
* (PERCENTAGE_CREDIT))
|
||||||
|
self._yearly_capital_costs.loc[year, 'D3080_other_hvac_ahu'] = -npf.pmt(INTEREST_RATE, CREDIT_YEARS,
|
||||||
|
capital_cost_other_hvac_ahu
|
||||||
|
* (PERCENTAGE_CREDIT))
|
||||||
|
self._yearly_capital_costs.loc[year, 'D5020_lighting_and_branch_wiring'] = -npf.pmt(INTEREST_RATE, CREDIT_YEARS,
|
||||||
|
capital_cost_lighting
|
||||||
|
* (PERCENTAGE_CREDIT))
|
||||||
if (year % chapter.item('D3020_heat_generating_systems').lifetime) == 0:
|
if (year % chapter.item('D3020_heat_generating_systems').lifetime) == 0:
|
||||||
reposition_cost_heating_equipment = peak_heating * chapter.item('D3020_heat_generating_systems').reposition[0] \
|
reposition_cost_heating_equipment = peak_heating * chapter.item('D3020_heat_generating_systems').reposition[0] \
|
||||||
* costs_increase
|
* costs_increase
|
||||||
self._yearly_capital_costs.loc[year, 'D3020_heat_generating_systems'] = reposition_cost_heating_equipment
|
self._yearly_capital_costs.loc[year, 'D3020_heat_generating_systems'] += reposition_cost_heating_equipment
|
||||||
|
|
||||||
if (year % chapter.item('D3030_cooling_generation_systems').lifetime) == 0:
|
if (year % chapter.item('D3030_cooling_generation_systems').lifetime) == 0:
|
||||||
reposition_cost_cooling_equipment = peak_cooling \
|
reposition_cost_cooling_equipment = peak_cooling \
|
||||||
* chapter.item('D3030_cooling_generation_systems').reposition[0] \
|
* chapter.item('D3030_cooling_generation_systems').reposition[0] \
|
||||||
* costs_increase
|
* costs_increase
|
||||||
self._yearly_capital_costs.loc[year, 'D3030_cooling_generation_systems'] = reposition_cost_cooling_equipment
|
self._yearly_capital_costs.loc[year, 'D3030_cooling_generation_systems'] += reposition_cost_cooling_equipment
|
||||||
|
|
||||||
if (year % chapter.item('D3080_other_hvac_ahu').lifetime) == 0:
|
if (year % chapter.item('D3080_other_hvac_ahu').lifetime) == 0:
|
||||||
reposition_cost_hvac_ahu = peak_cooling * chapter.item('D3080_other_hvac_ahu').reposition[0] * costs_increase
|
reposition_cost_hvac_ahu = peak_cooling * chapter.item('D3080_other_hvac_ahu').reposition[0] * costs_increase
|
||||||
|
@ -184,11 +207,11 @@ class LifeCycleCosts:
|
||||||
if (year % chapter.item('D5020_lighting_and_branch_wiring').lifetime) == 0:
|
if (year % chapter.item('D5020_lighting_and_branch_wiring').lifetime) == 0:
|
||||||
reposition_cost_lighting = total_floor_area * chapter.item('D5020_lighting_and_branch_wiring').reposition[0] \
|
reposition_cost_lighting = total_floor_area * chapter.item('D5020_lighting_and_branch_wiring').reposition[0] \
|
||||||
* costs_increase
|
* costs_increase
|
||||||
self._yearly_capital_costs.loc[year, 'D5020_lighting_and_branch_wiring'] = reposition_cost_lighting
|
self._yearly_capital_costs.loc[year, 'D5020_lighting_and_branch_wiring'] += reposition_cost_lighting
|
||||||
|
|
||||||
if self._retrofitting_scenario in (SYSTEM_RETROFIT_AND_PV, SKIN_RETROFIT_AND_SYSTEM_RETROFIT_AND_PV):
|
if self._retrofitting_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'] = surface_pv \
|
self._yearly_capital_costs.loc[year]['D301010_photovoltaic_system'] += surface_pv \
|
||||||
* chapter.item(
|
* chapter.item(
|
||||||
'D301010_photovoltaic_system').reposition[0] * costs_increase
|
'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
|
||||||
|
|
121
input_files/selected_building_2864.geojson
Normal file
121
input_files/selected_building_2864.geojson
Normal file
|
@ -0,0 +1,121 @@
|
||||||
|
{
|
||||||
|
"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