Archived OpenModelica forums. Posting is disabled.

Alternative forums include GitHub discussions or StackOverflow (make sure to read the Stack Overflow rules; you need to have well-formed questions)


Forgot password? | Forgot username? | Register

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

Edited by: arvin_ttl - Nov-06-15 20:02:22

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/

Edited by: adrpo - Nov-06-15 20:18:14
There are 0 guests and 0 other users also viewing this topic
You are here: