Main Content

Simulink Decision Count

Metric ID

slcomp.SimulinkDecisions

Description

Use this metric to count the number of Simulink® decisions in the Simulink blocks in each layer of a unit or component.

Decision Counts for Common Block Types

The following table shows how the metric calculates the decision count for common Simulink blocks.

 Decision Counts Table

Computation Details

The metric is a heuristic that estimates the number of Simulink decisions. The calculated decision count is not exact.

The metric:

  • Includes active and inactive variants in the decision count.

  • Does not include commented blocks in the decision count.

  • Does not compile the model. The metric only considers static information.

  • Does not resolve parameters. For example, if you specify a block parameter using a variable, the metric does not resolve the parameter to the variable value because that would require the metric to compile the model.

The metric aligns with the decision coverage returned by Simulink Coverage™. For information, see Model Objects That Receive Coverage (Simulink Coverage).

Collection

To collect data for this metric, use getMetrics with the metric identifier slcomp.SimulinkDecisions.

Results

For this metric, instances of metric.Result return Value as the number of Simulink decisions in the Simulink blocks in each layer of a unit or component.

Examples

To see the number of Simulink decisions associated with different block types, see Decision Counts for Common Block Types.

See Also

| | |

Related Topics