Main Content

Check usage of identical modeling patterns

Check ID: mathworks.hism.hisl_0078

Description

This check identifies identical or similar modeling patterns (clones) in a model that can increase model complexity, complexity of generated code, and testing effort.

  • Modeling patterns – Group of blocks and signal line connections.

  • Identical modeling patterns – Modeling patterns that have identical blocks, signal connections, and parameter values.

  • Similar modeling patterns – Modeling patterns that have identical block types and connections, but can have different block parameter values or signal names.

Note

You can manage the parameters evaluated during the clone detection analysis by using the Clone Detector app.

This check identifies two types of modeling patterns in the model:

  • Similar or identical modeling patterns or subsystems that have already been componentized and have no mapped duplicates in the model.

    • While running the check on a model, it looks for similar modeling patterns, subsystems, or charts in the library models linked to it.

    • In the Model Advisor report, the check provides a list of groups of blocks, signal lines, subsystems, or charts that are not linked and includes recommended links to existing library subsystems.

  • Similar or identical subsystems in the model that can be componentized and reused.

    • In the Model Advisor report, the check provides a list of groups of subsystems or charts for which libraries can be created, and these groups can be replaced with new library links.

Available with Simulink® Check™.

Results and Recommended Actions

ConditionRecommended Action
The model consists of subsystems, charts, or group of model elements that are similar or identical to the existing libraries.Replace them with links from the existing library blocks.
The model consists of a group of identical or similar subsystems or charts that do not have an existing pattern in the library.Create library blocks for a group of subsystems or charts and replace them with links to those library blocks.
Results for similar modeling patterns are not flagged.Use the Clone Detector app to manage the conditions evaluated during the clone detection analysis.

Note

Apart from the Model Advisor exclusions, Clone Detection Exclusions are also considered and displayed in the report.

Note

When the check is run, both library and subsystem clones are displayed in a single report. However, the Clone Detector app supports reporting of either library or subsystem clones at a time.

Capabilities and Limitations

  • Allows exclusions of blocks and charts.

  • Does not support beyond library clones and subsystem clones in the model.

  • Does not detect modeling patterns inside charts.

  • Does not detect clones.

See Also