- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » understanding how FMU deals with events
understanding how FMU deals with events
understanding how FMU deals with events
I am reading FMI 1.0 model exchange documentation.
I read that when and state event happens between two integration time steps[ti-1, ti], the event indicators change sign. and then fmiEventUpdate should be called.
I do not know by calling fmiEventUpdate:
1- does FMU calculate exact time of the event internally and iteratively? why it needs this time?
2- i guess it calculates this exact time, say, t_event, and then integrate internally in the time period: [ti-1,t_event]. then it changes the equations to the new set of equations and integrate within the period: [t_event,ti]. is it right?
Thanks,
Arvin
Re: understanding how FMU deals with events
It depends if they are time events (i.e. sample) or state events. When you have time events you know when the next event is.
If you have state events you only know when the event indicators change.
Model exchange does not integrate anything internally. The integration is done by the external solver.
I suggest you have a look inside fmuChecker on how simulation of model exchange FMUs is implemented:
https://trac.fmi-standard.org/browser/b … ce-Checker
download the source code and look into file fmi2_me_sim.c.
Cheers,
Adrian Pop/
- adrpo
- 885 Posts
- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » understanding how FMU deals with events