From f6de5b6f96d41a84da29087f027d9281ce94d836 Mon Sep 17 00:00:00 2001 From: Peter Yefi Date: Wed, 10 Nov 2021 10:14:31 +0000 Subject: [PATCH] Modified export_heat_pump to run insel instead of exporting to CSV --- exports/energy_systems_factory.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/exports/energy_systems_factory.py b/exports/energy_systems_factory.py index b089765a..39ff5db3 100644 --- a/exports/energy_systems_factory.py +++ b/exports/energy_systems_factory.py @@ -8,16 +8,19 @@ from pathlib import Path from exports.energy_systems.heat_pump_export import HeatPumpExport -class EnergySystemsFactory: +class EnergySystemsExportFactory: """ Exports factory class for energy systems """ - def __init__(self, city, base_path=None): + def __init__(self, city, user_input, hp_model, data_type='heat', base_path=None): self._city = city if base_path is None: base_path = base_path = Path(Path(__file__).parent.parent / 'data/energy_systems') self._base_path = base_path + self._user_input = user_input + self._hp_model = hp_model + self._data_type = data_type def export_heat_pump(self): """ @@ -25,4 +28,4 @@ class EnergySystemsFactory: of some objective function :return: None """ - HeatPumpExport(self._base_path, self._city).export_xlsx() + HeatPumpExport(self._base_path, self._city).run_insel(self._user_input, self._hp_model, self._data_type)