Which Modelica global library models support the flag "Direct application of events", used for increasing simulation performance?
The flag "Direct application of events" is available in the Basic Data page of each Modelica Model (ElmMdl) based on a Modelica Model Type (TypMdl) that uses the "Hybrid" modelling method. The use of the "Direct application of events" functionality can be enabled by checking this flag, and disabled by unchecking it . When enabled, a special scheduling and handling of events triggered by this model is applied in this situation, with the intent of optimising simulation performance. The event scheduling and handling logic is not strictly following the Modelica standard, instead it aligns with the event handling method applied for DSL models. Considerable simulation performance improvements are expected in event rich scenarios, along with a minimal loss of accuracy. When simulation accuracy is a priority, then this flag shall be deactivated.
Even if the flag "Direct application of events" is selected in one Modelica Model, not all event based functions will make use of it. Only the built-in Modelica Models can take advantage of this functionality. The following models are currently supporting this function:
- Controls\PI_Controller
- Controls\picontrol
- Integrators\BasicLimitedIntegrator
- Nonlinear\BasicLimiter
- Nonlinear\ComplexMagnitudeLimiter
- Operators\Logical\PickUpDropOut
- Switches\Selector
In order to maximise simulation performance in connection with the functionality "Direct application of events", models should be designed to incorporate, whenever possible, the above blocks, instead of using any other alternative implementations.
Additional note on FMU-based Modelica models
Modelica models that are connected or imported via FMU do not benefit from the “Direct application of events” (Fast Events) functionality, even if the flag is activated.
The optimised event scheduling is only available for the fore mentioned native, built-in Modelica library components within PowerFactory.