Main Content

Variant Systems

Design models from which you can generate reusable code

With Variants, you can manage design alternatives within a single model by conditionally manifesting its components. Use variant blocks, variant parameters, and symbolic dimensions in your models to implement and explore different variation options. Variants in the generated code foster code reuse and allow configuration for different stages of development, accommodating various development implementation objectives, and testing needs, and effectively providing multifunctional code for third parties to leverage. For information on applying simulation workflows with variants in your model, see What Are Variants and When to Use Them.

Capabilities of variant code generation include:

  • Reuse code for a group of models that have similar functionality but with small differences.

  • Share code with third parties that have multiple variations, allowing them to select and use the variant that best fits their needs.

  • Validate the supported variants for a model and then choose to activate one variant for a particular application, without regenerating and re-validating the code.

  • Allows for the automatic generation of code specific to each variant, reducing manual effort and ensuring accurate implementation of functionality specific to each variant.

For information on variant capabilities at various stages of the development process, see V-Model for System Development with Simulink Variants

Categories