Closed DeadParrot closed 1 year ago
The reinit
+ pre
issue was resolved by OCT-master-8bb4688ea939e98a3f23be67236795ab5f2d3ac4.
Since the pre
scenario with discrete variables isn't currently known to be an issue (or is better addressed with non-event-generating functions) I am closing this.
Self-dependencies created by
pre()
usage are not appearing in the OCT-generated<Dependencies>
section of the modelDescription.xml file. This causes incorrect or inaccurate QSS simulations.The BouncingBall model has this conditional block:
and no self-dependency for
v
is generated. For correct QSS simulation the FMU value ofv
must be set just before the FMU event handling occurs sov
needs a self-dependency. (Due to the dependency ofh
onv
the value ofv
in the FMU may not be that out of date at the zero-crossing event but similar models without this dependency produce much larger QSS simulation errors.)Discrete variables updated via
pre()
calls in when blocks such as:are also missing the self-dependency. If those variables aren't updated via a non-event-generating operation then their "old" FMU value will still be current when the event loop is run, so the missing dependency won't be an issue in QSS unless such updating is possible.
Tested with OCT 1.43.4.