Contenuto principale

Simulink Design Information

R2026b
Since R2026b

Metric ID

sldesignlayer.SimulinkDesignInfo

Description

This metric summarizes design information for Simulink® models and subsystems. The metric combines several Simulink design metrics into a single result to help you assess size, architecture, and complexity of your block diagrams and subsystems.

For each Simulink design layer, the metric returns the:

  • Number of Simulink blocks, excluding Inport, Outport, From, and Goto blocks

  • Number of Simulink decisions

  • Number of Goto blocks

  • Number of interface ports

  • Number of Simulink signal lines

  • Halstead complexity metrics, including operators, operands, volume and difficulty

A Simulink design layer is an artifact, such as a block diagram or subsystem, that has its own canvas in Simulink.

Supported Artifacts

You can collect this metric for Units and Components. To control what the dashboard classifies as a unit or component, see Categorize Models in Hierarchy as Components or Units.

Computation Details

The metric combines metric data from these individual metrics:

Collection

To collect data for this metric, execute the metric engine using the metric ID.

metric_engine = metric.Engine;
results = execute(metric_engine,"sldesignlayer.SimulinkDesignInfo")

Results

The metric returns results for each Simulink design layer in the units and components in your project. For each design layer, the metric returns a metric.Result object.

The Value property is a structure with these fields:

  • Blocks — Number of Simulink blocks

  • Decisions — Number of Simulink decisions

  • Gotos — Number of Goto blocks

  • InterfacePorts — Structure with fields:

    • In — Number of Inport blocks

    • Out — Number of Outport blocks

  • SignalLines — Number of Simulink signal lines

  • Halstead — Structure with fields:

    • TotalOperators — Number of Simulink blocks

    • UniqueOperators — Number of unique Simulink blocks

    • TotalOperands — Number of inports and outports

    • UniqueOperands — Number of output signals from each Simulink block

    • Volume — Size of the design layer

    • Difficulty — Estimate of how difficult the design layer is to read and write

See Also

Objects

Functions

Topics