주요 콘텐츠

Variant Manager

R2026b

Manage, configure, and analyze system variants

Since R2026b

Description

The Variant Manager app provides a centralized environment to manage the full variant workflow: explore variant elements, capture design alternatives, validate variant configurations, and deliver specific product variants.

In large Simulink® models, variant elements such as variant blocks and variant parameters appear across the model hierarchy, which can make them difficult to manage and validate. The Variant Manager app lets you visualize the model hierarchy and centrally manage variant elements such as variant blocks, variant parameters, and variant transitions across the hierarchy.

Use Variant Manager across the Model-Based Design workflow to:

  • Visualize variant blocks, variant parameters, and variant transitions in a single hierarchical view of the model.

  • Capture combinations of variant choices as named variant configurations and switch among them to evaluate design alternatives.

  • Validate that a variant configuration is consistent and valid before simulation or code generation.

  • Apply variant configurations in simulation, testing, and coverage analysis.

  • Compare variant configurations with Variant Analyzer to identify differences.

  • Reduce a model with Variant Reducer to produce a simplified, standalone model that contains only the variants required for a specific product or product line.

To learn about licensing requirements for Simulink Variant Manager™ workflows, see License Requirements for Simulink Variant Manager.

The Variant Manager app showing the toolstrip at the top, the Configurations pane and Constraints pane on the left, the Model Hierarchy table in the center, and the Diagnostics pane at the bottom.

Open the Variant Manager App

  • Simulink Toolstrip: On the Apps tab, under Model Verification, Validation, and Test, click Variant Manager.

  • MATLAB® command prompt: Use the Simulink.VariantManager.open function.

Parameters

expand all

Configurations and Constraints

Create, copy, and delete named variant configurations for the model. You can also compose a top-level configuration from referenced component configurations. See Create and Activate Variant Configurations.

Define constraints as logical expressions that apply across all configurations. Constraints are validated during activation, simulation, and code generation. See Define Constraints for Variant Configurations.

Show the variant control variables for the selected configuration. Use the toolbar to import, add, copy, delete, change the data type of, or export control variables. You can also show variable usage in the model hierarchy or filter the table by variable name. For more information, see Add, Import, or Export Control Variables in Variant Configuration.

Displays the model hierarchy as a tree view with tabs to switch among different variant element types. Use the Navigate list with Previous and Next buttons to step through rows by variable usage, active choices, or invalid choices. For more information, see Manage Variant Elements.

TabDescription
SystemAll blocks in the model hierarchy.
BlocksOnly variant blocks. Use the View list to filter by Variant control mode.
StateflowVariant transitions used in Stateflow® charts.
Variant ParametersVariant parameters grouped by bank or by choice. See Manage Variant Parameters Using Variant Manager.
Referenced ConfigurationsVariant configurations for referenced components. This tab is not shown by default. To open, right-click a configuration and select Referenced component configurations. See Referenced Configurations.

Operations

Export the variant configurations object to the base workspace or data dictionary and associate it with the model. Save the model after applying changes to make the changes persist. See Save Variant Configurations.

Reload the variant configurations object from the data source, and discard unexported changes. This operation does not revert control variable values that activation or export operations already pushed.

Load a variant configurations object from a MAT file or MATLAB script into Variant Manager.

Save the variant configurations object to a MAT file or MATLAB script for later reuse.

Open the Configurations Generator to automatically generate all possible variant configurations for the model. See Generate Variant Configurations Automatically.

Validate the selected configuration and apply it to the model. Activation pushes control variable values to data sources. See Validate and Activate Variant Configuration.

Compile the model to obtain accurate compile-time information for control variable import, activation, and variant parameter identification. See Use Model Compilation Information in Variant Manager.

Tools

Open the Variant Reducer to generate a reduced model containing only the variant choices for selected configurations. See Reduce Variant Models Using Variant Reducer.

Open the Variant Analyzer to compare variant configurations, check variant coverage, and find dependent model artifacts. See Analyze Variant Configurations in Models Containing Variant Blocks.

Limitations

  • You cannot use Variant Manager with library files.

  • Variant Manager does not support this functionality that requires model compilation with Subsystem block diagrams from the user interface or from the MATLAB Command Window:

    • Generating variant configurations automatically

    • Obtaining compile-time information using Update Model

    • Using Variant Reducer and Variant Analyzer

  • The model hierarchy table does not show protected referenced models.

  • Variant Manager does not support workflows such as activation, viewing, or importing control variables from variations inside a protected model.

  • For a variant block, you can define variant configurations only if the Variant control mode parameter of the block is set to expression.

  • Variant Manager reports errors and warnings related to variant elements only.

  • Variant Manager constraints are evaluated based on the values of variant control variables defined in the base workspace or data dictionaries linked to the model.

  • Variant Manager does not validate constraints post compilation, for example, at startup variant activation time.

  • Variant Manager does not support creating or deleting variant parameter objects from the Variant Parameters tab.

Version History

Introduced in R2026b