Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Efficient habdling zero-crossing surfaces #588
In the current FMI-3 specification, as well as in FMI-1 and FMI-2, in order to find and handle the state-events, the integrator monitors the zero-crossing surfaces during the numerical integration using the fmiXGetEventIndicators function in the continuous-time mode. Once the integrator finds a crossing, integration is stopped and the FMU is pushed into the Event mode to handle the state-event.
What is proposed here is to give the integrator (simulator) the right to pass the vector of crossed zero-crossings to the FMU. In this way, the FMU need not reevluate the surfaces and numerical errors will be avoided. This is more important when state-events are linked to clock ticks.
What is needed is just a new API to pass crossed surfaces as well as their direction into the FMU:
if ticket (#587) is accepted for FMi-3, this API is good:
otherwise this API should be used: