Modified export_heat_pump to run insel instead of exporting to CSV

This commit is contained in:
Peter Yefi 2021-11-10 10:14:31 +00:00
parent c7d569b688
commit f6de5b6f96

View File

@ -8,16 +8,19 @@ from pathlib import Path
from exports.energy_systems.heat_pump_export import HeatPumpExport from exports.energy_systems.heat_pump_export import HeatPumpExport
class EnergySystemsFactory: class EnergySystemsExportFactory:
""" """
Exports factory class for energy systems 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 self._city = city
if base_path is None: if base_path is None:
base_path = base_path = Path(Path(__file__).parent.parent / 'data/energy_systems') base_path = base_path = Path(Path(__file__).parent.parent / 'data/energy_systems')
self._base_path = base_path 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): def export_heat_pump(self):
""" """
@ -25,4 +28,4 @@ class EnergySystemsFactory:
of some objective function of some objective function
:return: None :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)