Main Content

na_0036: Default variant

Sub ID Recommendations

  • NA-MAAB — a, b

  • JMAAB — a, b

MATLAB Versions

All

Rule

Sub ID a

Variant subsystems shall be configured so that one subsystem is always selected. This is achieved by using one of these methods:

  • Use the default variant for the variant.

  • Define conditions that exhaustively cover all possible values of the conditional variables. For example, define conditions for true and false values of a Boolean.

Custom Parameter

Not Applicable

Example — Correct

A default variant is used.

FUNC is a logical type.

Example — Incorrect

An active subsystem will not exist when FUNC is not 1 or 2.

Sub ID b

Model variant conditions shall be set so all values that can be applied to conditional variable signals are configured so one subsystem is always selected. For example, a condition is prepared for the variable signal value being true, as well as false.

Custom Parameter

Not Applicable

Example — Correct

The condition is set so that all values for the conditional variable are covered.

Example — Incorrect

An active subsystem will not exist when FUNC is not 1 or 2.

Rationale

Sub IDs a, b:

  • Prevents the omission of conditions.

  • There may not be an active subsystem when conditions are omitted.

Verification

Model Advisor check: Check use of default variants (Simulink Check)

Last Changed

R2020a

Introduced in R2020a