Main Content

Create and Validate Variant Configurations

This example shows how to create and validate variant configurations for a model.

Step 1: Open Variant Manager

  1. Open the model in which you want to create variant configurations. For example, consider a model containing a Variant Source, Variant Sink, and aVariant Subsystemblock.

  2. Right-click the variant badge and selectOpen in Variant Manager.

Step 2: Define Variant Configuration

You can use theVariant configuration datapane to define and store a variant configuration. For detailed information on each pane, seeVariant Manager Overview.

  1. In the variant configuration data pane, click theConfigurationstab.

  2. Click. A variant configuration is added. Type a name for this configuration in theName列。

  3. Click theControl Variablestab in the controls section of theConfigurationspane.

  4. To import the control variables for the variant configuration from the global workspace, clickorto add new control variables to the model.

  5. Type a name for the variant configuration in theNamebox available at the top-left of Variant Manager.

  6. To export the variant configuration information to the global workspace, click. The variant configuration for the model is now created.

Step 3: Activate and Validate Variant Configuration

To activate a variant configuration, select a configuration from theConfigurationssection and click theActivatebutton. TheActivatebutton validates and applies the selected configuration on the model.

Note

To reduce a model based on a variant condition, clickReduce model. For more information, seeReduce Models Containing Variant Blocks

Related Examples

More About