forked from s_ranjbar/city_retrofit
Made energy demand file a parameter for insel simulation
This commit is contained in:
parent
caa6e9e1d3
commit
0091c1f40c
|
@ -16,7 +16,8 @@ class EnergySystemsExportFactory:
|
||||||
Exports factory class for energy systems
|
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
|
:param city: the city object
|
||||||
|
@ -26,7 +27,9 @@ class EnergySystemsExportFactory:
|
||||||
:param sim_type: the simulation type, 0 for series 1 for parallel
|
:param sim_type: the simulation type, 0 for series 1 for parallel
|
||||||
:param data_type: indicates whether cooling or heating data is used
|
:param data_type: indicates whether cooling or heating data is used
|
||||||
:param base_path: the data directory of energy systems
|
:param base_path: the data directory of energy systems
|
||||||
|
:param demand_path: path to hourly energy dempand file
|
||||||
"""
|
"""
|
||||||
|
|
||||||
self._city = city
|
self._city = city
|
||||||
if base_path is None:
|
if base_path is None:
|
||||||
base_path = Path(Path(__file__).parent.parent / 'data/energy_systems')
|
base_path = Path(Path(__file__).parent.parent / 'data/energy_systems')
|
||||||
|
@ -36,6 +39,7 @@ class EnergySystemsExportFactory:
|
||||||
self._data_type = data_type
|
self._data_type = data_type
|
||||||
self._output_path = output_path
|
self._output_path = output_path
|
||||||
self._sim_type = sim_type
|
self._sim_type = sim_type
|
||||||
|
self._demand_path = demand_path
|
||||||
|
|
||||||
def _export_heat_pump(self, source):
|
def _export_heat_pump(self, source):
|
||||||
"""
|
"""
|
||||||
|
@ -44,10 +48,10 @@ class EnergySystemsExportFactory:
|
||||||
:return: None
|
:return: None
|
||||||
"""
|
"""
|
||||||
if source == 'air':
|
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)
|
.execute_insel(self._user_input, self._hp_model, self._data_type)
|
||||||
elif source == 'water':
|
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)
|
.execute_insel(self._user_input, self._hp_model)
|
||||||
|
|
||||||
def export(self, source='air'):
|
def export(self, source='air'):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user