This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

Simulink.ModelAdvisor

Run Model Advisor from MATLAB file

Description

To run the Model Advisor, use instances of this class in MATLAB® programs. For example, you can perform a standard set of checks.

Many Simulink.ModelAdvisor object methods require or return IDs. An ID is a unique identifier for a Model Advisor check, task, or group. IDs must remain constant. A Simulink.ModelAdvisor object includes methods that enable you to retrieve the ID or IDs for:

  • All checks, tasks, and groups

  • Checks belonging to groups and tasks

  • The active check

  • Selected checks, tasks, and groups

To find check IDs in the Model Advisor, use the check context menu.

FindAction
Check Title, ID, or location of the MATLAB source code
  1. On the model window toolbar, select Settings > Preferences.

  2. In the Model Advisor Preferences dialog box, select Show Source Tab.

  3. In the right pane of the Model Advisor window, click the Source tab. The Model Advisor window displays the check Title, TitleId, and location of the MATLAB source code for the check.

Check ID
  1. In the left pane of the Model Advisor, select the check.

  2. Right-click the check name and select Send Check ID to Workspace. The ID is displayed in the Command Window and sent to the base workspace.

Check IDs for selected checks in a folder
  1. In the left pane of the Model Advisor, select the checks for which you want IDs. Clear the other checks in the folder.

  2. Right-click the folder and select Send Check ID to Workspace. An array of the selected check IDs are sent to the base workspace.

Creation

Syntax

ma = Simulink.ModelAdvisor.getModelAdvisor(system)

Description

MATLAB creates an instance of this object for each model that you open in the current MATLAB session. To get a handle to a model's Model Advisor object, execute this command: ma = Simulink.ModelAdvisor.getModelAdvisor(system) where system is the name of the model or subsystem that you want to check. Your program can then use the Model Advisor object methods to initialize and run the Model Advisor checks.

Input Arguments

expand all

Model or subsystem that the Model Advisor checks.

Data Types: char

Properties

expand all

A value of true displays input parameters in the Model Advisor report. A value of false does not display input parameters in the Model Advisor report.

Data Types: char

Object Functions

closeReport Close Model Advisor report
deselectCheck Clear Model Advisor check
deselectCheckAll Clear Model Advisor checks
deselectCheckForGroup Clear Model Advisor checks for groups
deselectCheckForTask Clear Model Advisor checks that belong to a specified task or set of tasks
deselectTask Clear Model Advisor checks that belong to a specified task or set of tasks
deselectTaskAll Clear all Model Advisor tasks
displayReport Display report in Model Advisor window
exportReport Create copy of Model Advisor report
filterResultWithExclusion Filter excluded objects
getBaselineMode Determine whether Model Advisor is in baseline data generation mode
getCheckAll Get check IDs of all Model Advisor checks
getCheckForGroup Get checks belonging to Model Advisor check group
getCheckForTask Get checks belonging to a task
getCheckResult Get Model Advisor check results
getCheckResultDataObtain Model Advisor check result data
getCheckResultStatusObtain Model Advisor check result status
getGroupAll Get all groups of checks that Model Advisor runs
getInputParameters Get Model Advisor check input parameters
getListViewParameters Get Model Advisor checklist parameters displayed in checklist view
Simulink.ModelAdvisor.getModelAdvisor Get Model Advisor object for system or subsystem
getSelectedCheck Get currently selected Model Advisor checks
getSelectedSystem Get system that Model Advisor targets
getSelectedTask Get selected Model Advisor tasks
getTaskAll Get tasks run by Model Advisor
Simulink.ModelAdvisor.openConfigUI Starts Model Advisor Configuration Editor
Simulink.ModelAdvisor.reportExists Determine whether Model Advisor report exists for model or subsystem
runCheck Run currently selected checks
runTask Run currently selected tasks
selectCheck Select checks
selectCheckAll Select all checks
selectCheckForGroup Select check group
selectCheckForTask Select checks for a specific task or tasks
selectTask Select Model Advisor task
selectTaskAll Select all Model Advisor tasks
setActionEnableSet status for check action
setBaselineMode Set Model Advisor baseline mode
setCheckErrorSeverity Set severity of check failure
setCheckResult Set result for currently running check
setCheckResultData Set result data for currently running check
setCheckResultStatus Set status for currently running check
setListViewParameters Specify list-view parameters for check
setInputParametersSpecify input parameters
verifyCheckRan Verify that Model Advisor ran a set of checks
verifyCheckResult Generate baseline Model Advisor check results file or compare current check results to baseline check results
verifyCheckResultStatus Verify that a model passed or failed a set of checks
verifyHTML Generate baseline Model Advisor report or compare current report to baseline report

See Also

Introduced in R2006a