We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents eb77426 + fd838b6 commit 6a2eaebCopy full SHA for 6a2eaeb
ebcpy/simulationapi/fmu.py
@@ -211,6 +211,9 @@ def _single_simulation(self, kwargs):
211
self.check_unsupported_variables(variables=list(parameters.keys()),
212
type_of_var="parameters")
213
try:
214
+ # reset the FMU instance instead of creating a new one
215
+ fmu_instance.reset()
216
+ # Simulate
217
res = fmpy.simulate_fmu(
218
filename=unzip_dir,
219
start_time=self.sim_setup.start_time,
@@ -230,7 +233,6 @@ def _single_simulation(self, kwargs):
230
233
fmu_instance=fmu_instance,
231
234
fmi_type=self._fmi_type,
232
235
)
- fmu_instance.reset()
236
237
except Exception as error:
238
self.logger.error(f"[SIMULATION ERROR] Error occurred while running FMU: \n {error}")
0 commit comments