Organize Checks and Folders Using the Model Advisor Configuration Editor

Overview of the Model Advisor Configuration Editor

The Model Advisor Configuration Editor allows you to specify the checks that you want to use for edit-time checking, as well as the checks included in the Model Advisor. The Model Advisor Configuration Editor interface consists of two windows, the Model Advisor Configuration Editor and Model Advisor Check Browser

The Model Advisor Configuration Editor window contains two panes:

  • Hierarchy - Lists the checks and folders in the current configuration

  • Workflow - Defines the common workflow you use to create a custom configuration

You can use the Show field to specify the Model Advisor checks that are included in the hierarchy:

  • Edit-Time Supported Checks ― hierarchy only includes the Model Advisor checks that are supported as edit-time checks

  • All checks ― hierarchy includes all of the Model Advisor checks

Model Advisor Configuration Editor

When you select a folder or check in the hierarchy, the Workflow pane changes to display information about the check or folder. You can change the display name of the check or folder in this pane.

The Model Advisor Check Browser window includes a read-only list of available checks. If you delete a check in the Model Advisor Configuration Editor, you can retrieve a copy of it from the Model Advisor Check Browser.

Model Advisor Check Browser

This table specifies additional actions you can perform by using the Model Advisor Configuration Editor.

To...Select...
Create new configurationsFile > New
Find checks and folders in the Model Advisor Check BrowserView > Check Browser
Add checks and folders to the configurationEdit > Copy
Edit > Paste
Edit > New folder
The check or folder and drag and drop
Remove checks and folders from the configurationEdit > Delete
Edit > Cut
Reorder checks and foldersEdit > Move up
Edit > Move down
The check or folder and drag and drop

Rename checks and folders

Note

MathWorks® folder display names are restricted. When you rename a folder, you cannot use the restricted display names.

The check or folder and edit Display Name in right pane.

Allow or gray out the check box control for checks and folders

Tip

This capability is equivalent to enabling checks, described in Display and Enable Checks.

Edit > Enable
Edit > Disable
Save the configuration as a MAT file for use and distributionFile > Save
File > Save As
Set the configuration so it opens by default in the Model AdvisorFile > Set Current Configuration as Default
Restore the MathWorks default configurationFile > Restore Default Configuration
Load and edit saved configurationsFile > Open

Open the Model Advisor Configuration Editor

Prior to opening the Model Advisor Configuration Editor, verify that the current folder is writable. If the folder is not writable, you see an error message when you start the Model Advisor Configuration Editor.

Note

  • The Model Advisor Configuration Editor uses the slprj folder in the code generation folder (Simulink). If the slprj folder does not exist in the code generation folder, the Model Advisor Configuration Editor creates it.

  1. To include custom checks in the new Model Advisor configuration, update the Simulink® environment to include your sl_customization.m file.

  2. Start the Model Advisor Configuration Editor using one of these methods:

    • Programmatically ― At the MATLAB® command line, enter Simulink.ModelAdvisor.openConfigUI.

    • From the Simulink editor ― In the Modeling tab, select Model Advisor > Customize Edit-time Checks

    • From the Model Advisor ― Select Settings > Open Configuration Editor

    The Model Advisor Configuration Editor and Model Advisor Check Browser windows open.

  3. To specify the Model Advisor checks that you want to include in the Configuration Editor hierarchy, in the Show field, select:

    • Edit-Time Supported Checks ― hierarchy only includes the Model Advisor checks that are supported as edit-time checks

    • All checks ― hierarchy includes all of the Model Advisor checks

Organize Checks and Folders Using the Model Advisor Configuration Editor

The following tutorial steps you through creating a custom configuration.

  1. Open the Model Advisor Configuration Editor.

  2. In the Model Advisor Configuration Editor, in the left pane, delete the By Product and By Task folders, to start with a blank configuration.

  3. Select the root node, which is labeled Model Advisor Configuration Editor.

  4. In the toolbar, click the New Folder button to create a folder.

  5. In the left pane, select the new folder.

  6. In the right pane, edit Display Name to rename the folder. For the purposes of this tutorial, rename the folder to Review Optimizations.

  7. In the Model Advisor Check Browser window, in the Find field, enter optimization to find Simulink > Check optimization settings.

  8. Drag and drop Check optimization settings into Review Optimizations.

  9. In the Model Advisor Check Browser window, find Simulink Check > Modeling Standards > DO-178C/DO-331Checks > Check safety-related optimization settings.

  10. Drag and drop Check safety-related optimization settings into Review Optimizations.

  11. In the Model Advisor Configuration Editor window, expand Review Optimizations.

  12. Rename Check optimization settings to Check Simulink optimization settings.

  13. Select File > Save As to save the configuration.

  14. Name the configuration optimization_configuration.mat.

  15. Close the Model Advisor Configuration Editor window.

Tip

To move a check to the first position in a folder:

  1. Drag the check to the second position.

  2. Right-click the check and select Move up.

See Also

|

Related Topics