Use the Model Transformer and the Clone Detector to refactor a model to improve model componentization, readability and enable reuse.
Identify modeling patterns that qualify for transformation into Variant Source or Variant Subsystem blocks. Using Variant Subsystem and Variant Source blocks helps in the reusability of a model for different conditional expressions called variant choices. The active model is a combination of a fixed structure and variable components that you activate depending on the variant choice that you select.
Identify data store blocks that qualify for elimination. Eliminating data store blocks improves model readability by making data dependency explicit.
Identify n-D Lookup Table blocks that qualify for transformation into shared Prelookup blocks and multiple Interpolation blocks. This transformation improves the simulation 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.
|Conditions for findClones function|
|Results of find clones|
|Conditions for clone replacement function|
|Results of replace clones|
|Results of equivalency check|
|Clone Detector||Enable model refactorization and subsystem reuse in models by identifying and replacing clones with library links or subsystem references|
Use the Model Transformer tool to transform a model into a variant system.
Use the Model Transformer tool to make data dependency explicit in a model by replacing data store blocks with either a direct signal line, a Delay block or a Merge block.
Use the Model Transformer tool to convert multiple n-D Lookup Table blocks into shared Prelookup blocks and multiple Interpolation blocks.
Use the Clone Detector app to replace subsystem clones with library blocks.
Use the Clone Detector app to replace exact clones with subsystem reference blocks.
Use the Clone Detection APIs to identify and replace clones in a model.