diff --git a/exports/energy_systems_factory.py b/exports/energy_systems_factory.py index 27442e1b..9003b21a 100644 --- a/exports/energy_systems_factory.py +++ b/exports/energy_systems_factory.py @@ -16,7 +16,8 @@ class EnergySystemsExportFactory: Exports factory class for energy systems """ - def __init__(self, city, user_input, hp_model, output_path, sim_type=0, data_type='heat', base_path=None): + def __init__(self, city, user_input, hp_model, output_path, sim_type=0, data_type='heat', base_path=None, + demand_path=None): """ :param city: the city object @@ -26,7 +27,9 @@ class EnergySystemsExportFactory: :param sim_type: the simulation type, 0 for series 1 for parallel :param data_type: indicates whether cooling or heating data is used :param base_path: the data directory of energy systems + :param demand_path: path to hourly energy dempand file """ + self._city = city if base_path is None: base_path = Path(Path(__file__).parent.parent / 'data/energy_systems') @@ -36,6 +39,7 @@ class EnergySystemsExportFactory: self._data_type = data_type self._output_path = output_path self._sim_type = sim_type + self._demand_path = demand_path def _export_heat_pump(self, source): """ @@ -44,10 +48,10 @@ class EnergySystemsExportFactory: :return: None """ if source == 'air': - AirSourceHPExport(self._base_path, self._city, self._output_path, self._sim_type)\ + AirSourceHPExport(self._base_path, self._city, self._output_path, self._sim_type, self._demand_path)\ .execute_insel(self._user_input, self._hp_model, self._data_type) elif source == 'water': - WaterToWaterHPExport(self._base_path, self._city, self._output_path, self._sim_type)\ + WaterToWaterHPExport(self._base_path, self._city, self._output_path, self._sim_type, self._demand_path)\ .execute_insel(self._user_input, self._hp_model) def export(self, source='air'):