Metadata-Version: 2.5
Name: cerc-costs
Version: 0.1.0.8
Summary: CERC costs contains the basic cost calculation per CERC-Hub building.
License-Expression: LGPL-3.0-or-later
License-File: LICENSE.md
Requires-Python: >=3.12
Requires-Dist: cerc-hub
Requires-Dist: numpy-financial
Requires-Dist: pandas
Description-Content-Type: text/markdown

# CERC costs 

This package uses `cerc-hub` as a base for cost calculation. It is intended to be used after executing an energy simulation
workflow building by building.

This module processes the object-oriented generalization to be used the cost workflow.

# Installation

> $ pip install cerc-cost

# Usage
```py
from costs.cost import Cost
from costs.constants import VILLE_DE_QUEBEC
from hub.city_model_structure.city import City
from hub.helpers.dictionaries import Dictionaries

def run(city: City) -> None:
    building = city.buildings[0]
    scenarios = VILLE_DE_QUEBEC.items()
    cost_dictionary = Dictionaries().hub_function_to_canada_construction_function
    for scenario_name, scenario_id in scenarios:
      life_cycle = Cost(building, retrofit_scenario=scenario_id, factories_handler='vdq_custom', dictionary=cost_dictionary)
      life_cycle.to_json(f'costs_output_{scenario_name}.json', orient='table', indent=2)
    print(f"Costs calculated for {len(scenarios)} scenarios!")
```

The available scenarios are defined in the `Constant` class as an enum.

# Constants 

Please refer to `costs/constants.py` for the full list of available cities and their respective retrofit scenarios names and IDs. Below are example on how to configure retrofit scenarios on the CITYanalyzer for each supported city:

## Montreal
```sh
RETROFITTING_SCENARIOS = ['CURRENT_STATUS', 'SKIN_RETROFIT', 'SYSTEM_RETROFIT_AND_PV', 'SKIN_RETROFIT_AND_SYSTEM_RETROFIT_AND_PV']
```

## Ville de Québec
```sh
RETROFITTING_SCENARIOS = ['QC_CURRENT_STATUS', 'QC_BASE_SKIN_RETROFIT', 'QC_TOTAL_SKIN_RETROFIT', 'QC_BASE_SYSTEM_RETROFIT', 'QC_TOTAL_SYSTEM_RETROFIT', 'QC_BASE_SKIN_AND_SYSTEM_RETROFIT', 'QC_TOTAL_SKIN_AND_SYSTEM_RETROFIT']
```