From 3b44f6563e9e19b405680cca6d65b5aa4a360f1d Mon Sep 17 00:00:00 2001 From: jgavalda Date: Mon, 29 May 2023 09:17:07 -0400 Subject: [PATCH] Excel suppressed. To be defined with Pilar --- main.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/main.py b/main.py index 0b261b1..18794d7 100644 --- a/main.py +++ b/main.py @@ -27,9 +27,9 @@ from energy_systems_sizing import EnergySystemsSizing from life_cycle_costs import LifeCycleCosts -def _npv_from_list(discount_rate, list_cashflow): - lcc_value = np.npv(discount_rate,list_cashflow) - raise KeyError('bad inputs') +def _npv_from_list(npv_discount_rate, list_cashflow): + lcc_value = np.npv(npv_discount_rate, list_cashflow) + return lcc_value def _search_archetype(costs_catalog, building_function): costs_archetypes = costs_catalog.entries('archetypes').archetypes @@ -154,8 +154,8 @@ for retrofitting_scenario in retrofitting_scenarios: lcc.calculate_total_operational_costs()['PV_maintenance'] df_operational_incomes = lcc.calculate_total_operational_incomes()['Incomes electricity'] - life_cycle_costs_capital_skin=_npv_from_list(discount_rate , df_capital_costs_skin.values.tolist()) - life_cycle_costs_capital_systems=_npv_from_list(discount_rate , df_capital_costs_systems.values.tolist()) + life_cycle_costs_capital_skin = _npv_from_list(discount_rate, df_capital_costs_skin.values.tolist()) + life_cycle_costs_capital_systems = _npv_from_list(discount_rate, df_capital_costs_systems.values.tolist()) life_cycle_costs_end_of_life_costs = _npv_from_list(discount_rate, df_end_of_life_costs.values.tolist()) life_cycle_operational_costs = _npv_from_list(discount_rate, df_operational_costs.values.tolist()) life_cycle_maintenance_costs = _npv_from_list(discount_rate, df_maintenance_costs.values.tolist()) @@ -176,5 +176,6 @@ for retrofitting_scenario in retrofitting_scenarios: 'total_operational_costs','total_maintenance_costs','life_cycle_costs', 'maintenance_costs'] - life_cycle_results.to_excel(Path(__file__).parent/'out_files'/f'Results{building.name}.xlsx', index=True) + +#life_cycle_results.to_excel(Path(__file__).parent/'out_files'/f'Results{building.name}.xlsx', index=True)