Variant Components in Architecture Models
Variant components enable the creation and use of different design alternatives for a system with the purpose of meeting separate sets of requirements in an architecture model. Variant components represent a part of the model that can switch between different variant choices. Variant choices are design alternatives that you can add, analyze, and select as the active choice during simulation. Variant components help you rapidly prototype design choices and build modular subsystems for reuse and customization. For more information on the underlying concepts of variant components, see What Are Variants and When to Use Them.
Create and manage design alternatives by adding variant choices to the Variant Component block. Set the active choice for a Variant Component block, retrieve available choices, and set conditions to activate variant choices programmatically. Use the Variant Manager to view the model hierarchy and manage variant elements in your model. Design and build architecture models capable of deploying different variant choices, and run analysis functions to determine the most effective choice in terms of parameters such as production time.
Blocks
Variant Component | Add components with alternative designs |
Classes
systemcomposer.arch.VariantComponent | Variant component in System Composer model |
Functions
addChoice | Add variant choices to variant component |
addVariantComponent | Add variant components to architecture |
getActiveChoice | Get active choice on variant component |
getChoices | Get available choices in variant component |
getCondition | Return variant control on choice within variant component |
makeVariant | Convert component to variant choice |
makeVariantAssembly | Convert variant component to variant assembly component (Since R2023b) |
setActiveChoice | Set active choice on variant component |
setCondition | Set condition on variant choice |
updatePortsFromChoices | Update ports in Variant Component block to match its variant choices (Since R2024a) |
Topics
- Variant Components
Create multiple variant choices for a component and select a choice using variant controls.
- Variant Assembly Components
Add or remove variant choices to a Variant Assembly Component block from external sources without modifying the model.