Model References - MATLAB & Simulink (original) (raw)

Reuse models as blocks in other models

A model reference is a reference to another model using aModel block. These references create model hierarchy. Each referenced model has a defined interface that specifies the properties of its inputs and outputs. The defined interface makes the behavior of the referenced model independent of its context in the model hierarchy. Model references are ideal for code reuse, unit testing, parallel builds, and large components. They can also reduce file contention and merge issues.

To determine whether referenced models meet your modeling requirements, see Component-Based Modeling Guidelines.

To learn about code generation for model reference hierarchies, see Referenced Models (Simulink Coder).

To create a protected model, see Model Protection (Simulink Coder).

To perform SIL/PIL testing for a model reference hierarchy, see SIL and PIL Simulations (Embedded Coder).

Blocks

Model Reference another model to create model hierarchy
Variant Subsystem Template subsystem containing Subsystem blocks as variant choices

Functions

Model Settings

Tools

Topics

Determine When to Reference Models

Create Model References

Configure Model References

Simulate Model Hierarchies