I am confused by the hybrid modeling paradigm in Modelica. On the one hand, events are useful; on the other hand, they should be avoided. Let me explain my case:
I have a large model consisting of several buildings in the neighborhood that has been simulated for over 1 year. Initially, the model worked very slowly. Adding noEvent () around as many if-conditions as possible greatly accelerated the speed.
As the development continued, the control over the model became more difficult, and again I have a lot of events, sometimes with very short intervals. To give an idea:
Number of (model) time events : 28170 Number of (U) time events : 0 Number of state events : 22572 Number of step events : 0
These events blew up the output (for proper post-processing I need variables on the events) and slows down the simulation. And what's more, I feel that some of noEvent (if ...) are leading to unexpected behavior.
I wonder if this decision will force my events at certain time steps and forbid them between these time steps? Ideally, I would like to trigger these “forced events” based on certain conditions. For example: during the day they should be every 15 minutes, with high solar radiation every minute, during the nights I don’t want events at all.
Is that a good idea? I think it will be faster, since many events in the state will become events of the time? How can this be done with Modelica 3.2 (in Dymola)?
Thanks for all the answers. Rule
source share