Main Content

Justify Violated Blocks from the Model Advisor Check Analysis

Model Advisor Justification Overview

Justifications allows you to add a rationale for violations observed from the Model Advisor analysis to exist. The justified violations are displayed in the report with a new status Justified.

You can add a Model Advisor Justification to any Simulink® elements.

Create Model Advisor Justifications

You can justify a violation when you are building a Simulink diagram (Edit-time violations), or when you complete the Model Advisor check analysis.

Justify violations post Model Advisor check analysis

To justify the Model Advisor violations displayed post check analysis, use these steps:

Workflow for justifying a check in the Model Advisor

  1. From the Check Selector section, select the violated check(s).

  2. Click Justify icon from the toolstrip.

  3. Enter the rationale for justification in the Justifications field on the Result Inspector tab.

  4. Click Add Justification.

Justify edit-time check violations

To justify the edit-time violations displayed during model creation, use these steps:

  1. On the Simulink canvas, hover over a violated block.

  2. Click on the warning icon displayed above the violated block.

    Violation summary is displayed along with the title of the violated check.

    Warning icon above a violated block in the Simulink canvas

  3. Click Suppress. A description field to enter rationale is displayed.

    Warning icon with Suppress button

  4. Enter rationale for the justification.

  5. Click Add Justification.

Manage Justifications

You can view and manage the justifications created when using edit time checking, and post Model Advisor check analysis using the Model Advisor UI. You can perform save, edit, delete actions for the justifications.

Note

To view the Justifications created during edit-time in the Model Advisor UI, you need to run Model Advisor checks from the user interface.

Save Justifications

Justifications are auto-saved in the directory where the model is located. The justification file is by default named with syntax <modelname>_justifications.json.

Note

The path in which a justifications.json is saved is displayed over a banner on the Simulink canvas when you a first justification is created.

Load Justifications

Justifications created and saved for a model are automatically loaded when the model is opened for the next time. Justifications are saved in a json file in the directory where the model is located. The justification file is by default named with syntax <modelname>_justifications.json.

Edit a Justification

To edit the rationale for the justifications:

  1. From the check selector tab, select the justified check.

  2. Open the Result Inspector tab.

  3. Click Edit. Field to edit the existing rationale is enabled.

  4. Edit the rationale.

  5. Click Add Justification.

Delete a Justification

You can delete justifications and set the justified violations to the existing Error or Warning statuses respectively.

To delete a justification:

  1. From the check selector tab, select the justified check.

  2. Open the Result Inspector tab.

  3. Click Delete.

Related Examples

More About