Added export method to export factory
This commit is contained in:
parent
a06ad62ec7
commit
bc762e4844
|
@ -13,7 +13,7 @@ class EnergySystemsExportFactory:
|
|||
Exports factory class for energy systems
|
||||
"""
|
||||
|
||||
def __init__(self, city, user_input, hp_model, data_type='heat', base_path=None):
|
||||
def __init__(self, city, user_input, hp_model, output_path, 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')
|
||||
|
@ -21,11 +21,20 @@ class EnergySystemsExportFactory:
|
|||
self._user_input = user_input
|
||||
self._hp_model = hp_model
|
||||
self._data_type = data_type
|
||||
self._output_path = output_path
|
||||
|
||||
def export_heat_pump(self):
|
||||
def _export_heat_pump(self):
|
||||
"""
|
||||
Exports heat pump performance data as coefficients
|
||||
of some objective function
|
||||
:return: None
|
||||
"""
|
||||
HeatPumpExport(self._base_path, self._city).run_insel(self._user_input, self._hp_model, self._data_type)
|
||||
HeatPumpExport(self._base_path, self._city, self._output_path)\
|
||||
.run_insel(self._user_input, self._hp_model, self._data_type)
|
||||
|
||||
def export(self):
|
||||
"""
|
||||
Export the city given to the class using the given export type handler
|
||||
:return: None
|
||||
"""
|
||||
return getattr(self, '_export_heat_pump', lambda: None)()
|
||||
|
|
Loading…
Reference in New Issue
Block a user