이 번역 페이지는 최신 내용을 담고 있지 않습니다. 최신 내용을 영문으로 보려면 여기를 클릭하십시오.
Variant 계층적 구성요소
계층적 Variant 블록을 사용하면 시스템의 모든 설계 대안을 단일 모델로 표현할 수 있습니다. 각 설계의 선택은 개별 계층 구조의 Variant 선택지로 모델에 포함됩니다. 이러한 모델은 고정된 공통 구조와 한정된 세트의 가변 구성요소를 가지며, 가변 구성요소는 Variant 제어에 따라 활성화되거나 비활성화됩니다.
예를 들어, 엔진 구성이 다음과 같이 세 가지로 가능한 차량 모델을 시뮬레이션한다고 가정하겠습니다: 4-실린더 가스, 6-실린더 가스, 8-실린더 가스. Variant Subsystem, Variant Model, Variant Assembly Subsystem 블록 내에 각 엔진 모델을 별도의 서브시스템으로 구현한 다음 사용자가 선택한 Variant 제어에 따라 서브시스템 간에 전환할 수 있습니다. 자세한 내용은 Introduction to Variant Controls 항목을 참조하십시오.
계층적 Variant 블록에 대해 생성한 코드에는 시스템의 모든 Variant 선택지가 포함될 수 있습니다. Activate Variant During Different Stages of Simulation and Code Generation Workflow 항목에 설명한 대로 코드를 컴파일하기 전에 또는 모델을 시작할 때 선택지 간에 전환할 수 있습니다. 계층적 Variant 블록으로 코드를 생성하는 방법에 관한 자세한 내용은 Represent Subsystem and Variant Models in Generated Code (Embedded Coder) 항목을 참조하십시오.
블록
Variant Subsystem, Variant Model, Variant Assembly Subsystem | Template subsystem containing Subsystem, Model, or Subsystem Reference blocks as variant choices |
클래스
Simulink.VariantControl | Create a variant control variable object |
Simulink.Parameter | Store, share, and configure parameter values |
Simulink.Variant | Specify conditions that control variant selection |
함수
enumeration | 클래스의 열거형 멤버와 이름 |
객체
struct | 구조체형 배열 |
도움말 항목
- Variant Control Modes in Variant Blocks
Learn how to control variant blocks.
- Propagate Variant Conditions Outside Variant Subsystems
Propagate variant conditions outside a Variant Subsystem block to adapt its interface according to the state of underlying blocks.
- Use Variant Subsystem Blocks with Conditionally Executed Subsystems
Understand how to use Variant Subsystem blocks with conditionally executed systems as variant choices.
- Variant Function-Call Signals on Variant Subsystem Outport
This example shows how the Variant Subsystem block allows function-call signals from its choice blocks to be merged on its outports.
- Model Reference Variants
This example shows how to use model reference variants.
- Control Active Choice of Locked Custom Library Variant Subsystem Using Mask Parameter
Control active choice of Variant Subsystem that belongs to a locked custom library.
- Add or Remove Variant Choices of Variant Assembly Subsystem Blocks Using External Files
Understand how to add or remove variant choices of the Variant Assembly Subsystem block using external files without modifying model.
- Control Variant Choices in Masked Variant Assembly Subsystem Block Using Mask Parameter Object
Specify variant choices and set an active choice in a masked Variant Assembly Subsystem block.
문제 해결
Convert Configurable Subsystem to Variant Subsystem
Learn how to convert configurable subsystems to variant subsystems and their behavior on loading.
Convert Variant Subsystem to Variant Assembly Subsystem
Steps to convert Variant Subsystem block to Variant Assembly Subsystem block.
Transform Model to Variant System (Simulink Check)
Use the Model Transformer tool to transform a model into a variant system.