Simulink.VariantConfigurationAnalysis
Analyze variant configurations
Description
Add-On Required: This feature requires the Variant Manager for Simulink add-on.
Use the Simulink.VariantConfigurationAnalysis object to analyze
variant configurations for a model by specifying either named variant configurations or
variable groups.
The variant configuration analysis object has functions that can be used to:
Compare different variant configurations for a model to understand the model elements used in each.
Check if all variant choices have been activated at least once and whether the model is covered completely for simulation and code generation.
Verify if the active, implemented model is different between different variant configurations.
Find dependent model artifacts such as referenced models and libraries used by a particular variant configuration.
Creation
Use either the Simulink.VariantConfigurationAnalysis function
(described here) or the Simulink.VariantManager.analyzeModel function to create a
VariantConfigurationAnalysis object.
Description
analyzes the model specified by varConfigAnalysisObj = Simulink.VariantConfigurationAnalysis(model,Name=Value)model using the options specified by
name-value arguments. The function returns a variant configuration analysis object for the
model and sets the ModelName and Configurations
properties.
Input Arguments
Name-Value Arguments
Properties
Object Functions
getActiveBlocks | List of active blocks in a named variant configuration |
getAlwaysActiveBlocks | List of blocks that are always active across named variant configurations |
getBlockDifferences | List of blocks that differ in their active choice between multiple named variant configurations |
getDependentLibraries | List of libraries used in a named variant configuration |
getDependentModels | List of dependent models used in a named variant configuration |
getNeverActiveBlocks | List of blocks that are inactive in named variant configurations |
getVariantCondition | Variant condition on a block in a named variant configuration |
showUI | Show variant configuration analysis report for a model |
hideUI | Hide variant configuration analysis report for a model |
Examples
Limitations
Variant Analyzer does not support models that contain variant blocks that use variant control variables defined in the mask or model workspace.
Version History
Introduced in R2019a