libcosim icon indicating copy to clipboard operation
libcosim copied to clipboard

Add functions that signal the end of a simulation

Open kyllingstad opened this issue 6 years ago • 0 comments

Both slave and async_slave have an end_simulation() function, but the higher-level and aggregate classes simulator, algorithm and execution do not. Instead, the lower-level end_simulation() calls are triggered by their destructors.

There are times when it may be desirable to signal the end of a simulation without shutting the whole thing down, for example if a simulator performs some final calculations whose results you need to get. Furthermore, FMI allows querying a slave for data and status information after its fmi2Terminate() function has been called and before the "destructor" fmi2FreeInstance() gets called, presumably for a good reason.

Hence, we should consider introducing such a function in the higher-level classes too.

kyllingstad avatar Mar 19 '19 12:03 kyllingstad