diff --git a/ebcpy/__init__.py b/ebcpy/__init__.py index ef186642..a0a0e921 100644 --- a/ebcpy/__init__.py +++ b/ebcpy/__init__.py @@ -3,6 +3,6 @@ """ # Pull the useful classes to the top Level from .data_types import TimeSeriesData, TimeSeries -from .simulationapi.simulation_api_new import FMU_Discrete # todo: adjust +from .simulationapi.simulation_api_new import FMU_Discrete, FMU_API, DymolaAPI # todo: adjust __version__ = '0.3.1' diff --git a/ebcpy/simulationapi/simulation_api_new.py b/ebcpy/simulationapi/simulation_api_new.py index 48ddf6e4..3fe53503 100644 --- a/ebcpy/simulationapi/simulation_api_new.py +++ b/ebcpy/simulationapi/simulation_api_new.py @@ -20,7 +20,11 @@ import sys from ebcpy.modelica import manipulate_ds from ebcpy.utils.conversion import convert_tsd_to_modelica_txt +import time # for timing code only +# TODO: +# - add function: print supported exp setup options (like sim setup) +# - add check for variable names whenever var_names are passed (using "check_unsupported_vars") # todo: # bug: single unzip dir not deleted in continuous simulation # - easy: add simple side functions cd setter etc. @@ -320,11 +324,11 @@ def __init__(self, model_name): # initialize sim setup with specific class defaults. self._sim_setup = self._sim_setup_class() # todo: why _ notation here? # update sim setup with config entries if given - if hasattr(self.config, 'sim_setup'): + if self.config.sim_setup is not None: self.set_sim_setup(self.config.sim_setup) # current directory if not hasattr(self, 'cd'): # in case of FMU, cd is set already by now # todo: not nice - if hasattr(self.config, 'cd'): + if self.config.cd is not None: self.cd = self.config.cd else: self.cd = pathlib.Path(__file__).parent.joinpath("results") @@ -336,7 +340,6 @@ def __init__(self, model_name): self.outputs: Dict[str, Variable] = {} # Outputs of model self.parameters: Dict[str, Variable] = {} # Parameter of model self.states: Dict[str, Variable] = {} # States of model - self.worker_idx = None # todo: evaluate if needed here # results self.result_names = [] # initialize list of tracked variables self.model_name = model_name # todo: discuss setting model name triggers further functions @@ -405,10 +408,12 @@ def model_name(self, model_name): """ self._model_name = model_name # Empty all variables again. - if self.worker_idx: - return + if self.use_mp: # todo: review this condition? It would be better to get rid off worker_idx at level of Model-class + if self.worker_idx: # todo: what is this actually for??? + return self._update_model_variables() + def _update_model_variables(self): """ Function to empty all variables and update them again @@ -500,23 +505,23 @@ def close(self): class FMU: _exp_config_class: ExperimentConfigurationClass = ExperimentConfigurationFMU - # _fmu_instances: dict = {} # Dict of FMU instances # fixme: mp in continuous requires class attribute.. - # _unzip_dirs: dict = {} # Dict of directories for fmu extraction # fixme: mp in continuous requires class attribute.. + _fmu_instance = None + _unzip_dir: str = None def __init__(self, log_fmu: bool = True): + self._unzip_dir = None + self._fmu_instance = None path = self.config.file_path if isinstance(self.config.file_path, pathlib.Path): path = str(self.config.file_path) if not path.lower().endswith(".fmu"): raise ValueError(f"{self.config.file_path} is not a valid fmu file!") self.path = path - if hasattr(self.config, 'cd'): + if hasattr(self.config, 'cd') and self.config.cd is not None: self.cd = self.config.cd else: - self.cd = os.path.dirname(fmu_path) + self.cd = os.path.dirname(path) self.log_fmu = log_fmu # todo consider moving to config - self._fmu_instances: dict = {} # Dict of FMU instances # fixme: mp in continuous requires class attribute.. - self._unzip_dirs: dict = {} # Dict of directories for fmu extraction # fixme: mp in continuous requires class attribute.. self._var_refs: dict = None # Dict of variables and their references self._model_description = None self._fmi_type = None @@ -548,7 +553,7 @@ def find_vars(self, start_str: str): key_list.append(key[i]) return key_list - def _set_variables(self, var_dict: dict, idx_worker: int = 0): # todo: idx_worker not nice + def _set_variables(self, var_dict: dict): """ Sets multiple variables. var_dict is a dict with variable names in keys. @@ -559,15 +564,15 @@ def _set_variables(self, var_dict: dict, idx_worker: int = 0): # todo: idx_work vr = [var.valueReference] if var.type == 'Real': - self._fmu_instances[idx_worker].setReal(vr, [float(value)]) + self._fmu_instance.setReal(vr, [float(value)]) elif var.type in ['Integer', 'Enumeration']: - self._fmu_instances[idx_worker].setInteger(vr, [int(value)]) + self._fmu_instance.setInteger(vr, [int(value)]) elif var.type == 'Boolean': - self._fmu_instances[idx_worker].setBoolean(vr, [value == 1.0 or value or value == "True"]) + self._fmu_instance.setBoolean(vr, [value == 1.0 or value or value == "True"]) else: raise Exception("Unsupported type: %s" % var.type) - def _read_variables(self, vrs_list: list, idx_worker: int = 0): # todo: idx_worker not nice + def _read_variables(self, vrs_list: list): # """ Reads multiple variable values of FMU. vrs_list as list of strings @@ -582,11 +587,11 @@ def _read_variables(self, vrs_list: list, idx_worker: int = 0): # todo: idx_wor vr = [var.valueReference] if var.type == 'Real': - res[name] = self._fmu_instances[idx_worker].getReal(vr)[0] + res[name] = self._fmu_instance.getReal(vr)[0] elif var.type in ['Integer', 'Enumeration']: - res[name] = self._fmu_instances[idx_worker].getInteger(vr)[0] + res[name] = self._fmu_instance.getInteger(vr)[0] elif var.type == 'Boolean': - value = self._fmu_instances[idx_worker].getBoolean(vr)[0] + value = self._fmu_instance.getBoolean(vr)[0] res[name] = value != 0 else: raise Exception("Unsupported type: %s" % var.type) @@ -609,7 +614,7 @@ def setup_fmu_instance(self): os.path.basename(self.model_name)[:-4] + "_extracted") os.makedirs(self._single_unzip_dir, exist_ok=True) self._single_unzip_dir = fmpy.extract(self.model_name, - unzipdir=self._single_unzip_dir) + unzipdir=self._single_unzip_dir) self._model_description = read_model_description(self._single_unzip_dir, validate=True) @@ -674,30 +679,33 @@ def _to_bound(value): self._setup_single_fmu_instance(use_mp=False) def _setup_single_fmu_instance(self, use_mp): - if not use_mp: - wrk_idx = 0 - else: + if use_mp: wrk_idx = self.worker_idx - if wrk_idx in self._fmu_instances: + if self._fmu_instance is not None: return True - if use_mp: unzip_dir = self._single_unzip_dir + f"_worker_{wrk_idx}" - unzip_dir = fmpy.extract(self.model_name, - unzipdir=unzip_dir) + fmpy.extract(self.model_name, + unzipdir=unzip_dir) else: + wrk_idx = 0 unzip_dir = self._single_unzip_dir + self.logger.info("Instantiating fmu for worker %s", wrk_idx) - self._fmu_instances.update({wrk_idx: fmpy.instantiate_fmu( + fmu_instance = fmpy.instantiate_fmu( unzipdir=unzip_dir, model_description=self._model_description, fmi_type=self._fmi_type, visible=False, debug_logging=False, logger=self._custom_logger, - fmi_call_logger=None)}) - self._unzip_dirs.update({ - wrk_idx: unzip_dir - }) + fmi_call_logger=None) + if use_mp: + FMU._fmu_instance = fmu_instance + FMU._unzip_dir = unzip_dir + else: + self._fmu_instance = fmu_instance + self._unzip_dir = unzip_dir + return True def _single_close(self, **kwargs): @@ -732,7 +740,6 @@ def __init__(self, config, log_fmu: bool = True): FMU_Discrete.objs.append(self) self.use_mp = False # no mp for stepwise FMU simulation self.config = self._exp_config_class.parse_obj(config) - # self.worker_idx = None # todo: evaluate where to place get rid off as this is property FMU.__init__(self, log_fmu) Model.__init__(self, model_name=self.config.file_path) # todo: in case of fmu: file path, in case of dym: model_name, find better way to deal with; consider getting rid of model_name. For now it is to make the old methods work # used for stepwise simulation @@ -796,13 +803,11 @@ def initialize_discrete_sim(self, # - Create FMU2 Slave # - instantiate fmu instance - idx_worker = 0 # no mp for discrete simulation - # Reset FMU instance - self._fmu_instances[idx_worker].reset() + self._fmu_instance.reset() # Set up experiment - self._fmu_instances[idx_worker].setupExperiment(startTime=self.sim_setup.start_time, + self._fmu_instance.setupExperiment(startTime=self.sim_setup.start_time, stopTime=self.sim_setup.stop_time, tolerance=self.sim_setup.tolerance) @@ -819,11 +824,11 @@ def initialize_discrete_sim(self, start_values.update(parameters) # write parameters and initial values to FMU - self._set_variables(var_dict=start_values, idx_worker=idx_worker) + self._set_variables(var_dict=start_values) # Finalise initialisation - self._fmu_instances[idx_worker].enterInitializationMode() - self._fmu_instances[idx_worker].exitInitializationMode() + self._fmu_instance.enterInitializationMode() + self._fmu_instance.exitInitializationMode() # Initialize dataframe to store results # empty @@ -843,7 +848,7 @@ def initialize_discrete_sim(self, # reset step count self.step_count = 0 - def _do_step(self, ret_res: bool = False, idx_worker: int = 0): + def _do_step(self): """ perform simulation step; return True if stop time reached. The results are appended to the sim_res results frame, just after the step -> ground truth @@ -855,33 +860,21 @@ def _do_step(self, ret_res: bool = False, idx_worker: int = 0): if self.step_count == 0: self.logger.info('Starting simulation of FMU "{}"'.format(self._model_description.modelName)) # do simulation step - status = self._fmu_instances[idx_worker].doStep( + status = self._fmu_instance.doStep( currentCommunicationPoint=self.current_time, communicationStepSize=self.sim_setup.comm_step_size) # step count - self.step_count+=1 + self.step_count += 1 # update current time and determine status self.current_time += self.sim_setup.comm_step_size self.finished = False else: self.finished = True self.logger.info('Simulation of FMU "{}" finished'.format(self._model_description.modelName)) - # read results - res = self._read_variables( - vrs_list=self.result_names) - if not self.finished: - # append - if self.current_time % self.sim_setup.output_interval == 0: # todo: output_step > comm_step -> the last n results of results attribute can no be used for mpc!!! consider downsampling in get_results or second results attribute that keeps the last n values? On the other hand, if user needs mpc with css step, he can set output_step =css - self.sim_res = pd.concat( - [self.sim_res, pd.DataFrame.from_records([res], # because frame.append will be depreciated - index=[res['SimTime']], - columns=self.sim_res.columns)]) - if ret_res: - return self.finished, res - else: - return self.finished - def do_step_wrapper(self, input_step: dict = None): # todo: consider automatic close in here again. after results are read there is no need for the fmu to stay + return self.finished + + def inp_step_read(self, input_step: dict = None): # todo: consider automatic close in here again. after results are read there is no need for the fmu to stay # collect inputs # get input from input table (overwrite with specific input for single step) single_input = {} @@ -889,7 +882,7 @@ def do_step_wrapper(self, input_step: dict = None): # todo: consider automatic # extract value from input time table # only consider columns in input table that refer to inputs of the FMU input_matches = list(set(self.inputs.keys()).intersection(set(self.input_table.columns))) - input_table_filt = self.input_table[input_matches] # todo: consider moving to setter for efficiency, if so, inputs must be identified before + input_table_filt = self.input_table[input_matches] # todo: consider moving filter to setter for efficiency, if so, inputs must be identified before single_input = interp_df(t=self.current_time, df=input_table_filt, interpolate=self.interp_input_table) if input_step is not None: @@ -901,24 +894,35 @@ def do_step_wrapper(self, input_step: dict = None): # todo: consider automatic self._set_variables(var_dict=single_input) # perform simulation step - res_step = self._do_step(ret_res=True)[1] + self._do_step() - return res_step + # read results + res = self._read_variables( + vrs_list=self.result_names) + if not self.finished: + # append + if self.current_time % self.sim_setup.output_interval == 0: # todo: output_step > comm_step -> the last n results of results attribute can no be used for mpc!!! consider downsampling in get_results or second results attribute that keeps the last n values? On the other hand, if user needs mpc with css step, he can set output_step =css + self.sim_res = pd.concat( + [self.sim_res, pd.DataFrame.from_records([res], # because frame.append will be depreciated + index=[res['SimTime']], + columns=self.sim_res.columns)]) + return res def _set_result_names(self): """ - In discrete simulation the inputs are typically relevant too. + Adds input names to list result_names in addition to outputs. + In discrete simulation the inputs are typically relevant. """ self.result_names = list(self.outputs.keys()) + list(self.inputs.keys()) def close(self): # No MP for discrete simulation - if not self._fmu_instances: + if not self._fmu_instance: return # Already closed - self._single_close(fmu_instance=self._fmu_instances[0], - unzip_dir=self._unzip_dirs[0]) - self._unzip_dirs = {} - self._fmu_instances = {} + self._single_close(fmu_instance=self._fmu_instance, + unzip_dir=self._unzip_dir) + self._unzip_dir = None + self._fmu_instance = None class ContinuousSimulation(Model): @@ -1124,7 +1128,8 @@ def _single_simulation(self, kwargs): class FMU_API(FMU, ContinuousSimulation): _sim_setup_class: SimulationSetupClass = SimulationSetupFMU_Continuous - _items_to_drop = ["pool", "fmu_instance", "unzip_dir"] + # _items_to_drop = ["pool"] + _items_to_drop = ["pool", "_fmu_instance", "_unzip_dir"] _type_map = { float: np.double, bool: np.bool_, @@ -1171,14 +1176,8 @@ def _single_simulation(self, kwargs): # todo: warum nicht ** kwargs und warum p fail_on_error = kwargs.get("fail_on_error", True) if self.use_mp: - idx_worker = self.worker_idx - if idx_worker not in self._fmu_instances: + if self._fmu_instance is None: self._setup_single_fmu_instance(use_mp=True) - else: - idx_worker = 0 - - fmu_instance = self._fmu_instances[idx_worker] - unzip_dir = self._unzip_dirs[idx_worker] if inputs is not None: if not isinstance(inputs, (TimeSeriesData, pd.DataFrame)): @@ -1208,10 +1207,10 @@ def _single_simulation(self, kwargs): # todo: warum nicht ** kwargs und warum p type_of_var="parameters") try: # reset the FMU instance instead of creating a new one - fmu_instance.reset() + self._fmu_instance.reset() # Simulate res = fmpy.simulate_fmu( - filename=unzip_dir, + filename=self._unzip_dir, start_time=self.sim_setup.start_time, stop_time=self.sim_setup.stop_time, solver=self.sim_setup.solver, @@ -1226,7 +1225,7 @@ def _single_simulation(self, kwargs): # todo: warum nicht ** kwargs und warum p timeout=self.sim_setup.timeout, step_finished=None, model_description=self._model_description, - fmu_instance=fmu_instance, + fmu_instance=self._fmu_instance, fmi_type=self._fmi_type, ) @@ -1275,23 +1274,25 @@ def close(self): ContinuousSimulation.close(self) # Close if single process if not self.use_mp: - if not self._fmu_instances: + if not self._fmu_instance: return # Already closed - self._single_close(fmu_instance=self._fmu_instances[0], - unzip_dir=self._unzip_dirs[0]) - self._unzip_dirs = {} - self._fmu_instances = {} + self._single_close(fmu_instance=self._fmu_instance, + unzip_dir=self._unzip_dir) + self._unzip_dir = None + self._fmu_instance = None def _close_multiprocessing(self, _): """Small helper function""" idx_worker = self.worker_idx - if idx_worker not in self._fmu_instances: + if self._fmu_instance is None: return # Already closed self.logger.error(f"Closing fmu for worker {idx_worker}") - self._single_close(fmu_instance=self._fmu_instances[idx_worker], - unzip_dir=self._unzip_dirs[idx_worker]) - self._unzip_dirs = {} - self._fmu_instances = {} + self._single_close(fmu_instance=self._fmu_instance, + unzip_dir=self._unzip_dir) + self._unzip_dir = None + self._fmu_instance = None + FMU_API._unzip_dir = None + FMU_API._fmu_instance = None class DymolaAPI(ContinuousSimulation): @@ -1373,24 +1374,28 @@ class DymolaAPI(ContinuousSimulation): _exp_config_class: ExperimentConfigurationClass = ExperimentConfigurationDymola _sim_setup_class: SimulationSetupClass = SimulationSetupDymola - _dymola_instances: dict = {} _items_to_drop = ["pool", "dymola", "_dummy_dymola_instance"] + dymola = None # Default simulation setup - _supported_kwargs = ["show_window", - "modify_structural_parameters", - "dymola_path", - "equidistant_output", - "n_restart", - "debug", - "mos_script_pre", - "mos_script_post", - "dymola_version"] - - def __init__(self, config, n_cpu, packages=None, **kwargs): + _supported_kwargs = [ + "show_window", + "modify_structural_parameters", + "dymola_path", + "equidistant_output", + "n_restart", + "debug", + "mos_script_pre", + "mos_script_post", + "dymola_version" + ] + + def __init__(self, config, n_cpu, **kwargs): """Instantiate class objects.""" self.config = self._exp_config_class.parse_obj(config) packages = self.config.packages + self.dymola = None # Avoid key-error in get-state. Instance attribute needs to be there. + # Update kwargs with regard to what kwargs are supported. self.extract_variables = kwargs.pop("extract_variables", True) self.fully_initialized = False @@ -1419,8 +1424,6 @@ def __init__(self, config, n_cpu, packages=None, **kwargs): self.mos_script_pre = self._make_modelica_normpath(self.mos_script_pre) if self.mos_script_post is not None: self.mos_script_post = self._make_modelica_normpath(self.mos_script_post) - # Set empty dymola attribute - self.dymola = None super().__init__(model_name=self.config.model_name, n_cpu=n_cpu) @@ -1593,9 +1596,9 @@ def _single_simulation(self, kwargs): # Handle multiprocessing if self.use_mp: idx_worker = self.worker_idx - if idx_worker not in self._dymola_instances: + if self.dymola is None: self._setup_dymola_interface(use_mp=True) - self.dymola = self._dymola_instances[idx_worker] + # Handle eventlog if show_eventlog: @@ -1937,27 +1940,25 @@ def close(self): super().close() # Always close main instance self._single_close(dymola=self.dymola) - self.dymola = None def _close_multiprocessing(self, _): - wrk_idx = self.worker_idx - if wrk_idx in self._dymola_instances: - self._single_close(dymola=self._dymola_instances.pop(wrk_idx)) + self._single_close() + DymolaAPI.dymola = None def _single_close(self, **kwargs): """Closes a single dymola instance""" - dymola = kwargs["dymola"] - if dymola is None: + if self.dymola is None: return # Already closed prior # Execute the mos-script if given: if self.mos_script_post is not None: self.logger.info("Executing given mos_script_post " "prior to closing.") - dymola.RunScript(self.mos_script_post) - self.logger.info("Output of mos_script_post: %s", dymola.getLastErrorLog()) + self.dymola.RunScript(self.mos_script_post) + self.logger.info("Output of mos_script_post: %s", self.dymola.getLastErrorLog()) self.logger.info('Closing Dymola') - dymola.close() + self.dymola.close() self.logger.info('Successfully closed Dymola') + self.dymola = None def _close_dummy(self): """ @@ -2036,8 +2037,8 @@ def _setup_dymola_interface(self, use_mp): warnings.warn("You have no licence to use Dymola. " "Hence you can only simulate models with 8 or less equations.") if use_mp: - self._dymola_instances[self.worker_idx] = dymola - return True + DymolaAPI.dymola = dymola + return None return dymola def _open_dymola_interface(self): @@ -2273,7 +2274,7 @@ def _check_restart(self): if self.sim_counter == self.n_restart: self.logger.info("Closing and restarting Dymola to free memory") self.close() - self.dymola = self._setup_dymola_interface(use_mp=False) + self._dummy_dymola_instance = self._setup_dymola_interface(use_mp=False) self.sim_counter = 1 else: self.sim_counter += 1 @@ -2283,204 +2284,209 @@ def _check_restart(self): if __name__ == '__main__': """ FMU discrete """ - # ---- Settings --------- - output_step = 60 * 10 # step size of simulation results in seconds (resolution of results data) - comm_step = 60 / 3 # step size of FMU communication in seconds (in this interval, values are set to or read from the fmu) - start = 0 # start time - stop = 86400 * 3 # stop time - t_start = 293.15 - 5 - t_start_amb = 293.15 - 15 - - input_data = pd.read_csv('D:/pst-kbe/tasks/08_ebcpy_restructure/ebcpy/examples/data/ThermalZone_input.csv', index_col='timestamp') - - # store simulation setup as dict - simulation_setup = {"start_time": start, - "stop_time": stop, - "output_interval": output_step, - "comm_step_size": comm_step - } + # # ---- Settings --------- + # output_step = 60 * 10 # step size of simulation results in seconds (resolution of results data) + # comm_step = 60 / 3 # step size of FMU communication in seconds (in this interval, values are set to or read from the fmu) + # start = 0 # start time + # stop = 86400 * 3 # stop time + # t_start = 293.15 - 5 + # t_start_amb = 293.15 - 15 + # + # input_data = pd.read_csv('D:/pst-kbe/tasks/08_ebcpy_restructure/ebcpy/examples/data/ThermalZone_input.csv', index_col='timestamp') + # + # # store simulation setup as dict + # simulation_setup = {"start_time": start, + # "stop_time": stop, + # "output_interval": output_step, + # "comm_step_size": comm_step + # } + # + # config_obj = { + # 'file_path': 'D:/pst-kbe/tasks/08_ebcpy_restructure/ebcpy/examples/data/ThermalZone_bus.fmu', + # 'cd': 'D:/pst-kbe/tasks/08_ebcpy_restructure/ebcpy/examples/results', # fixme: if not exists -> pydantic returns error instead of creating it + # 'sim_setup': simulation_setup, + # 'input_file': 'D:/pst-kbe/tasks/08_ebcpy_restructure/ebcpy/examples/data/ThermalZone_input.csv' + # } + # + # sys = FMU_Discrete(config_obj) + # ctr = PID(Kp=0.01, Ti=300, lim_high=1, reverse_act=False, fixed_dt=comm_step) + # + # sys.initialize_discrete_sim(parameters={'T_start': t_start}, init_values={'bus.disturbance[1]': t_start_amb}) + # + # res_step = sys.sim_res.iloc[-1] + # while not sys.finished: + # # Call controller (for advanced control strategies that require previous results, use the attribute sim_res) + # ctr_action = ctr.run(res_step['bus.processVar'], input_data.loc[sys.current_time][ + # 'bus.setPoint']) + # # Apply control action to system and perform simulation step + # res_step = sys.inp_step_read(input_step={ + # 'bus.controlOutput': ctr_action}) # fixme consider returning the last n values for mpc if n==1 return dict, otherwise list of dicts + # + # sys.close() + # + # # ---- Results --------- + # # return simulation results as pd data frame + # results_study_A = sys.get_results(tsd_format=False) + # + # # format settings + # import matplotlib + # + # # plot settings + # matplotlib.rcParams['mathtext.fontset'] = 'custom' + # matplotlib.rcParams['mathtext.rm'] = 'Bitstream Vera Sans' + # matplotlib.rcParams['mathtext.it'] = 'Bitstream Vera Sans:italic' + # matplotlib.rcParams['mathtext.bf'] = 'Bitstream Vera Sans:bold' + # + # matplotlib.rcParams['mathtext.fontset'] = 'stix' + # matplotlib.rcParams['font.family'] = 'STIXGeneral' + # matplotlib.rcParams['font.size'] = 9 + # matplotlib.rcParams['lines.linewidth'] = 0.75 + # + # cases = [results_study_A] + # time_index_out = np.arange(0, stop + comm_step, output_step) # time index with output interval step + # fig, axes_mat = plt.subplots(nrows=3, ncols=1) + # for i in range(len(cases)): + # axes = axes_mat + # axes[0].plot(time_index_out, cases[i]['bus.processVar'] - 273.15, label='mea', color='b') + # axes[0].plot(input_data.index, input_data['bus.setPoint'] - 273.15, label='set', color='r') # fixme: setpoint not available in results + # axes[1].plot(time_index_out, cases[i]['bus.controlOutput'], label='control output', color='b') + # axes[2].plot(time_index_out, cases[i]['bus.disturbance[1]'] - 273.15, label='dist', color='b') + # + # # x label + # axes[2].set_xlabel('Time / s') + # # title and y label + # if i == 0: + # axes[0].set_title('System FMU - Python controller') + # axes[0].set_ylabel('Zone temperature / °C') + # axes[1].set_ylabel('Rel. heating power / -') + # axes[2].set_ylabel('Ambient temperature / °C') + # if i == 1: + # axes[0].set_title('System FMU - Controller FMU') + # axes[0].legend(loc='upper right') + # # grid + # for ax in axes: + # ax.grid(True, 'both') + # if i > 0: + # # ignore y labels for all but the first + # ax.set_yticklabels([]) + # + # plt.tight_layout() + # plt.show() - config_obj = { - 'file_path': 'D:/pst-kbe/tasks/08_ebcpy_restructure/ebcpy/examples/data/ThermalZone_bus.fmu', - 'cd': 'D:/pst-kbe/tasks/08_ebcpy_restructure/ebcpy/examples/results', # fixme: if not exists -> pydantic returns error instead of creating it - 'sim_setup': simulation_setup, - 'input_file': 'D:/pst-kbe/tasks/08_ebcpy_restructure/ebcpy/examples/data/ThermalZone_input.csv' - } + """ FMU continuous """ + # t0 = time.time() + # n_sim = 200 + # simulation_setup = {"start_time": 0, + # "stop_time": 3600, + # "output_interval": 100} + # config_obj = { + # 'file_path': 'D:/pst-kbe/tasks/08_ebcpy_restructure/ebcpy/examples/data/HeatPumpSystemWithInput.fmu', + # 'cd': 'D:/pst-kbe/tasks/08_ebcpy_restructure/ebcpy/examples/results', # fixme: if not exists -> pydantic returns error instead of creating it + # 'sim_setup': simulation_setup, + # 'input_file': 'D:/pst-kbe/tasks/08_ebcpy_restructure/ebcpy/examples/data/ThermalZone_input.csv' + # } + # + # sys = FMU_API(config_obj, n_cpu=4) + # + # time_index = np.arange( + # sys.sim_setup.start_time, + # sys.sim_setup.stop_time, + # sys.sim_setup.output_interval + # ) + # + # # Apply some sinus function for the outdoor air temperature + # t_dry_bulb = np.sin(time_index / 3600 * np.pi) * 10 + 263.15 + # df_inputs = TimeSeriesData({"TDryBul": t_dry_bulb}, index=time_index) + # + # hea_cap_c = sys.parameters['heaCap.C'].value + # # Let's alter it from 10% to 1000 % in n_sim simulations: + # sizings = np.linspace(0.1, 10, n_sim) + # parameters = [] + # for sizing in sizings: + # parameters.append({"heaCap.C": hea_cap_c * sizing}) + # + # sys.result_names = ["heaCap.T", "TDryBul"] + # + # results = sys.simulate(parameters=parameters, + # inputs=df_inputs) + # + # print('time', time.time()-t0) + # + # # Plot the result + # fig, ax = plt.subplots(2, sharex=True) + # ax[0].set_ylabel("TDryBul in K") + # ax[1].set_ylabel("T_Cap in K") + # ax[1].set_xlabel("Time in s") + # ax[0].plot(df_inputs, label="Inputs", linestyle="--") + # for res, sizing in zip(results, sizings): + # ax[0].plot(res['TDryBul']) + # ax[1].plot(res['heaCap.T'], label=sizing) + # for _ax in ax: + # _ax.legend(bbox_to_anchor=(1, 1.05), loc="upper left") + # + # plt.show() - sys = FMU_Discrete(config_obj) - ctr = PID(Kp=0.01, Ti=300, lim_high=1, reverse_act=False, fixed_dt=comm_step) - - sys.initialize_discrete_sim(parameters={'T_start': t_start}, init_values={'bus.disturbance[1]': t_start_amb}) - - res_step = sys.sim_res.iloc[-1] - while not sys.finished: - # Call controller (for advanced control strategies that require previous results, use the attribute sim_res) - ctr_action = ctr.run(res_step['bus.processVar'], input_data.loc[sys.current_time][ - 'bus.setPoint']) - # Apply control action to system and perform simulation step - res_step = sys.do_step_wrapper(input_step={ - 'bus.controlOutput': ctr_action}) # fixme consider returning the last n values for mpc if n==1 return dict, otherwise list of dicts - - sys.close() - - # ---- Results --------- - # return simulation results as pd data frame - results_study_A = sys.get_results(tsd_format=False) - - # format settings - import matplotlib - - # plot settings - matplotlib.rcParams['mathtext.fontset'] = 'custom' - matplotlib.rcParams['mathtext.rm'] = 'Bitstream Vera Sans' - matplotlib.rcParams['mathtext.it'] = 'Bitstream Vera Sans:italic' - matplotlib.rcParams['mathtext.bf'] = 'Bitstream Vera Sans:bold' - - matplotlib.rcParams['mathtext.fontset'] = 'stix' - matplotlib.rcParams['font.family'] = 'STIXGeneral' - matplotlib.rcParams['font.size'] = 9 - matplotlib.rcParams['lines.linewidth'] = 0.75 - - cases = [results_study_A] - time_index_out = np.arange(0, stop + comm_step, output_step) # time index with output interval step - fig, axes_mat = plt.subplots(nrows=3, ncols=1) - for i in range(len(cases)): - axes = axes_mat - axes[0].plot(time_index_out, cases[i]['bus.processVar'] - 273.15, label='mea', color='b') - axes[0].plot(input_data.index, input_data['bus.setPoint'] - 273.15, label='set', color='r') # fixme: setpoint not available in results - axes[1].plot(time_index_out, cases[i]['bus.controlOutput'], label='control output', color='b') - axes[2].plot(time_index_out, cases[i]['bus.disturbance[1]'] - 273.15, label='dist', color='b') - - # x label - axes[2].set_xlabel('Time / s') - # title and y label - if i == 0: - axes[0].set_title('System FMU - Python controller') - axes[0].set_ylabel('Zone temperature / °C') - axes[1].set_ylabel('Rel. heating power / -') - axes[2].set_ylabel('Ambient temperature / °C') - if i == 1: - axes[0].set_title('System FMU - Controller FMU') - axes[0].legend(loc='upper right') - # grid - for ax in axes: - ax.grid(True, 'both') - if i > 0: - # ignore y labels for all but the first - ax.set_yticklabels([]) - - plt.tight_layout() - plt.show() - """ FMU continuous """ - n_sim = 2 + + """ Dymola """ + aixlib_mo = 'D:/02_workshop/AixLib/AixLib/package.mo' simulation_setup = {"start_time": 0, "stop_time": 3600, "output_interval": 100} config_obj = { - 'file_path': 'D:/pst-kbe/tasks/08_ebcpy_restructure/ebcpy/examples/data/HeatPumpSystemWithInput.fmu', - 'cd': 'D:/pst-kbe/tasks/08_ebcpy_restructure/ebcpy/examples/results', # fixme: if not exists -> pydantic returns error instead of creating it + 'model_name': 'AixLib.Systems.HeatPumpSystems.Examples.HeatPumpSystem', + 'cd': 'D:/pst-kbe/tasks/08_ebcpy_restructure/ebcpy/examples/results', 'sim_setup': simulation_setup, - 'input_file': 'D:/pst-kbe/tasks/08_ebcpy_restructure/ebcpy/examples/data/ThermalZone_input.csv' + 'packages': [aixlib_mo] } - sys = FMU_API(config_obj, n_cpu=2) + # ######################### Simulation API Instantiation ########################## + # %% Setup the Dymola-API: + sys = DymolaAPI( + config_obj, + n_cpu=1, + show_window=True, + n_restart=-1, + equidistant_output=False, + get_structural_parameters=True + # Only necessary if you need a specific dymola version + #dymola_path=None, + #dymola_version=None + ) + p_el_name = "heatPumpSystem.heatPump.sigBus.PelMea" + sys.result_names = [p_el_name, 'timTab.y[1]'] + table_name = "myCustomInput" + file_name = pathlib.Path(aixlib_mo).parent.joinpath("Resources", "my_custom_input.txt") time_index = np.arange( sys.sim_setup.start_time, sys.sim_setup.stop_time, sys.sim_setup.output_interval ) - # Apply some sinus function for the outdoor air temperature - t_dry_bulb = np.sin(time_index / 3600 * np.pi) * 10 + 263.15 - df_inputs = TimeSeriesData({"TDryBul": t_dry_bulb}, index=time_index) - - hea_cap_c = sys.parameters['heaCap.C'].value - # Let's alter it from 10% to 1000 % in n_sim simulations: - sizings = np.linspace(0.1, 10, n_sim) - parameters = [] - for sizing in sizings: - parameters.append({"heaCap.C": hea_cap_c * sizing}) - - sys.result_names = ["heaCap.T", "TDryBul"] - - results = sys.simulate(parameters=parameters, - inputs=df_inputs) - - # Plot the result - fig, ax = plt.subplots(2, sharex=True) - ax[0].set_ylabel("TDryBul in K") - ax[1].set_ylabel("T_Cap in K") - ax[1].set_xlabel("Time in s") - ax[0].plot(df_inputs, label="Inputs", linestyle="--") - for res, sizing in zip(results, sizings): - ax[0].plot(res['TDryBul']) - ax[1].plot(res['heaCap.T'], label=sizing) - for _ax in ax: - _ax.legend(bbox_to_anchor=(1, 1.05), loc="upper left") - - plt.show() + internal_gains = np.sin(time_index/3600*np.pi) * 1000 + tsd_input = TimeSeriesData({"InternalGains": internal_gains}, index=time_index) + # To generate the input in the correct format, use the convert_tsd_to_modelica_txt function: + filepath = convert_tsd_to_modelica_txt( + tsd=tsd_input, + table_name=table_name, + save_path_file=file_name + ) - """ Dymola """ - # aixlib_mo = 'D:/02_workshop/AixLib/AixLib/package.mo' - # simulation_setup = {"start_time": 0, - # "stop_time": 3600, - # "output_interval": 100} - # config_obj = { - # 'model_name': 'AixLib.Systems.HeatPumpSystems.Examples.HeatPumpSystem', - # 'cd': 'D:/pst-kbe/tasks/08_ebcpy_restructure/ebcpy/examples/results', - # 'sim_setup': simulation_setup, - # 'packages': [aixlib_mo] - # } - # - # # ######################### Simulation API Instantiation ########################## - # # %% Setup the Dymola-API: - # sys = Dymola( - # config_obj, - # n_cpu=1, - # show_window=True, - # n_restart=-1, - # equidistant_output=False, - # get_structural_parameters=True - # # Only necessary if you need a specific dymola version - # #dymola_path=None, - # #dymola_version=None - # ) - # - # p_el_name = "heatPumpSystem.heatPump.sigBus.PelMea" - # sys.result_names = [p_el_name, 'timTab.y[1]'] - # table_name = "myCustomInput" - # file_name = pathlib.Path(aixlib_mo).parent.joinpath("Resources", "my_custom_input.txt") - # time_index = np.arange( - # sys.sim_setup.start_time, - # sys.sim_setup.stop_time, - # sys.sim_setup.output_interval - # ) - # # Apply some sinus function for the outdoor air temperature - # internal_gains = np.sin(time_index/3600*np.pi) * 1000 - # tsd_input = TimeSeriesData({"InternalGains": internal_gains}, index=time_index) - # # To generate the input in the correct format, use the convert_tsd_to_modelica_txt function: - # filepath = convert_tsd_to_modelica_txt( - # tsd=tsd_input, - # table_name=table_name, - # save_path_file=file_name - # ) - # - # result_time_series = sys.simulate( - # return_option="time_series", - # # Info: You would not need these following keyword-arguments, - # # as we've already created our file above. - # # However, you can also pass the arguments - # # from above directly into the function call: - # inputs=tsd_input, - # table_name=table_name, - # file_name=file_name - # ) - # print(type(result_time_series)) - # print(result_time_series) - # result_last_point = sys.simulate( - # return_option="last_point" - # ) - # print(type(result_last_point)) - # print(result_last_point) + result_time_series = sys.simulate( + return_option="time_series", + # Info: You would not need these following keyword-arguments, + # as we've already created our file above. + # However, you can also pass the arguments + # from above directly into the function call: + inputs=tsd_input, + table_name=table_name, + file_name=file_name + ) + print(type(result_time_series)) + print(result_time_series) + result_last_point = sys.simulate( + return_option="last_point" + ) + print(type(result_last_point)) + print(result_last_point) diff --git a/examples/e2_fmu_example.py b/examples/e2_fmu_example.py index cca031b6..889e977e 100644 --- a/examples/e2_fmu_example.py +++ b/examples/e2_fmu_example.py @@ -48,8 +48,12 @@ def main( # ######################### Simulation API Instantiation ########################## # %% Setup the FMU-API: model_name = pathlib.Path(__file__).parent.joinpath("data", "HeatPumpSystemWithInput.fmu") - fmu_api = FMU_API(model_name=model_name, - cd=cd, + # Organize settings in configuration dict + config_dict = { + 'file_path': model_name, + 'cd': cd, + } + fmu_api = FMU_API(config_dict, n_cpu=n_cpu, log_fmu=log_fmu) print("Number of variables:", len(fmu_api.variables)) @@ -149,6 +153,6 @@ def main( main( n_cpu=2, log_fmu=False, - n_sim=2, + n_sim=50, output_interval=100 ) diff --git a/examples/e2a_fmu_discrete.py b/examples/e2a_fmu_discrete.py index 1bed8782..61adf98d 100644 --- a/examples/e2a_fmu_discrete.py +++ b/examples/e2a_fmu_discrete.py @@ -84,6 +84,7 @@ def run(self, x_act, x_set): return self.y +# plotting format settings def plotting_fmt(): """ Adjusts the plotting format @@ -202,10 +203,10 @@ def plotting_fmt(): # The do_step function returns True, when stop time is reached and thus breaks the loop while not system.finished: # Call controller - # (for advanced control strategies that require previous results, use the attribute sim_res) # todo: find soultion with output_step # fixme consider returning the last n values for mpc if n==1 return dict, otherwise list of dicts + # (for advanced control strategies that require previous results, use the attribute sim_res and adjust output_interval) ctr_action = ctr.run(res_step['bus.processVar'], input_df.loc[system.current_time]['bus.setPoint']) # Apply control action to system and perform simulation step - res_step = system.do_step_wrapper(input_step={'bus.controlOutput': ctr_action}) + res_step = system.inp_step_read(input_step={'bus.controlOutput': ctr_action}) # ################# Read Simulation Results ################################################### # simulation results stored in the attribute 'sim_res' can be returned calling 'get_results()' @@ -234,11 +235,10 @@ def plotting_fmt(): print('Study B: System FMU with Controller FMU') while not system.finished: # Call controller and extract control output - # (for advanced control strategies that require previous results, use the attribute sim_res) - ctr_action = controller.do_step_wrapper( - input_step={'bus.processVar': res_step['bus.processVar']})['bus.controlOutput'] # fixme: controller schreibt auch results dataframe -> eigentlich unnötig -> Klassenframe?? + # (for advanced control strategies that require previous results, use the attribute sim_res and adjust output_interval) + ctr_action = controller.inp_step_read(input_step={'bus.processVar': res_step['bus.processVar']})['bus.controlOutput'] # fixme: controller schreibt auch results dataframe -> eigentlich unnötig -> Klassenframe?? # write controller output to system FMU as well as pre-known inputs and perform step - res_step = system.do_step_wrapper(input_step={'bus.controlOutput': ctr_action}) + res_step = system.inp_step_read(input_step={'bus.controlOutput': ctr_action}) # read simulation results results_B = system.get_results() @@ -250,7 +250,6 @@ def plotting_fmt(): FMU_Discrete.close_all() # ###################### Plot Results ######################################### -# todo: apply same range on all plots (copy from first) and get rid of x tick labels # apply plotting format settings plotting_fmt() @@ -260,9 +259,12 @@ def plotting_fmt(): for i in range(len(cases)): axes = axes_mat[:, i] axes[0].plot(time_index_out, cases[i]['bus.processVar'] - 273.15, label='mea', color='b') - axes[0].plot(time_index, setpoint - 273.15, label='set', color='r') # fixme: setpoint not available in results + axes[0].plot(time_index, setpoint - 273.15, label='set', color='r') + axes[0].set_ylim(15,22) axes[1].plot(time_index_out, cases[i]['bus.controlOutput'], label='control output', color='b') + axes[1].set_ylim(-0.05, 0.2) axes[2].plot(time_index_out, cases[i]['bus.disturbance[1]'] - 273.15, label='dist', color='b') + axes[2].set_ylim(0,40) # x label axes[2].set_xlabel('Time / s') @@ -281,8 +283,8 @@ def plotting_fmt(): if i > 0: # ignore y labels for all but the first ax.set_yticklabels([]) -for i in range(2): - axes[i].set_xticklabels([]) + for k in range(2): + axes[k].set_xticklabels([]) plt.tight_layout() plt.show() @@ -301,6 +303,9 @@ def plotting_fmt(): # The FMU_Discrete class includes basic FMU handler utilities previously found in aku's fmu handler skript # They are demonstrated in the following with a heat pump system fmu +# !!! The _do_step() base function does not append the results to the "sim_res" attribute !!! +# !!! The _do_step() base function does not consider long-term input data (attribute "input_table") !!! + # Instantiate Simulation API for fmu hp_fmu = FMU_Discrete({'cd': cd, 'file_path': pathlib.Path(__file__).parent.joinpath("data", "HeatPumpSystemWithInput.fmu"), @@ -326,10 +331,10 @@ def plotting_fmt(): # simulation loop # the ambient temperature is altered during the simulation -# Note that simulating the fmu with altering inputs that are known in advance +# Note that for simulating the fmu with altering inputs that are known in advance # the simulation api for continuous fmu simulation is a better choice. -while not finished: +while not hp_fmu.finished: # read fmu state res = hp_fmu._read_variables(variables) res.update({'SimTime': hp_fmu.current_time}) @@ -340,8 +345,7 @@ def plotting_fmt(): else: hp_fmu._set_variables({'TDryBul': 5+273.15}) # perform simulation step - # Note that calling the basic do_step() function, no input data (attribute "input_table") would be set - finished = hp_fmu._do_step() + hp_fmu._do_step() # close fmu hp_fmu.close() diff --git a/examples/e2a_fmu_do_step_simulation_old.py b/examples/e2a_fmu_do_step_simulation_old.py index e338479a..b3e91720 100644 --- a/examples/e2a_fmu_do_step_simulation_old.py +++ b/examples/e2a_fmu_do_step_simulation_old.py @@ -171,7 +171,8 @@ def run(self, x_act, x_set): # Call controller (for advanced control strategies that require previous results, use the attribute sim_res) ctr_action = ctr.run(res_step['bus.processVar'], input_data.loc[sys.current_time]['bus.setPoint']) # .values[0]) # fixme: only makes sense if # Apply control action to system and perform simulation step - res_step = sys.do_step_wrapper(input_step={'bus.controlOutput': ctr_action}) # # fixme consider returning the last n values for mpc if n==1 return dict, otherwise list of dicts + res_step = sys.inp_step_read(input_step={ + 'bus.controlOutput': ctr_action}) # # fixme consider returning the last n values for mpc if n==1 return dict, otherwise list of dicts # ---- Results --------- # return simulation results as pd data frame @@ -199,9 +200,9 @@ def run(self, x_act, x_set): # ------ Simulation Loop ------- while not sys.finished: # call controller (for advanced control strategies that require previous results, use the attribute sim_res) - ctr_action = ctr.do_step_wrapper(input_step={'bus.processVar': res_step['bus.processVar']})['bus.controlOutput'] # fixme: controller schreibt auch results dataframe -> eigentlich unnötig + ctr_action = ctr.inp_step_read(input_step={'bus.processVar': res_step['bus.processVar']})['bus.controlOutput'] # fixme: controller schreibt auch results dataframe -> eigentlich unnötig # write controller output to system FMU as well as pre-known inputs and perform step - res_step = sys.do_step_wrapper(input_step={'bus.controlOutput': ctr_action}) + res_step = sys.inp_step_read(input_step={'bus.controlOutput': ctr_action}) # sys.close() # ctr.close() diff --git a/examples/e3_dymola_example.py b/examples/e3_dymola_example.py index da3ee912..7af741a8 100644 --- a/examples/e3_dymola_example.py +++ b/examples/e3_dymola_example.py @@ -40,11 +40,15 @@ def main( # ######################### Simulation API Instantiation ########################## # %% Setup the Dymola-API: + # organize settings in configuration dict + config_dict = { + 'model_name': 'AixLib.Systems.HeatPumpSystems.Examples.HeatPumpSystem', + 'cd': cd, + 'packages': [aixlib_mo] + } dym_api = DymolaAPI( - model_name="AixLib.Systems.HeatPumpSystems.Examples.HeatPumpSystem", - cd=cd, + config_dict, n_cpu=n_cpu, - packages=[aixlib_mo], show_window=True, n_restart=-1, equidistant_output=False, @@ -166,5 +170,5 @@ def main( # TODO-User: Change the AixLib path! main( aixlib_mo=r"D:\02_workshop\AixLib\AixLib\package.mo", - n_cpu=1 + n_cpu=2 ) diff --git a/examples/results/FMU_API.log b/examples/results/FMU_API.log deleted file mode 100644 index 162a1821..00000000 --- a/examples/results/FMU_API.log +++ /dev/null @@ -1,4 +0,0 @@ -19.08.2022-13:09:58 INFO FMU_API: -------------------------Initializing class FMU_API------------------------- -19.08.2022-13:09:58 INFO FMU_API: Extracting fmu and reading fmu model description -19.08.2022-13:09:58 INFO FMU_API: Reading model variables -19.08.2022-13:09:58 INFO FMU_API: Extracting fmu 2 times for multiprocessing on 2 processes diff --git a/examples/results/FMU_Discrete.log b/examples/results/FMU_Discrete.log deleted file mode 100644 index 6948fe60..00000000 --- a/examples/results/FMU_Discrete.log +++ /dev/null @@ -1,477 +0,0 @@ -19.08.2022-17:05:51 INFO FMU_Discrete: -------------------------Initializing class FMU_Discrete------------------------- -19.08.2022-17:06:31 INFO FMU_Discrete: -------------------------Initializing class FMU_Discrete------------------------- -19.08.2022-17:06:31 INFO FMU_Discrete: Extracting fmu and reading fmu model description -19.08.2022-17:06:31 INFO FMU_Discrete: Reading model variables -19.08.2022-17:06:31 INFO FMU_Discrete: Instantiating fmu for worker 0 -19.08.2022-17:08:42 INFO FMU_Discrete: -------------------------Initializing class FMU_Discrete------------------------- -19.08.2022-17:08:42 INFO FMU_Discrete: Extracting fmu and reading fmu model description -19.08.2022-17:08:42 INFO FMU_Discrete: Reading model variables -19.08.2022-17:08:43 INFO FMU_Discrete: Instantiating fmu for worker 0 -19.08.2022-17:33:51 INFO FMU_Discrete: -------------------------Initializing class FMU_Discrete------------------------- -19.08.2022-17:33:51 INFO FMU_Discrete: Extracting fmu and reading fmu model description -19.08.2022-17:33:51 INFO FMU_Discrete: Reading model variables -19.08.2022-17:33:51 INFO FMU_Discrete: Instantiating fmu for worker 0 -19.08.2022-17:34:39 INFO FMU_Discrete: -------------------------Initializing class FMU_Discrete------------------------- -19.08.2022-17:34:39 INFO FMU_Discrete: Extracting fmu and reading fmu model description -19.08.2022-17:34:39 INFO FMU_Discrete: Reading model variables -19.08.2022-17:34:39 INFO FMU_Discrete: Instantiating fmu for worker 0 -19.08.2022-17:35:29 INFO FMU_Discrete: -------------------------Initializing class FMU_Discrete------------------------- -19.08.2022-17:35:29 INFO FMU_Discrete: Extracting fmu and reading fmu model description -19.08.2022-17:35:29 INFO FMU_Discrete: Reading model variables -19.08.2022-17:35:29 INFO FMU_Discrete: Instantiating fmu for worker 0 -19.08.2022-17:35:42 INFO FMU_Discrete: -------------------------Initializing class FMU_Discrete------------------------- -19.08.2022-17:35:42 INFO FMU_Discrete: Extracting fmu and reading fmu model description -19.08.2022-17:35:42 INFO FMU_Discrete: Reading model variables -19.08.2022-17:35:42 INFO FMU_Discrete: Instantiating fmu for worker 0 -19.08.2022-17:36:08 INFO FMU_Discrete: -------------------------Initializing class FMU_Discrete------------------------- -19.08.2022-17:36:08 INFO FMU_Discrete: Extracting fmu and reading fmu model description -19.08.2022-17:36:08 INFO FMU_Discrete: Reading model variables -19.08.2022-17:36:08 INFO FMU_Discrete: Instantiating fmu for worker 0 -19.08.2022-17:36:40 INFO FMU_Discrete: -------------------------Initializing class FMU_Discrete------------------------- -19.08.2022-17:36:40 INFO FMU_Discrete: Extracting fmu and reading fmu model description -19.08.2022-17:37:18 INFO FMU_Discrete: -------------------------Initializing class FMU_Discrete------------------------- -19.08.2022-17:37:18 INFO FMU_Discrete: Extracting fmu and reading fmu model description -19.08.2022-17:37:18 INFO FMU_Discrete: Reading model variables -19.08.2022-17:37:18 INFO FMU_Discrete: Instantiating fmu for worker 0 -19.08.2022-17:38:23 INFO FMU_Discrete: -------------------------Initializing class FMU_Discrete------------------------- -19.08.2022-17:38:23 INFO FMU_Discrete: Extracting fmu and reading fmu model description -19.08.2022-17:39:10 INFO FMU_Discrete: -------------------------Initializing class FMU_Discrete------------------------- -19.08.2022-17:39:10 INFO FMU_Discrete: Extracting fmu and reading fmu model description -19.08.2022-17:39:10 INFO FMU_Discrete: Reading model variables -19.08.2022-17:39:10 INFO FMU_Discrete: Instantiating fmu for worker 0 -19.08.2022-17:41:39 INFO FMU_Discrete: -------------------------Initializing class FMU_Discrete------------------------- -19.08.2022-17:41:39 INFO FMU_Discrete: Extracting fmu and reading fmu model description -19.08.2022-17:41:39 INFO FMU_Discrete: Reading model variables -19.08.2022-17:41:39 INFO FMU_Discrete: Instantiating fmu for worker 0 -19.08.2022-17:49:54 INFO FMU_Discrete: -------------------------Initializing class FMU_Discrete------------------------- -19.08.2022-17:49:54 INFO FMU_Discrete: Extracting fmu and reading fmu model description -19.08.2022-17:49:54 INFO FMU_Discrete: Reading model variables -19.08.2022-17:49:54 INFO FMU_Discrete: Instantiating fmu for worker 0 -19.08.2022-17:51:25 INFO FMU_Discrete: -------------------------Initializing class FMU_Discrete------------------------- -19.08.2022-17:51:25 INFO FMU_Discrete: Extracting fmu and reading fmu model description -19.08.2022-17:51:25 INFO FMU_Discrete: Reading model variables -19.08.2022-17:51:26 INFO FMU_Discrete: Instantiating fmu for worker 0 -19.08.2022-17:55:50 INFO FMU_Discrete: -------------------------Initializing class FMU_Discrete------------------------- -19.08.2022-17:55:50 INFO FMU_Discrete: Extracting fmu and reading fmu model description -19.08.2022-17:55:50 INFO FMU_Discrete: Reading model variables -19.08.2022-17:55:50 INFO FMU_Discrete: Instantiating fmu for worker 0 -19.08.2022-17:56:55 INFO FMU_Discrete: -------------------------Initializing class FMU_Discrete------------------------- -19.08.2022-17:56:55 INFO FMU_Discrete: Extracting fmu and reading fmu model description -19.08.2022-17:56:55 INFO FMU_Discrete: Reading model variables -19.08.2022-17:56:55 INFO FMU_Discrete: Instantiating fmu for worker 0 -19.08.2022-18:03:02 INFO FMU_Discrete: -------------------------Initializing class FMU_Discrete------------------------- -19.08.2022-18:03:02 INFO FMU_Discrete: Extracting fmu and reading fmu model description -19.08.2022-18:03:02 INFO FMU_Discrete: Reading model variables -19.08.2022-18:03:02 INFO FMU_Discrete: Instantiating fmu for worker 0 -19.08.2022-18:03:41 INFO FMU_Discrete: -------------------------Initializing class FMU_Discrete------------------------- -19.08.2022-18:03:41 INFO FMU_Discrete: Extracting fmu and reading fmu model description -19.08.2022-18:03:41 INFO FMU_Discrete: Reading model variables -19.08.2022-18:03:41 INFO FMU_Discrete: Instantiating fmu for worker 0 -19.08.2022-18:04:48 INFO FMU_Discrete: -------------------------Initializing class FMU_Discrete------------------------- -19.08.2022-18:04:48 INFO FMU_Discrete: Extracting fmu and reading fmu model description -19.08.2022-18:04:48 INFO FMU_Discrete: Reading model variables -19.08.2022-18:04:48 INFO FMU_Discrete: Instantiating fmu for worker 0 -19.08.2022-18:05:51 INFO FMU_Discrete: -------------------------Initializing class FMU_Discrete------------------------- -19.08.2022-18:05:51 INFO FMU_Discrete: Extracting fmu and reading fmu model description -19.08.2022-18:05:51 INFO FMU_Discrete: Reading model variables -19.08.2022-18:05:51 INFO FMU_Discrete: Instantiating fmu for worker 0 -19.08.2022-18:09:58 INFO FMU_Discrete: -------------------------Initializing class FMU_Discrete------------------------- -19.08.2022-18:09:58 INFO FMU_Discrete: Extracting fmu and reading fmu model description -19.08.2022-18:09:58 INFO FMU_Discrete: Reading model variables -19.08.2022-18:09:58 INFO FMU_Discrete: Instantiating fmu for worker 0 -19.08.2022-18:10:48 INFO FMU_Discrete: -------------------------Initializing class FMU_Discrete------------------------- -19.08.2022-18:10:48 INFO FMU_Discrete: Extracting fmu and reading fmu model description -19.08.2022-18:10:48 INFO FMU_Discrete: Reading model variables -19.08.2022-18:10:48 INFO FMU_Discrete: Instantiating fmu for worker 0 -19.08.2022-18:11:06 INFO FMU_Discrete: -------------------------Initializing class FMU_Discrete------------------------- -19.08.2022-18:11:06 INFO FMU_Discrete: Extracting fmu and reading fmu model description -19.08.2022-18:11:06 INFO FMU_Discrete: Reading model variables -19.08.2022-18:11:06 INFO FMU_Discrete: Instantiating fmu for worker 0 -19.08.2022-18:12:07 ERROR FMU_Discrete: Could not terminate fmu instance: fmi2Terminate failed with status 3 (error). -19.08.2022-18:12:07 INFO FMU_Discrete: FMU "ThermalZone_bus" closed -19.08.2022-18:29:35 INFO FMU_Discrete: -------------------------Initializing class FMU_Discrete------------------------- -19.08.2022-18:29:35 INFO FMU_Discrete: Extracting fmu and reading fmu model description -19.08.2022-18:29:35 INFO FMU_Discrete: Reading model variables -19.08.2022-18:29:36 INFO FMU_Discrete: Instantiating fmu for worker 0 -19.08.2022-18:29:39 INFO FMU_Discrete: FMU "ThermalZone_bus" initialized for discrete simulation -19.08.2022-18:29:52 INFO FMU_Discrete: FMU "ThermalZone_bus" closed -19.08.2022-18:30:04 INFO FMU_Discrete: -------------------------Initializing class FMU_Discrete------------------------- -19.08.2022-18:30:04 INFO FMU_Discrete: Extracting fmu and reading fmu model description -19.08.2022-18:30:04 INFO FMU_Discrete: Reading model variables -19.08.2022-18:30:04 INFO FMU_Discrete: Instantiating fmu for worker 0 -19.08.2022-18:30:07 INFO FMU_Discrete: FMU "ThermalZone_bus" initialized for discrete simulation -19.08.2022-18:30:53 INFO FMU_Discrete: FMU "ThermalZone_bus" closed -19.08.2022-18:31:06 INFO FMU_Discrete: -------------------------Initializing class FMU_Discrete------------------------- -19.08.2022-18:31:06 INFO FMU_Discrete: Extracting fmu and reading fmu model description -19.08.2022-18:31:06 INFO FMU_Discrete: Reading model variables -19.08.2022-18:31:06 INFO FMU_Discrete: Instantiating fmu for worker 0 -19.08.2022-18:31:11 INFO FMU_Discrete: FMU "ThermalZone_bus" initialized for discrete simulation -19.08.2022-18:31:56 INFO FMU_Discrete: -------------------------Initializing class FMU_Discrete------------------------- -19.08.2022-18:31:56 INFO FMU_Discrete: Extracting fmu and reading fmu model description -19.08.2022-18:31:56 INFO FMU_Discrete: Reading model variables -19.08.2022-18:31:56 INFO FMU_Discrete: Instantiating fmu for worker 0 -19.08.2022-18:32:00 INFO FMU_Discrete: FMU "ThermalZone_bus" initialized for discrete simulation -19.08.2022-18:32:14 INFO FMU_Discrete: -------------------------Initializing class FMU_Discrete------------------------- -19.08.2022-18:32:14 INFO FMU_Discrete: Extracting fmu and reading fmu model description -19.08.2022-18:32:14 INFO FMU_Discrete: Reading model variables -19.08.2022-18:32:14 INFO FMU_Discrete: Instantiating fmu for worker 0 -19.08.2022-18:32:18 INFO FMU_Discrete: FMU "ThermalZone_bus" initialized for discrete simulation -19.08.2022-18:32:41 INFO FMU_Discrete: -------------------------Initializing class FMU_Discrete------------------------- -19.08.2022-18:32:41 INFO FMU_Discrete: Extracting fmu and reading fmu model description -19.08.2022-18:32:41 INFO FMU_Discrete: Reading model variables -19.08.2022-18:32:41 INFO FMU_Discrete: Instantiating fmu for worker 0 -19.08.2022-18:32:41 INFO FMU_Discrete: FMU "ThermalZone_bus" initialized for discrete simulation -19.08.2022-18:32:41 INFO FMU_Discrete: Starting simulation of FMU "ThermalZone_bus" -19.08.2022-18:33:34 INFO FMU_Discrete: -------------------------Initializing class FMU_Discrete------------------------- -19.08.2022-18:33:34 INFO FMU_Discrete: Extracting fmu and reading fmu model description -19.08.2022-18:34:09 INFO FMU_Discrete: -------------------------Initializing class FMU_Discrete------------------------- -19.08.2022-18:34:09 INFO FMU_Discrete: Extracting fmu and reading fmu model description -19.08.2022-18:34:09 INFO FMU_Discrete: Reading model variables -19.08.2022-18:34:09 INFO FMU_Discrete: Instantiating fmu for worker 0 -19.08.2022-18:34:09 INFO FMU_Discrete: FMU "ThermalZone_bus" initialized for discrete simulation -19.08.2022-18:34:09 INFO FMU_Discrete: Starting simulation of FMU "ThermalZone_bus" -19.08.2022-18:34:40 INFO FMU_Discrete: -------------------------Initializing class FMU_Discrete------------------------- -19.08.2022-18:34:40 INFO FMU_Discrete: Extracting fmu and reading fmu model description -19.08.2022-18:36:18 INFO FMU_Discrete: -------------------------Initializing class FMU_Discrete------------------------- -19.08.2022-18:36:18 INFO FMU_Discrete: Extracting fmu and reading fmu model description -19.08.2022-18:36:18 INFO FMU_Discrete: Reading model variables -19.08.2022-18:36:18 INFO FMU_Discrete: Instantiating fmu for worker 0 -19.08.2022-18:36:18 INFO FMU_Discrete: FMU "ThermalZone_bus" initialized for discrete simulation -19.08.2022-18:36:18 INFO FMU_Discrete: Starting simulation of FMU "ThermalZone_bus" -19.08.2022-18:36:29 INFO FMU_Discrete: Simulation of FMU "ThermalZone_bus" finished -19.08.2022-18:36:29 INFO FMU_Discrete: FMU "ThermalZone_bus" closed -19.08.2022-18:56:53 INFO FMU_Discrete: -------------------------Initializing class FMU_Discrete------------------------- -19.08.2022-18:56:53 INFO FMU_Discrete: Extracting fmu and reading fmu model description -19.08.2022-18:56:53 INFO FMU_Discrete: Reading model variables -19.08.2022-18:56:53 INFO FMU_Discrete: Instantiating fmu for worker 0 -19.08.2022-18:56:53 INFO FMU_Discrete: FMU "ThermalZone_bus" initialized for discrete simulation -19.08.2022-18:56:53 INFO FMU_Discrete: Starting simulation of FMU "ThermalZone_bus" -19.08.2022-18:57:04 INFO FMU_Discrete: Simulation of FMU "ThermalZone_bus" finished -19.08.2022-18:57:04 INFO FMU_Discrete: FMU "ThermalZone_bus" initialized for discrete simulation -19.08.2022-18:57:04 INFO FMU_Discrete: -------------------------Initializing class FMU_Discrete------------------------- -19.08.2022-18:57:04 INFO FMU_Discrete: Extracting fmu and reading fmu model description -19.08.2022-18:57:04 INFO FMU_Discrete: Reading model variables -19.08.2022-18:57:04 INFO FMU_Discrete: Instantiating fmu for worker 0 -19.08.2022-18:57:04 INFO FMU_Discrete: FMU "PI_1_bus" initialized for discrete simulation -19.08.2022-18:57:04 INFO FMU_Discrete: Starting simulation of FMU "PI_1_bus" -19.08.2022-18:57:04 INFO FMU_Discrete: Starting simulation of FMU "ThermalZone_bus" -19.08.2022-18:57:23 INFO FMU_Discrete: Simulation of FMU "PI_1_bus" finished -19.08.2022-18:57:23 INFO FMU_Discrete: Simulation of FMU "ThermalZone_bus" finished -19.08.2022-18:59:47 INFO FMU_Discrete: -------------------------Initializing class FMU_Discrete------------------------- -19.08.2022-18:59:47 INFO FMU_Discrete: Extracting fmu and reading fmu model description -19.08.2022-19:03:00 INFO FMU_Discrete: -------------------------Initializing class FMU_Discrete------------------------- -19.08.2022-19:03:00 INFO FMU_Discrete: Extracting fmu and reading fmu model description -19.08.2022-19:03:00 INFO FMU_Discrete: Reading model variables -19.08.2022-19:03:00 INFO FMU_Discrete: Instantiating fmu for worker 0 -19.08.2022-19:03:00 INFO FMU_Discrete: FMU "ThermalZone_bus" initialized for discrete simulation -19.08.2022-19:03:00 INFO FMU_Discrete: Starting simulation of FMU "ThermalZone_bus" -19.08.2022-19:03:10 INFO FMU_Discrete: Simulation of FMU "ThermalZone_bus" finished -19.08.2022-19:03:10 INFO FMU_Discrete: FMU "ThermalZone_bus" initialized for discrete simulation -19.08.2022-19:03:10 INFO FMU_Discrete: -------------------------Initializing class FMU_Discrete------------------------- -19.08.2022-19:03:10 INFO FMU_Discrete: Extracting fmu and reading fmu model description -19.08.2022-19:03:10 INFO FMU_Discrete: Reading model variables -19.08.2022-19:03:10 INFO FMU_Discrete: Instantiating fmu for worker 0 -19.08.2022-19:03:10 INFO FMU_Discrete: FMU "PI_1_bus" initialized for discrete simulation -19.08.2022-19:03:10 INFO FMU_Discrete: Starting simulation of FMU "PI_1_bus" -19.08.2022-19:03:10 INFO FMU_Discrete: Starting simulation of FMU "ThermalZone_bus" -19.08.2022-19:03:29 INFO FMU_Discrete: Simulation of FMU "PI_1_bus" finished -19.08.2022-19:03:29 INFO FMU_Discrete: Simulation of FMU "ThermalZone_bus" finished -19.08.2022-19:03:29 INFO FMU_Discrete: FMU "ThermalZone_bus" closed -19.08.2022-19:03:29 ERROR FMU_Discrete: Could not terminate fmu instance: exception: access violation writing 0x0000020B98AD7620 -19.08.2022-19:03:29 ERROR FMU_Discrete: Could not free fmu instance: exception: access violation writing 0x0000020B98AD7560 -19.08.2022-19:03:29 INFO FMU_Discrete: FMU "PI_1_bus" closed -22.08.2022-11:51:45 INFO FMU_Discrete: -------------------------Initializing class FMU_Discrete------------------------- -22.08.2022-11:51:45 INFO FMU_Discrete: Extracting fmu and reading fmu model description -22.08.2022-11:51:45 INFO FMU_Discrete: Reading model variables -22.08.2022-11:51:45 INFO FMU_Discrete: Instantiating fmu for worker 0 -22.08.2022-11:51:49 INFO FMU_Discrete: FMU "ThermalZone_bus" initialized for discrete simulation -22.08.2022-11:51:49 INFO FMU_Discrete: Starting simulation of FMU "ThermalZone_bus" -22.08.2022-11:51:56 INFO FMU_Discrete: Simulation of FMU "ThermalZone_bus" finished -22.08.2022-11:51:56 INFO FMU_Discrete: FMU "ThermalZone_bus" initialized for discrete simulation -22.08.2022-11:51:56 INFO FMU_Discrete: -------------------------Initializing class FMU_Discrete------------------------- -22.08.2022-11:51:56 INFO FMU_Discrete: Extracting fmu and reading fmu model description -22.08.2022-11:51:56 INFO FMU_Discrete: Reading model variables -22.08.2022-11:51:56 INFO FMU_Discrete: Instantiating fmu for worker 0 -22.08.2022-11:51:56 INFO FMU_Discrete: FMU "PI_1_bus" initialized for discrete simulation -22.08.2022-11:51:56 INFO FMU_Discrete: Starting simulation of FMU "PI_1_bus" -22.08.2022-11:51:56 INFO FMU_Discrete: Starting simulation of FMU "ThermalZone_bus" -22.08.2022-11:52:08 INFO FMU_Discrete: Simulation of FMU "PI_1_bus" finished -22.08.2022-11:52:08 INFO FMU_Discrete: Simulation of FMU "ThermalZone_bus" finished -22.08.2022-11:52:08 INFO FMU_Discrete: FMU "ThermalZone_bus" closed -22.08.2022-11:52:08 INFO FMU_Discrete: FMU "PI_1_bus" closed -22.08.2022-11:54:01 INFO FMU_Discrete: -------------------------Initializing class FMU_Discrete------------------------- -22.08.2022-11:54:01 INFO FMU_Discrete: Extracting fmu and reading fmu model description -22.08.2022-11:54:02 INFO FMU_Discrete: Reading model variables -22.08.2022-11:54:02 INFO FMU_Discrete: Instantiating fmu for worker 0 -22.08.2022-12:53:22 INFO FMU_Discrete: FMU "HeatPumpSystemForTMO2" initialized for discrete simulation -22.08.2022-12:57:00 INFO FMU_Discrete: Starting simulation of FMU "HeatPumpSystemForTMO2" -22.08.2022-12:57:00 INFO FMU_Discrete: Simulation of FMU "HeatPumpSystemForTMO2" finished -22.08.2022-12:58:03 INFO FMU_Discrete: Simulation of FMU "HeatPumpSystemForTMO2" finished -22.08.2022-12:58:42 INFO FMU_Discrete: FMU "HeatPumpSystemForTMO2" closed -22.08.2022-13:00:49 INFO FMU_Discrete: -------------------------Initializing class FMU_Discrete------------------------- -22.08.2022-13:00:49 INFO FMU_Discrete: Extracting fmu and reading fmu model description -22.08.2022-13:00:49 INFO FMU_Discrete: Reading model variables -22.08.2022-13:00:49 INFO FMU_Discrete: Instantiating fmu for worker 0 -22.08.2022-13:00:49 INFO FMU_Discrete: FMU "ThermalZone_bus" initialized for discrete simulation -22.08.2022-13:00:49 INFO FMU_Discrete: Starting simulation of FMU "ThermalZone_bus" -22.08.2022-13:00:56 INFO FMU_Discrete: Simulation of FMU "ThermalZone_bus" finished -22.08.2022-13:00:56 INFO FMU_Discrete: FMU "ThermalZone_bus" initialized for discrete simulation -22.08.2022-13:00:56 INFO FMU_Discrete: -------------------------Initializing class FMU_Discrete------------------------- -22.08.2022-13:00:56 INFO FMU_Discrete: Extracting fmu and reading fmu model description -22.08.2022-13:00:56 INFO FMU_Discrete: Reading model variables -22.08.2022-13:00:56 INFO FMU_Discrete: Instantiating fmu for worker 0 -22.08.2022-13:00:56 INFO FMU_Discrete: FMU "PI_1_bus" initialized for discrete simulation -22.08.2022-13:00:56 INFO FMU_Discrete: Starting simulation of FMU "PI_1_bus" -22.08.2022-13:00:56 INFO FMU_Discrete: Starting simulation of FMU "ThermalZone_bus" -22.08.2022-13:01:08 INFO FMU_Discrete: Simulation of FMU "PI_1_bus" finished -22.08.2022-13:01:08 INFO FMU_Discrete: Simulation of FMU "ThermalZone_bus" finished -22.08.2022-13:01:08 INFO FMU_Discrete: FMU "ThermalZone_bus" closed -22.08.2022-13:01:08 INFO FMU_Discrete: FMU "PI_1_bus" closed -22.08.2022-13:01:29 INFO FMU_Discrete: -------------------------Initializing class FMU_Discrete------------------------- -22.08.2022-13:01:29 INFO FMU_Discrete: Extracting fmu and reading fmu model description -22.08.2022-13:01:30 INFO FMU_Discrete: Reading model variables -22.08.2022-13:01:30 INFO FMU_Discrete: Instantiating fmu for worker 0 -22.08.2022-13:02:31 INFO FMU_Discrete: FMU "HeatPumpSystemForTMO2" initialized for discrete simulation -22.08.2022-13:02:38 INFO FMU_Discrete: Starting simulation of FMU "HeatPumpSystemForTMO2" -22.08.2022-13:02:38 INFO FMU_Discrete: Simulation of FMU "HeatPumpSystemForTMO2" finished -22.08.2022-13:02:42 INFO FMU_Discrete: FMU "HeatPumpSystemForTMO2" closed -22.08.2022-13:09:37 INFO FMU_Discrete: -------------------------Initializing class FMU_Discrete------------------------- -22.08.2022-13:09:37 INFO FMU_Discrete: Extracting fmu and reading fmu model description -22.08.2022-13:09:37 INFO FMU_Discrete: Reading model variables -22.08.2022-13:09:37 INFO FMU_Discrete: Instantiating fmu for worker 0 -22.08.2022-13:09:37 INFO FMU_Discrete: FMU "ThermalZone_bus" initialized for discrete simulation -22.08.2022-13:09:37 INFO FMU_Discrete: Starting simulation of FMU "ThermalZone_bus" -22.08.2022-13:09:39 INFO FMU_Discrete: Simulation of FMU "ThermalZone_bus" finished -22.08.2022-13:09:39 INFO FMU_Discrete: FMU "ThermalZone_bus" initialized for discrete simulation -22.08.2022-13:09:39 INFO FMU_Discrete: -------------------------Initializing class FMU_Discrete------------------------- -22.08.2022-13:09:39 INFO FMU_Discrete: Extracting fmu and reading fmu model description -22.08.2022-13:09:39 INFO FMU_Discrete: Reading model variables -22.08.2022-13:09:39 INFO FMU_Discrete: Instantiating fmu for worker 0 -22.08.2022-13:09:39 INFO FMU_Discrete: FMU "PI_1_bus" initialized for discrete simulation -22.08.2022-13:09:39 INFO FMU_Discrete: Starting simulation of FMU "PI_1_bus" -22.08.2022-13:09:39 INFO FMU_Discrete: Starting simulation of FMU "ThermalZone_bus" -22.08.2022-13:09:42 INFO FMU_Discrete: Simulation of FMU "PI_1_bus" finished -22.08.2022-13:09:42 INFO FMU_Discrete: Simulation of FMU "ThermalZone_bus" finished -22.08.2022-13:09:42 INFO FMU_Discrete: FMU "ThermalZone_bus" closed -22.08.2022-13:09:42 INFO FMU_Discrete: FMU "PI_1_bus" closed -22.08.2022-13:09:42 INFO FMU_Discrete: -------------------------Initializing class FMU_Discrete------------------------- -22.08.2022-13:09:42 INFO FMU_Discrete: Extracting fmu and reading fmu model description -22.08.2022-13:09:42 INFO FMU_Discrete: Reading model variables -22.08.2022-13:09:42 INFO FMU_Discrete: Instantiating fmu for worker 0 -22.08.2022-13:09:42 INFO FMU_Discrete: FMU "HeatPumpSystemForTMO2" initialized for discrete simulation -22.08.2022-13:09:42 INFO FMU_Discrete: Starting simulation of FMU "HeatPumpSystemForTMO2" -22.08.2022-13:09:43 INFO FMU_Discrete: Simulation of FMU "HeatPumpSystemForTMO2" finished -22.08.2022-13:09:43 INFO FMU_Discrete: FMU "HeatPumpSystemForTMO2" closed -22.08.2022-13:09:52 INFO FMU_Discrete: -------------------------Initializing class FMU_Discrete------------------------- -22.08.2022-13:09:52 INFO FMU_Discrete: Extracting fmu and reading fmu model description -22.08.2022-13:09:52 INFO FMU_Discrete: Reading model variables -22.08.2022-13:09:52 INFO FMU_Discrete: Instantiating fmu for worker 0 -22.08.2022-13:09:52 INFO FMU_Discrete: FMU "ThermalZone_bus" initialized for discrete simulation -22.08.2022-13:09:52 INFO FMU_Discrete: Starting simulation of FMU "ThermalZone_bus" -22.08.2022-13:09:54 INFO FMU_Discrete: Simulation of FMU "ThermalZone_bus" finished -22.08.2022-13:09:54 INFO FMU_Discrete: FMU "ThermalZone_bus" initialized for discrete simulation -22.08.2022-13:09:54 INFO FMU_Discrete: -------------------------Initializing class FMU_Discrete------------------------- -22.08.2022-13:09:54 INFO FMU_Discrete: Extracting fmu and reading fmu model description -22.08.2022-13:09:54 INFO FMU_Discrete: Reading model variables -22.08.2022-13:09:54 INFO FMU_Discrete: Instantiating fmu for worker 0 -22.08.2022-13:09:54 INFO FMU_Discrete: FMU "PI_1_bus" initialized for discrete simulation -22.08.2022-13:09:54 INFO FMU_Discrete: Starting simulation of FMU "PI_1_bus" -22.08.2022-13:09:54 INFO FMU_Discrete: Starting simulation of FMU "ThermalZone_bus" -22.08.2022-13:09:57 INFO FMU_Discrete: Simulation of FMU "PI_1_bus" finished -22.08.2022-13:09:57 INFO FMU_Discrete: Simulation of FMU "ThermalZone_bus" finished -22.08.2022-13:09:57 INFO FMU_Discrete: FMU "ThermalZone_bus" closed -22.08.2022-13:09:57 INFO FMU_Discrete: FMU "PI_1_bus" closed -22.08.2022-13:09:57 INFO FMU_Discrete: -------------------------Initializing class FMU_Discrete------------------------- -22.08.2022-13:09:57 INFO FMU_Discrete: Extracting fmu and reading fmu model description -22.08.2022-13:09:57 INFO FMU_Discrete: Reading model variables -22.08.2022-13:09:57 INFO FMU_Discrete: Instantiating fmu for worker 0 -22.08.2022-13:09:57 INFO FMU_Discrete: FMU "HeatPumpSystemForTMO2" initialized for discrete simulation -22.08.2022-13:09:57 INFO FMU_Discrete: Starting simulation of FMU "HeatPumpSystemForTMO2" -22.08.2022-13:09:57 INFO FMU_Discrete: Simulation of FMU "HeatPumpSystemForTMO2" finished -22.08.2022-13:09:57 INFO FMU_Discrete: FMU "HeatPumpSystemForTMO2" closed -22.08.2022-13:16:17 INFO FMU_Discrete: -------------------------Initializing class FMU_Discrete------------------------- -22.08.2022-13:16:17 INFO FMU_Discrete: Extracting fmu and reading fmu model description -22.08.2022-13:16:17 INFO FMU_Discrete: Reading model variables -22.08.2022-13:16:17 INFO FMU_Discrete: Instantiating fmu for worker 0 -22.08.2022-13:16:17 INFO FMU_Discrete: FMU "ThermalZone_bus" initialized for discrete simulation -22.08.2022-13:16:17 INFO FMU_Discrete: Starting simulation of FMU "ThermalZone_bus" -22.08.2022-13:16:19 INFO FMU_Discrete: Simulation of FMU "ThermalZone_bus" finished -22.08.2022-13:16:19 INFO FMU_Discrete: FMU "ThermalZone_bus" initialized for discrete simulation -22.08.2022-13:16:19 INFO FMU_Discrete: -------------------------Initializing class FMU_Discrete------------------------- -22.08.2022-13:16:19 INFO FMU_Discrete: Extracting fmu and reading fmu model description -22.08.2022-13:16:19 INFO FMU_Discrete: Reading model variables -22.08.2022-13:16:19 INFO FMU_Discrete: Instantiating fmu for worker 0 -22.08.2022-13:16:19 INFO FMU_Discrete: FMU "PI_1_bus" initialized for discrete simulation -22.08.2022-13:16:19 INFO FMU_Discrete: Starting simulation of FMU "PI_1_bus" -22.08.2022-13:16:19 INFO FMU_Discrete: Starting simulation of FMU "ThermalZone_bus" -22.08.2022-13:16:22 INFO FMU_Discrete: Simulation of FMU "PI_1_bus" finished -22.08.2022-13:16:22 INFO FMU_Discrete: Simulation of FMU "ThermalZone_bus" finished -22.08.2022-13:16:22 INFO FMU_Discrete: FMU "ThermalZone_bus" closed -22.08.2022-13:16:22 INFO FMU_Discrete: FMU "PI_1_bus" closed -22.08.2022-13:16:22 INFO FMU_Discrete: -------------------------Initializing class FMU_Discrete------------------------- -22.08.2022-13:16:22 INFO FMU_Discrete: Extracting fmu and reading fmu model description -22.08.2022-13:16:22 INFO FMU_Discrete: Reading model variables -22.08.2022-13:16:22 INFO FMU_Discrete: Instantiating fmu for worker 0 -22.08.2022-13:16:22 INFO FMU_Discrete: FMU "HeatPumpSystemForTMO2" initialized for discrete simulation -22.08.2022-13:16:22 INFO FMU_Discrete: Starting simulation of FMU "HeatPumpSystemForTMO2" -22.08.2022-13:16:23 INFO FMU_Discrete: Simulation of FMU "HeatPumpSystemForTMO2" finished -22.08.2022-13:16:23 INFO FMU_Discrete: FMU "HeatPumpSystemForTMO2" closed -22.08.2022-13:20:20 INFO FMU_Discrete: -------------------------Initializing class FMU_Discrete------------------------- -22.08.2022-13:20:20 INFO FMU_Discrete: Extracting fmu and reading fmu model description -22.08.2022-13:20:20 INFO FMU_Discrete: Reading model variables -22.08.2022-13:20:20 INFO FMU_Discrete: Instantiating fmu for worker 0 -22.08.2022-13:20:20 INFO FMU_Discrete: FMU "ThermalZone_bus" initialized for discrete simulation -22.08.2022-13:20:20 INFO FMU_Discrete: Starting simulation of FMU "ThermalZone_bus" -22.08.2022-13:20:22 INFO FMU_Discrete: Simulation of FMU "ThermalZone_bus" finished -22.08.2022-13:20:22 INFO FMU_Discrete: FMU "ThermalZone_bus" initialized for discrete simulation -22.08.2022-13:20:22 INFO FMU_Discrete: -------------------------Initializing class FMU_Discrete------------------------- -22.08.2022-13:20:22 INFO FMU_Discrete: Extracting fmu and reading fmu model description -22.08.2022-13:20:23 INFO FMU_Discrete: Reading model variables -22.08.2022-13:20:23 INFO FMU_Discrete: Instantiating fmu for worker 0 -22.08.2022-13:20:23 INFO FMU_Discrete: FMU "PI_1_bus" initialized for discrete simulation -22.08.2022-13:20:23 INFO FMU_Discrete: Starting simulation of FMU "PI_1_bus" -22.08.2022-13:20:23 INFO FMU_Discrete: Starting simulation of FMU "ThermalZone_bus" -22.08.2022-13:20:26 INFO FMU_Discrete: Simulation of FMU "PI_1_bus" finished -22.08.2022-13:20:26 INFO FMU_Discrete: Simulation of FMU "ThermalZone_bus" finished -22.08.2022-13:20:26 INFO FMU_Discrete: FMU "ThermalZone_bus" closed -22.08.2022-13:20:26 INFO FMU_Discrete: FMU "PI_1_bus" closed -22.08.2022-13:20:26 INFO FMU_Discrete: -------------------------Initializing class FMU_Discrete------------------------- -22.08.2022-13:20:26 INFO FMU_Discrete: Extracting fmu and reading fmu model description -22.08.2022-13:20:26 INFO FMU_Discrete: Reading model variables -22.08.2022-13:20:26 INFO FMU_Discrete: Instantiating fmu for worker 0 -22.08.2022-13:20:26 INFO FMU_Discrete: FMU "HeatPumpSystemForTMO2" initialized for discrete simulation -22.08.2022-13:20:26 INFO FMU_Discrete: Starting simulation of FMU "HeatPumpSystemForTMO2" -22.08.2022-13:20:27 INFO FMU_Discrete: Simulation of FMU "HeatPumpSystemForTMO2" finished -22.08.2022-13:20:27 INFO FMU_Discrete: FMU "HeatPumpSystemForTMO2" closed -22.08.2022-13:26:23 INFO FMU_Discrete: -------------------------Initializing class FMU_Discrete------------------------- -22.08.2022-13:26:23 INFO FMU_Discrete: Extracting fmu and reading fmu model description -22.08.2022-13:26:23 INFO FMU_Discrete: Reading model variables -22.08.2022-13:26:23 INFO FMU_Discrete: Instantiating fmu for worker 0 -22.08.2022-13:26:23 INFO FMU_Discrete: FMU "ThermalZone_bus" initialized for discrete simulation -22.08.2022-13:26:23 INFO FMU_Discrete: Starting simulation of FMU "ThermalZone_bus" -22.08.2022-13:26:30 INFO FMU_Discrete: Simulation of FMU "ThermalZone_bus" finished -22.08.2022-13:26:30 INFO FMU_Discrete: FMU "ThermalZone_bus" initialized for discrete simulation -22.08.2022-13:26:30 INFO FMU_Discrete: -------------------------Initializing class FMU_Discrete------------------------- -22.08.2022-13:26:30 INFO FMU_Discrete: Extracting fmu and reading fmu model description -22.08.2022-13:26:30 INFO FMU_Discrete: Reading model variables -22.08.2022-13:26:30 INFO FMU_Discrete: Instantiating fmu for worker 0 -22.08.2022-13:26:30 INFO FMU_Discrete: FMU "PI_1_bus" initialized for discrete simulation -22.08.2022-13:26:30 INFO FMU_Discrete: Starting simulation of FMU "PI_1_bus" -22.08.2022-13:26:30 INFO FMU_Discrete: Starting simulation of FMU "ThermalZone_bus" -22.08.2022-13:26:42 INFO FMU_Discrete: Simulation of FMU "PI_1_bus" finished -22.08.2022-13:26:42 INFO FMU_Discrete: Simulation of FMU "ThermalZone_bus" finished -22.08.2022-13:26:42 INFO FMU_Discrete: FMU "ThermalZone_bus" closed -22.08.2022-13:26:42 INFO FMU_Discrete: FMU "PI_1_bus" closed -22.08.2022-13:26:59 INFO FMU_Discrete: -------------------------Initializing class FMU_Discrete------------------------- -22.08.2022-13:26:59 INFO FMU_Discrete: Extracting fmu and reading fmu model description -22.08.2022-13:27:00 INFO FMU_Discrete: Reading model variables -22.08.2022-13:27:00 INFO FMU_Discrete: Instantiating fmu for worker 0 -22.08.2022-13:30:16 INFO FMU_Discrete: FMU "HeatPumpSystemForTMO2" initialized for discrete simulation -22.08.2022-13:30:16 INFO FMU_Discrete: Starting simulation of FMU "HeatPumpSystemForTMO2" -22.08.2022-13:30:17 INFO FMU_Discrete: Simulation of FMU "HeatPumpSystemForTMO2" finished -22.08.2022-13:30:17 INFO FMU_Discrete: FMU "HeatPumpSystemForTMO2" closed -22.08.2022-13:35:08 INFO FMU_Discrete: -------------------------Initializing class FMU_Discrete------------------------- -22.08.2022-13:35:08 INFO FMU_Discrete: Extracting fmu and reading fmu model description -22.08.2022-13:35:08 INFO FMU_Discrete: Reading model variables -22.08.2022-13:35:08 INFO FMU_Discrete: Instantiating fmu for worker 0 -22.08.2022-13:35:08 INFO FMU_Discrete: FMU "ThermalZone_bus" initialized for discrete simulation -22.08.2022-13:35:08 INFO FMU_Discrete: Starting simulation of FMU "ThermalZone_bus" -22.08.2022-13:35:10 INFO FMU_Discrete: Simulation of FMU "ThermalZone_bus" finished -22.08.2022-13:35:10 INFO FMU_Discrete: FMU "ThermalZone_bus" initialized for discrete simulation -22.08.2022-13:35:10 INFO FMU_Discrete: -------------------------Initializing class FMU_Discrete------------------------- -22.08.2022-13:35:10 INFO FMU_Discrete: Extracting fmu and reading fmu model description -22.08.2022-13:35:10 INFO FMU_Discrete: Reading model variables -22.08.2022-13:35:10 INFO FMU_Discrete: Instantiating fmu for worker 0 -22.08.2022-13:35:10 INFO FMU_Discrete: FMU "PI_1_bus" initialized for discrete simulation -22.08.2022-13:35:10 INFO FMU_Discrete: Starting simulation of FMU "PI_1_bus" -22.08.2022-13:35:10 INFO FMU_Discrete: Starting simulation of FMU "ThermalZone_bus" -22.08.2022-13:35:13 INFO FMU_Discrete: Simulation of FMU "PI_1_bus" finished -22.08.2022-13:35:13 INFO FMU_Discrete: Simulation of FMU "ThermalZone_bus" finished -22.08.2022-13:35:13 INFO FMU_Discrete: FMU "ThermalZone_bus" closed -22.08.2022-13:35:13 INFO FMU_Discrete: FMU "PI_1_bus" closed -22.08.2022-13:35:13 INFO FMU_Discrete: -------------------------Initializing class FMU_Discrete------------------------- -22.08.2022-13:35:13 INFO FMU_Discrete: Extracting fmu and reading fmu model description -22.08.2022-13:35:13 INFO FMU_Discrete: Reading model variables -22.08.2022-13:35:13 INFO FMU_Discrete: Instantiating fmu for worker 0 -22.08.2022-13:35:13 INFO FMU_Discrete: FMU "HeatPumpSystemForTMO2" initialized for discrete simulation -22.08.2022-13:35:13 INFO FMU_Discrete: Starting simulation of FMU "HeatPumpSystemForTMO2" -22.08.2022-13:35:14 INFO FMU_Discrete: Simulation of FMU "HeatPumpSystemForTMO2" finished -22.08.2022-13:35:14 INFO FMU_Discrete: FMU "HeatPumpSystemForTMO2" closed -22.08.2022-13:36:26 INFO FMU_Discrete: -------------------------Initializing class FMU_Discrete------------------------- -22.08.2022-13:36:26 INFO FMU_Discrete: Extracting fmu and reading fmu model description -22.08.2022-13:36:26 INFO FMU_Discrete: Reading model variables -22.08.2022-13:36:26 INFO FMU_Discrete: Instantiating fmu for worker 0 -22.08.2022-13:36:26 INFO FMU_Discrete: FMU "HeatPumpSystemForTMO2" initialized for discrete simulation -22.08.2022-13:36:26 INFO FMU_Discrete: Starting simulation of FMU "HeatPumpSystemForTMO2" -22.08.2022-13:36:29 INFO FMU_Discrete: Simulation of FMU "HeatPumpSystemForTMO2" finished -22.08.2022-13:36:29 INFO FMU_Discrete: FMU "HeatPumpSystemForTMO2" closed -22.08.2022-13:37:28 INFO FMU_Discrete: -------------------------Initializing class FMU_Discrete------------------------- -22.08.2022-13:37:28 INFO FMU_Discrete: Extracting fmu and reading fmu model description -22.08.2022-13:37:28 INFO FMU_Discrete: Reading model variables -22.08.2022-13:37:28 INFO FMU_Discrete: Instantiating fmu for worker 0 -22.08.2022-13:37:28 INFO FMU_Discrete: FMU "HeatPumpSystemForTMO2" initialized for discrete simulation -22.08.2022-13:37:28 INFO FMU_Discrete: Starting simulation of FMU "HeatPumpSystemForTMO2" -22.08.2022-13:37:29 INFO FMU_Discrete: Simulation of FMU "HeatPumpSystemForTMO2" finished -22.08.2022-13:37:29 INFO FMU_Discrete: FMU "HeatPumpSystemForTMO2" closed -22.08.2022-13:38:03 INFO FMU_Discrete: -------------------------Initializing class FMU_Discrete------------------------- -22.08.2022-13:38:03 INFO FMU_Discrete: Extracting fmu and reading fmu model description -22.08.2022-13:38:03 INFO FMU_Discrete: Reading model variables -22.08.2022-13:38:03 INFO FMU_Discrete: Instantiating fmu for worker 0 -22.08.2022-13:38:03 INFO FMU_Discrete: FMU "HeatPumpSystemForTMO2" initialized for discrete simulation -22.08.2022-13:38:03 INFO FMU_Discrete: Starting simulation of FMU "HeatPumpSystemForTMO2" -22.08.2022-13:38:04 INFO FMU_Discrete: Simulation of FMU "HeatPumpSystemForTMO2" finished -22.08.2022-13:38:04 INFO FMU_Discrete: FMU "HeatPumpSystemForTMO2" closed -22.08.2022-13:38:35 INFO FMU_Discrete: -------------------------Initializing class FMU_Discrete------------------------- -22.08.2022-13:38:35 INFO FMU_Discrete: Extracting fmu and reading fmu model description -22.08.2022-13:38:36 INFO FMU_Discrete: Reading model variables -22.08.2022-13:38:36 INFO FMU_Discrete: Instantiating fmu for worker 0 -22.08.2022-13:38:36 INFO FMU_Discrete: FMU "HeatPumpSystemForTMO2" initialized for discrete simulation -22.08.2022-13:38:36 INFO FMU_Discrete: Starting simulation of FMU "HeatPumpSystemForTMO2" -22.08.2022-13:38:37 INFO FMU_Discrete: Simulation of FMU "HeatPumpSystemForTMO2" finished -22.08.2022-13:38:37 INFO FMU_Discrete: FMU "HeatPumpSystemForTMO2" closed -22.08.2022-14:06:30 INFO FMU_Discrete: -------------------------Initializing class FMU_Discrete------------------------- -22.08.2022-14:06:30 INFO FMU_Discrete: Extracting fmu and reading fmu model description -22.08.2022-14:06:30 INFO FMU_Discrete: Reading model variables -22.08.2022-14:06:30 INFO FMU_Discrete: Instantiating fmu for worker 0 -22.08.2022-14:06:30 INFO FMU_Discrete: FMU "ThermalZone_bus" initialized for discrete simulation -22.08.2022-14:06:30 INFO FMU_Discrete: Starting simulation of FMU "ThermalZone_bus" -22.08.2022-14:06:31 INFO FMU_Discrete: Simulation of FMU "ThermalZone_bus" finished -22.08.2022-14:06:32 INFO FMU_Discrete: FMU "ThermalZone_bus" initialized for discrete simulation -22.08.2022-14:06:32 INFO FMU_Discrete: -------------------------Initializing class FMU_Discrete------------------------- -22.08.2022-14:06:32 INFO FMU_Discrete: Extracting fmu and reading fmu model description -22.08.2022-14:06:32 INFO FMU_Discrete: Reading model variables -22.08.2022-14:06:32 INFO FMU_Discrete: Instantiating fmu for worker 0 -22.08.2022-14:06:32 INFO FMU_Discrete: FMU "PI_1_bus" initialized for discrete simulation -22.08.2022-14:06:32 INFO FMU_Discrete: Starting simulation of FMU "PI_1_bus" -22.08.2022-14:06:32 INFO FMU_Discrete: Starting simulation of FMU "ThermalZone_bus" -22.08.2022-14:06:35 INFO FMU_Discrete: Simulation of FMU "PI_1_bus" finished -22.08.2022-14:06:35 INFO FMU_Discrete: Simulation of FMU "ThermalZone_bus" finished -22.08.2022-14:06:35 INFO FMU_Discrete: FMU "ThermalZone_bus" closed -22.08.2022-14:06:35 INFO FMU_Discrete: FMU "PI_1_bus" closed -22.08.2022-14:06:46 INFO FMU_Discrete: -------------------------Initializing class FMU_Discrete------------------------- -22.08.2022-14:06:46 INFO FMU_Discrete: Extracting fmu and reading fmu model description -22.08.2022-14:06:46 INFO FMU_Discrete: Reading model variables -22.08.2022-14:06:46 INFO FMU_Discrete: Instantiating fmu for worker 0 -22.08.2022-14:06:46 INFO FMU_Discrete: FMU "ThermalZone_bus" initialized for discrete simulation -22.08.2022-14:06:46 INFO FMU_Discrete: Starting simulation of FMU "ThermalZone_bus" -22.08.2022-14:06:48 INFO FMU_Discrete: Simulation of FMU "ThermalZone_bus" finished -22.08.2022-14:06:48 INFO FMU_Discrete: FMU "ThermalZone_bus" initialized for discrete simulation -22.08.2022-14:06:48 INFO FMU_Discrete: -------------------------Initializing class FMU_Discrete------------------------- -22.08.2022-14:06:48 INFO FMU_Discrete: Extracting fmu and reading fmu model description -22.08.2022-14:06:48 INFO FMU_Discrete: Reading model variables -22.08.2022-14:06:48 INFO FMU_Discrete: Instantiating fmu for worker 0 -22.08.2022-14:06:48 INFO FMU_Discrete: FMU "PI_1_bus" initialized for discrete simulation -22.08.2022-14:06:48 INFO FMU_Discrete: Starting simulation of FMU "PI_1_bus" -22.08.2022-14:06:48 INFO FMU_Discrete: Starting simulation of FMU "ThermalZone_bus" -22.08.2022-14:06:51 INFO FMU_Discrete: Simulation of FMU "PI_1_bus" finished -22.08.2022-14:06:51 INFO FMU_Discrete: Simulation of FMU "ThermalZone_bus" finished -22.08.2022-14:06:51 INFO FMU_Discrete: FMU "ThermalZone_bus" closed -22.08.2022-14:06:51 INFO FMU_Discrete: FMU "PI_1_bus" closed -22.08.2022-14:06:51 INFO FMU_Discrete: -------------------------Initializing class FMU_Discrete------------------------- -22.08.2022-14:06:51 INFO FMU_Discrete: Extracting fmu and reading fmu model description -22.08.2022-14:06:51 INFO FMU_Discrete: Reading model variables -22.08.2022-14:06:51 INFO FMU_Discrete: Instantiating fmu for worker 0 -22.08.2022-14:06:51 INFO FMU_Discrete: FMU "HeatPumpSystemForTMO2" initialized for discrete simulation -22.08.2022-14:06:51 INFO FMU_Discrete: Starting simulation of FMU "HeatPumpSystemForTMO2" -22.08.2022-14:06:53 INFO FMU_Discrete: Simulation of FMU "HeatPumpSystemForTMO2" finished -22.08.2022-14:06:53 INFO FMU_Discrete: FMU "HeatPumpSystemForTMO2" closed