Variant Terminology
Simulink® variant terminology helps you to understand various parameters and terms.
Variant Terminology | Description |
---|---|
Variant Subsystem, Variant Model, Variant Assembly Subsystem | Contains one or more choices where each choice is a Subsystem or Model block. |
Variant Source | Provides variation on the source of a signal. |
Variant Sink | Provides variation on the sink (destination) of a signal. |
Variant Model | Variant Subsystem block containing Model block as variant choices. See Variant Subsystem, Variant Model, Variant Assembly Subsystem. |
Active choice | Variant choice associated with a variant control that evaluates to
true . |
Variant control mode |
|
Variant control variable | MATLAB® variable, Simulink.Variant object, or a
Simulink.Parameter object. See Types of Variant Control Variables (Operands) in Variant Blocks. |
Variant object | Container of variant control expression. See Simulink.Variant . |
Variant Manager | Central tool that allows you to manage various variation points that are modeled using variant blocks in a system model. |
Variant Reducer | Reduces variant models to simplified, standalone model depending on the selected variant configurations. |
Variant Configuration, Variant Configuration data object | A variant configuration consists of a named set of variant control variables, their values, and configurations to be used by referenced models. It can be used to activate a variation of a Simulink model. A variant configuration data object
(instance of the
You can create new variant configurations and group them
into a variant configuration data object from Variant Manager or
programmatically using the To
associate the variant configuration data object to a model, use the
Export variant configuration data object functionality in Variant
Manager, or use the variantConfig = Simulink.VariantConfigurationData; set_param(model, 'VariantConfigurationObject',... 'variantConfig'); |
Command Line Parameters
Variant Subsystem Parameters
Parameter name | Description |
---|---|
Variant | Used to check if the subsystem is a Variant
Subsystem block. Returns This is a read-only parameter. |
VariantChoices | Gets the list of variant choices in a Variant
Subsystem block. Example: Returns a 1-by-N struct array with fields:
This is a read-only parameter. |
VariantControl | Subsystem block and Model block parameter, which applies to a choice block of a Variant Subsystem block and returns the variant control for the choice block.
|
VariantControlMode | Specifies the mode for modeling Variant blocks, which can
be either
See Variant control mode. |
LabelModeActiveChoice | Returns the variant control label of the selected choice
for the Variant Subsystem block when
|
TreatAsGroupedWhenPropagatingVariantConditions | Returns
See Propagate Variant Conditions to Define Variant Regions in Virtual and Nonvirtual Subsystems. |
GeneratePreprocessorConditionals
| Indicates if all the choices are to be analyzed and
preprocessor conditionals to be generated by returning
Note Use the Variant activation time parameter instead.
|
CompiledActiveChoiceControl | Returns the variant control corresponding to the active
choice of the Variant Subsystem block and returns
empty This is a read-only parameter. |
CompiledActiveChoiceBlock | Returns the full block path name of the active
Variant Subsystem block choice and returns
empty This is a read-only parameter. |
CompiledVariantInfo | Block parameter that indicates the variant activeness of a
block after model compilation. Returns a
structure with three fields, with values set to
For an example, see Identify Variant Activeness of a Block After Model Compilation. This is a read-only parameter. |
CompiledVariantActivationTime | Returns the variant activation time of the block after
model compilation. Before the model is compiled, this parameter
returns update diagram activation time. Example:
This is a read-only parameter. |
PropagateVariantConditions | Indicates if conditions on ports inside the Variant Subsystem block are to be propagated outside the block.
|
AllowZeroVariantControls
| Indicates if the Variant Subsystem block is allowed to have no active choices.
|
VariantActivationTime | Determines if Simulink sets the active choice of a Variant Subsystem block during update diagram or code compile.
Note The
|
VariantControlVariable | Specifies the variant control variable of a Variant
Assembly Subsystem block that is in
|
VariantChoicesEnumeration | Specifies the variant choices of a Variant Assembly
Subsystem block that is in
|
VariantChoicesSpecifier | Specifies the variant choices of a Variant Assembly
Subsystem block that is in
|
AllowFlexibleInterface | Indicates if the Variant Subsystem block has a flexible interface.
|
Variant Source and Variant Sink Parameters
Parameter name | Description |
---|---|
VariantControls | Returns a
|
VariantControlMode | Specifies the mode for modeling variant blocks, which can
be either
See Variant control mode. |
LabelModeActiveChoice | Returns the variant control label of the selected choice
for Variant Source or Variant Sink
block when
|
GeneratePreprocessorConditionals
| Indicates if all the choices are to be analyzed and
preprocessor conditionals to be generated by returning
Note Use the Variant activation time parameter instead.
|
ShowConditionOnBlock | Indicates if the
|
AllowZeroVariantControls
| Indicates if the block is allowed to have no active ports
by returning
|
CompiledActiveVariantControl
| Returns the variant control corresponding to the active
port from the last compilation instance. If no port is active,
returns empty This is a read-only parameter. |
CompiledActiveVariantPort | Returns the "index" of the active port from the last
compilation instance or returns This is a read-only parameter. |
CompiledVariantActivationTime | Returns the variant activation time of the block after
model compilation. Before the model is compiled, this parameter
returns update diagram activation time. Example:
This is a read-only parameter. |
OutputFunctionCall | Indicates if the Variant Source or Variant Sink blocks are allowed to output function-call signals.
See Output function call. |