Manage Variant Modeling Components
Variant Manager is a tool that allows you to visualize the model hierarchy and centrally manage the usage of variant elements such as variant blocks and variant transitions in Stateflow® charts across the hierarchy.
The tool is available as a support package named Variant Manager for Simulink® with these main capabilities:
Variant Manager — Visualize the model hierarchy, manage the usage of variant elements across the hierarchy, and create and manage variant configurations.
Variant Reducer — Generate a reduced model that contains only selected variant configurations.
Variant Analyzer — Compare and contrast variant configurations to identify errors or inconsistencies.
Classes
Simulink.VariantConfigurationData | Create variant configurations programmatically |
Simulink.VariantConfigurationAnalysis | Analyze variant configurations programmatically |
Functions
Simulink.VariantManager.activateModel | Validate and activate variant blocks in model hierarchy (Since R2022b) |
Simulink.VariantManager.updateModel | Obtain model compilation information and activate variant blocks in model hierarchy (Since R2024b) |
Simulink.VariantManager.applyConfiguration | Apply specified variant configuration to model (Since R2022b) |
Simulink.VariantManager.findVariantControlVars | Find variables used in variant control expressions |
Simulink.VariantManager.generateConfigurations | Generate variant configurations automatically (Since R2022b) |
Simulink.VariantManager.getConfigurationData | Get variant configuration data object associated with model (Since R2022b) |
Simulink.VariantManager.getPreferredConfigurationName | Get name of preferred variant configuration for model (Since R2022b) |
Simulink.VariantManager.reduceModel | Generate reduced model for specified variant configurations |
Topics
- Variant Configurations
Use variant configurations to represent combination of variant choices across model hierarchy.
- Create and Activate Variant Configurations
Create and activate variant configurations for a model.
- Compose Variant Configurations for Top Model Using Referenced Model Configurations
Use referenced model configuration to set up variant configuration for a top-level model.
- Save and Reuse Variant Configurations Using Variant Configuration Data Object
Save and load variant configuration data object for a model.
- Generate Variant Configurations Automatically
Generate all possible variant configurations for a model.
- Variant Manager Workflow to Set Up Variant Configurations for Models
Workflow diagram to set up variant configurations for a model.
- Variant Manager Workflow to Manage Existing Variant Configurations in Models
Workflow diagram to manage existing variant configurations for a model.
- Reduce Variant Models Using Variant Reducer
Generate reduced models that contain a subset of the available variant configurations.
- Analyze Variant Configurations in Models Containing Variant Blocks
Analyze and compare variant configurations for a model containing variant blocks.