Main Content

Variant Systems

创建自定义模型支持不同版本金宝appspecifications, without duplication

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, seeWhat Are Variants and When to Use Them.

有两种类型的变体,分层和inline. Hierarchical variants are throughVariant Subsystemblocks, whereas Inline Variants are throughVariant SourceandVariant Sinkblocks. Use of aVariant Subsystem块提供了这些优势:

  • Allows you to mixModelandSubsystemblocks as variant systems

  • Supports flexible I/O, so that all variants do not need to have the same number of input and output ports

Blocks

Variant Subsystem, Variant Model Template subsystem containing Subsystem, Model, or Subsystem Reference 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

Classes

Simulink.Variant Specify conditions that control variant selection
Simulink.VariantConfigurationData Class representing a variant configurations data object
Simulink.VariantControl 创造e a variant control variable object
Simulink.VariantVariable 创造e a variant parameter object
Simulink.VariantManager Access Variant Manager functionality programmatically
Simulink.VariantConfigurationAnalysis Analyze variant configurations programmatically

Topics

Introduction to Variants

Variant Subsystem

Inline Variants

Code Generation

Variant Manager

Variant Parameters

Example Models