Hopsan / hopsan

Hopsan is a free multi-domain system simulation tool developed at the division of Fluid and mechatronic systems at Linköping university.
Apache License 2.0
146 stars 41 forks source link

Finalize components after measureing time #2213

Closed robbr48 closed 1 month ago

robbr48 commented 2 months ago

Before multithreaded simualtion, components are simulated a few steps to measure time. After this they are initialized a second time. However, the also need to be finalized in between, in order to avoid components appearing in the wrong state (especially FMUs).

In other words, it should be: initialize - simulate - finalize - initialize - simulate - finalize

Not: initialize - simulate - initialize - simulate - finalize