Removing events from models to improve real-time performance

General News

Summary

Unfortunately when events occur this can cause a model to run significantly slower for that simulation time. Events can be generated by a number of different ways, for example the triggering of when conditions, an if condition changing, clocks triggering, some functions like sample, mod and other functions can generate events, Boolean and Integer values changing and possibly other ways as well. However if the value being assigned is continuous then noEvent can be used around the if condition to avoid an event being generated (see the example on the left side of Figure 2, in this example it may be more efficient to use y = smooth(0,if x>0.5 then x else 0) see Modelica Specification for more information about noEvent and smooth). It is possible to put noEvent around conditions that result in discrete changes in a value, see the right hand example in Figure 2. Note that even when a fixed step inline solver is being used, events are searched for and Dymola scales simulation times accordingly so that the results are accurate, for more details; see Options for implicit inline integration in Section 11.3.3 of the Dymola Full User Manual.

Classifications

industries
HealthTech
applications
Data Management

AskAI Classifications

Labels
Test & Measurement Software SaaS Developer Tools

Linked Companies