From 246fcc4eb16dd896582b1cdb05ed9e1b83411aea Mon Sep 17 00:00:00 2001 From: Nicholas Long <1907354+nllong@users.noreply.github.com> Date: Fri, 17 Nov 2023 14:07:36 -0700 Subject: [PATCH] allow user to specify name of modelica.mos file to load in System Parameter generator (#599) --- .../system_parameters/system_parameters.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/geojson_modelica_translator/system_parameters/system_parameters.py b/geojson_modelica_translator/system_parameters/system_parameters.py index 5e01ada83..f3a95abe4 100644 --- a/geojson_modelica_translator/system_parameters/system_parameters.py +++ b/geojson_modelica_translator/system_parameters/system_parameters.py @@ -712,6 +712,7 @@ def csv_to_sys_param(self, :kwargs (optional): - relative_path: Path, set the paths (time series files, weather file, etc) relate to `relative_path` - skip_weather_download: Boolean, set to True to not download the weather file, defaults to False + - modelica_load_filename: str, name (only) of the file to load as the modelica load file, defaults to "modelica.mos" :return None, file created and saved to user-specified location @@ -719,6 +720,7 @@ def csv_to_sys_param(self, self.sys_param_filename = sys_param_filename self.rel_path = kwargs.get('relative_path', None) skip_weather_download = kwargs.get('skip_weather_download', False) + modelica_load_filename = kwargs.get('modelica_load_filename', 'modelica.mos') if model_type == 'time_series': # TODO: delineate between time_series and time_series_massflow_rate @@ -754,7 +756,7 @@ def csv_to_sys_param(self, if str(item).endswith('_export_time_series_modelica'): measure_list.append(Path(item) / "building_loads.csv") # used for mfrt elif str(item).endswith('_export_modelica_loads'): - measure_list.append(Path(item) / "modelica.mos") # space heating/cooling & water heating + measure_list.append(Path(item) / modelica_load_filename) # space heating/cooling & water heating measure_list.append(Path(item) / "building_loads.csv") # used for max electricity load # Get each building feature id from the SDK FeatureFile