diff --git a/costs/__init__.py b/costs/__init__.py index 9e6f8b2..091f134 100644 --- a/costs/__init__.py +++ b/costs/__init__.py @@ -22,19 +22,7 @@ BASEMENT_HEATED_CASE = 1 CLIMATE_REFERENCE_CITY = 'Montreal' WEATHER_FILE = 'CAN_PQ_Montreal.Intl.AP.716270_CWEC.epw' WEATHER_FORMAT = 'epw' -CURRENT_STATUS = 0 -# constants - -SKIN_RETROFIT = 1 -SYSTEM_RETROFIT_AND_PV = 2 -SKIN_RETROFIT_AND_SYSTEM_RETROFIT_AND_PV = 3 -RETROFITTING_SCENARIOS = [ - CURRENT_STATUS, - SKIN_RETROFIT, - SYSTEM_RETROFIT_AND_PV, - SKIN_RETROFIT_AND_SYSTEM_RETROFIT_AND_PV -] tmp_folder = Path('./tmp').resolve() out_path = Path('./outputs').resolve() files = glob.glob(f'{out_path}/*') diff --git a/costs/capital_costs.py b/costs/capital_costs.py index ce7835a..e26c997 100644 --- a/costs/capital_costs.py +++ b/costs/capital_costs.py @@ -7,8 +7,8 @@ import pandas as pd import numpy_financial as npf from hub.city_model_structure.building import Building import hub.helpers.constants as cte -from configuration import Configuration -from costs import SKIN_RETROFIT, SKIN_RETROFIT_AND_SYSTEM_RETROFIT_AND_PV, SYSTEM_RETROFIT_AND_PV +from costs.configuration import Configuration +from costs.constants import SKIN_RETROFIT, SKIN_RETROFIT_AND_SYSTEM_RETROFIT_AND_PV, SYSTEM_RETROFIT_AND_PV from costs.cost_base import CostBase diff --git a/costs/configuration.py b/costs/configuration.py index b7929d7..907efdf 100644 --- a/costs/configuration.py +++ b/costs/configuration.py @@ -1,7 +1,7 @@ """ Configuration module """ -from hub.catalog_factories.costs_catalog_factory import CostCatalogFactory +from hub.catalog_factories.costs_catalog_factory import CostsCatalogFactory from hub.catalog_factories.catalog import Catalog @@ -36,7 +36,7 @@ class Configuration: self._discount_rate = discount_rate self._retrofitting_year_construction = retrofitting_year_construction self._factories_handler = factories_handler - self._cost_catalog = CostCatalogFactory(factories_handler).catalog + self._cost_catalog = CostsCatalogFactory(factories_handler).catalog self._retrofit_scenario = retrofit_scenario self._fuel_type = fuel_type diff --git a/costs/constants.py b/costs/constants.py new file mode 100644 index 0000000..5407f14 --- /dev/null +++ b/costs/constants.py @@ -0,0 +1,11 @@ +# constants +CURRENT_STATUS = 0 +SKIN_RETROFIT = 1 +SYSTEM_RETROFIT_AND_PV = 2 +SKIN_RETROFIT_AND_SYSTEM_RETROFIT_AND_PV = 3 +RETROFITTING_SCENARIOS = [ + CURRENT_STATUS, + SKIN_RETROFIT, + SYSTEM_RETROFIT_AND_PV, + SKIN_RETROFIT_AND_SYSTEM_RETROFIT_AND_PV +] \ No newline at end of file diff --git a/costs/cost.py b/costs/cost.py index 94a02ef..48e11e9 100644 --- a/costs/cost.py +++ b/costs/cost.py @@ -5,9 +5,9 @@ import pandas as pd import numpy_financial as npf from hub.city_model_structure.building import Building -from configuration import Configuration +from costs.configuration import Configuration from costs import CapitalCosts, EndOfLifeCosts, TotalMaintenanceCosts, TotalOperationalCosts, TotalOperationalIncomes -from costs import CURRENT_STATUS +from costs.constants import CURRENT_STATUS class Cost: diff --git a/costs/cost_base.py b/costs/cost_base.py index 0ff5102..5408a78 100644 --- a/costs/cost_base.py +++ b/costs/cost_base.py @@ -4,7 +4,7 @@ Cost base module from hub.city_model_structure.building import Building -from configuration import Configuration +from costs.configuration import Configuration class CostBase: diff --git a/costs/end_of_life_costs.py b/costs/end_of_life_costs.py index 7f7cf41..4723300 100644 --- a/costs/end_of_life_costs.py +++ b/costs/end_of_life_costs.py @@ -5,7 +5,7 @@ import math import pandas as pd from hub.city_model_structure.building import Building -from configuration import Configuration +from costs.configuration import Configuration from costs.cost_base import CostBase diff --git a/costs/total_maintenance_costs.py b/costs/total_maintenance_costs.py index 8dce3b8..c28b3df 100644 --- a/costs/total_maintenance_costs.py +++ b/costs/total_maintenance_costs.py @@ -6,7 +6,7 @@ import pandas as pd from hub.city_model_structure.building import Building import hub.helpers.constants as cte -from configuration import Configuration +from costs.configuration import Configuration from costs.cost_base import CostBase diff --git a/costs/total_operational_costs.py b/costs/total_operational_costs.py index a6513e5..ec44735 100644 --- a/costs/total_operational_costs.py +++ b/costs/total_operational_costs.py @@ -7,7 +7,7 @@ import pandas as pd from hub.city_model_structure.building import Building import hub.helpers.constants as cte -from configuration import Configuration +from costs.configuration import Configuration from costs.cost_base import CostBase diff --git a/costs/total_operational_incomes.py b/costs/total_operational_incomes.py index c8af92c..512db8c 100644 --- a/costs/total_operational_incomes.py +++ b/costs/total_operational_incomes.py @@ -6,7 +6,7 @@ import pandas as pd from hub.city_model_structure.building import Building import hub.helpers.constants as cte -from configuration import Configuration +from costs.configuration import Configuration from costs.cost_base import CostBase diff --git a/requirements.txt b/requirements.txt index bc8992f..add886c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,3 @@ numpy_financial -cerc_hub \ No newline at end of file +cerc_hub +pandas \ No newline at end of file