In Simulink®, you can create models that are based on a modular design platform that comprises a fixed common structure with a finite set of variable components. The variability helps you develop a single, fixed master design with variable components.
The approach helps you meet diverse customer requirements that are governed by application, cost, or operational considerations.
Variants are the variable components of modular design platforms. They help you specify multiple implementations of a model in a single, unified block diagram. For more information, see What Are Variants and When to Use Them.
There are two types of variants, hierarchical and inline. Hierarchical variants are through Variant Subsystem blocks, whereas Inline Variants are through Variant Source and Variant Sink blocks. Use of a Variant Subsystem block provides these advantages:
Allows you to mix Model and Subsystem blocks as variant systems
Supports flexible I/O, so that all variants do not need to have the same number of input and output ports
|Variant Subsystem, Variant Model||Template subsystem containing Subsystem blocks or Model blocks as Variant choices|
|Variant Source||Route among multiple inputs using Variants|
|Variant Sink||Route amongst multiple outputs using Variants|
|Manual Variant Source||Switch between multiple variant choices at input|
|Manual Variant Sink||Switch between multiple variant choices at output|
|Specify conditions that control variant selection|
|Class representing a variant configurations data object|
|Class representing a set of Variant Manager functionality|
|Class representing a set of Variant Configuration Analysis functionality|
|Create a variant control variable object|
|Create a variant parameter object|
Single system that caters to multiple variant requirements.
Learn terminology and parameters related to Simulink variants.
Learn how to create a model using Variant blocks.
Learn how to control variant blocks.
Activate, inactivate, or create default variant choices.
Use MATLAB® code to define variant controls.
This example shows different approaches to control the active choice of inline variant and Variant Subsystem blocks from a mask or a model workspace.
Learn basic functionality of variant subsystems.
Represent variant choices in Variant Subsystems.
Propagate variant conditions outside of Variant Subsystem block.
Understand variant condition propagation to conditionally executed systems.
Learn how to convert configurable subsystems to variant subsystems and their behavior on loading.
Control active choice of Variant Subsystem that belongs to a locked custom library.
This example demonstrates how Simulink® automatically displays the mask icon of the active variant block on the parent Variant Subsystem block.
This example shows how the Variant Subsystem block allows function-call signals to be merged on its outports.
Represent variant choices using Inline Variants.
View the variant choices in a model containing Inline Variants.
Define variant choice in Variant Source and Sink blocks.
Propagate variant conditions from the Inline Variants block.
Understand variant condition propagation to virtual and non-virtual subsystems.
Learn about variant condition propagation with conditional subsystem.
Control propagation of variant conditions upstream and downstream.
Understand how to create variant bus, generate code, and variant condition propagation with bus.
This example shows how the Variant Source block allows function-call signals to be merged.
Configure and generate code for a variant model.
Use a central tool to manage variation points of a variants model.
Create variant configuration for a model and validate their accuracy.
Import control variables associated with a model.
Define constraints across models.
Generate models with a subset of variant configurations.
Analyze model references and libraries for each variant configuration in a model containing variant blocks.
Design one model for many systems that differ in block parameter values.
This example shows you how to create simple model with variant parameters.
Learn how to control variant parameters.
This example shows how to change the active values and activation time of variant parameters in a Simulink® model.
A set of concept examples that illustrate some of the Simulink variants capabilities.