|On this page…|
Using the Variant Manager, you can define and manage variant configurations in the following ways.
Explore, visualize, and manipulate variant hierarchy.
Define, validate, and visualize variant configurations.
Define constraints models must satisfy.
Specify the default variant.
Associate variant configuration data object of type Simulink.VariantConfigurationData with models.
Define variant configurations, constraints, and export them as a variant configuration data objects.
Validate variant configurations without updating the model.
The Variant Manager enables you to specify the following information.
Variant configuration data: The variant configuration object stores a collection of variant configurations, constraints, and the default configuration.
Configuration: The configuration defines a set of variant control variables and values, referenced model configurations, and constraints that must be satisfied. Constraints are expressions that evaluate to a Boolean value.
Control Variables: Specify name-value pairs defined as structures having fields Name and Value. Simulink® verifies the values of the control variables when validating the configuration. Variant control variables determine the active variant.
Submodel Configurations: Specify variant configurations for models referenced by model reference blocks.
For a model or referenced model that has a variant configuration data object with a default configuration defined, the control variables from the default configuration are loaded to the base workspace and are used for validation.
For referenced models, if the top model specifies the variant configuration, that specific variant configuration is used to validate the referenced models.
For a model containing referenced models, you can have multiple variant configurations that use common set of control variables and referenced model configurations. In such cases, all the variant configurations must have the same values for control variables and referenced model configurations.