Address Model Check Results

After you run the Model Advisor checks to find warnings or failures in your model, you can use the Model Advisor to:

  • Address Model Advisor check results by using highlighting

  • Fix check warnings or failures manually or by using the Model Advisor

Address Model Check Results with Highlighting

To indicate the analysis results for individual Model Advisor checks, use color highlighting on the model diagram. Highlighting is available for Simulink® blocks and Stateflow® charts. Blocks that pass a check, fail a check, or cause a check warning are highlighted in color in the model window. On the toolbar of the Model Advisor window, click Enable highlighting (), select Highlighting > Enable Highlighting.

After selecting the highlighting feature, the model window and a Model Advisor Highlighting information window open. The Model Advisor Highlighting information window provides a link to the Model Advisor window where you can review the check results.

Yellow with orange border

Blocks that cause the check failure or warning.

White with orange border

Subsystem with blocks that cause the check warning or failure.

White with gray border

Blocks or subsystems without highlighting.

Gray with black border

Blocks that are excluded from the check.

White with black border

Subsystems that are excluded from the check.

If a check warns or fails, and the model window highlights blocks in gray, closely examine the results in the Model Advisor window. A Model Advisor check can fail or warn due to your parameter or diagnostic settings.

After you run a Model Advisor analysis and select the highlighting feature, checks with highlighted results are indicated with an icon in the Model Advisor window. Highlighting is not available for some checks. Selecting By Product > Simulink displays Model Advisor checks in the Model Advisor Highlighting window that do not highlight results.

In the left pane of the Model Advisor window, select the highlighted check Identify unconnected lines, input ports, and output ports. In the model editor window, the Model Advisor highlights the blocks or components related to the warning. In this case, the Model Advisor finds a Gain block and an Outport block not properly connected to the model.

In the right pane of the Model Advisor window, there is further information about the warning.

The Recommended Action suggests how to fix the warning or error. In this case, connect the disconnected blocks.

In the left pane of the Model Advisor window, select the highlighted check Identify questionable operations for strict single-precision design. In the model editor window, the Model Advisor highlights the blocks or components related to the warning. In this case, the Model Advisor finds an Outport block that uses double precision due to a setting of the Default for underspecified data type configuration parameter.

In the right pane of the Model Advisor window, you see further detail on the single-precision warning.

The default input of the Outport block is set to double. Model Advisor generates a warning because the Outport block is not connected to another block. After reviewing the check results in the model window and the Model Advisor window, you can choose to fix warnings or failures.

To view model blocks that are excluded from the Model Advisor checks, on the Model Advisor window toolbar, select Highlighting > Highlight Exclusions. If you have Simulink Check™, you can create or modify exclusions to the Model Advisor checks.

Fix a Model Advisor Check Warning or Failure

The Model Advisor check results identify model elements that are being flagged by the Model Advisor check. You can either manually fix the issues or use the Model Advisor to automatically apply a fix.

For more information on why a specific check does not pass, see the documentation for that check.

  1. In the Model Advisor results, review the results of the analysis.

  2. Fix the warning of failure by using one of these methods:

    1. To manually fix an issue, use the hyperlinks to open model elements that are being flagged by the Model Advisor check. You can also apply batch changes to model parameters from the command line.

    2. To use the Model Advisor to automatically fix an issue, in the Action box, click Modify All or Modify. The Action Result box displays a table of changes.

  3. To verify that the check passes, rerun the check.

    Note

    After you finish addressing all warning or failures, it is important that you rerun all checks to verify that there are no additional issues.

Related Examples

More About