Refactor Models
Use the Model Transformer and the Clone Detector to refactor a model to improve model componentization, readability and enable reuse.
Use the Model Transformer to:
Identify modeling patterns that qualify for transformation into Variant Source or Variant Subsystem blocks. Using变体子系统和Variant Source块有助于对模型的可重复使用,以获取称为变体选择的不同条件表达式。活动模型是固定结构和可变组件的组合,您可以根据您选择的变体选择而激活。
确定有资格消除的数据存储块。消除数据存储块通过明确使数据依赖性提高模型可读性。
Identify n-D Lookup Table blocks that qualify for transformation into sharedPrelookupblocks and multiple插值块。This transformation improves the simulation efficiency.
识别多个插值使用Prelookup提单ocks that qualify for transformation into a single Interpolation Using Prelookup block in a modeling pattern. This transformation improves the generated code efficiency.
使用克隆探测器来:
Identify clones and create a model with the clones replaced by links to the subsystem blocks in a library. Replacing clones with links to library blocks enables component reuse.
用子系统参考识别并替换模型中的克隆。
Functions
Classes
Apps
Clone Detector | 通过使用库链接或子系统参考来识别和替换克隆,启用模型中的模型重构和子系统重复使用 |
Topics
Model Transformer
- Transform Model to Variant System
使用模型变压器工具将模型转换为变体系统。 - 通过消除本地数据存储块来提高模型的可读性
使用模型变压器工具通过用直接信号行替换数据存储块来使数据依赖性在模型中明确说明Delayblock or aMergeblock. - 通过优化查找表块的预序操作来提高模拟效率
Use the Model Transformer tool to convert multiplen-D Lookup Tableblocks into sharedPrelookupblocks and multiple插值块。 - Improve Code Efficiency by Merging Multiple Interpolation Using Prelookup Blocks
Use the Model Transformer tool to transform a modeling pattern with multiple插值Using Prelookupblocks into a single插值Using Prelookupblock.
Clone Detector
- Enable Component Reuse by Using Clone Detection
Use the Clone Detector app to replace subsystem clones with library blocks. - Replace Exact Clones with Subsystem Reference
使用克隆检测器应用程序将精确的克隆替换为子系统参考块。 - Detect and Replace Subsystem Clones Programmatically
Use the Clone Detection APIs to identify and replace subsystem clones in a model. - 在模型中找到克隆
使用克隆探测器识别和替换整个模型的克隆。