Variant Event-Based Components
You can activate or deactivate the execution of subsystems on a model initialize, reset, and terminate events depending on the Types of Variant Control Modes in Variant Blocks you select. You can also execute the Simulink® functions conditionally.
The code that you generate for the event-based variant blocks can contain all the variant choices of a system. You can switch between the choices prior to code compile.