Main Content

Check Model Compliance by Using the Model Advisor

Model Advisor Overview

The Model Advisor checks your model or subsystem for modeling conditions and configuration settings that cause inaccurate or inefficient simulation of the system that the model represents. The Model Advisor checks can help you verify compliance with industry standards and guidelines. By using the Model Advisor, you can implement consistent modeling guidelines across projects and development teams.

Upon completing the analysis of your model, the Model Advisor produces a report that lists the suboptimal conditions, settings, and modeling techniques and proposes solutions, when applicable.

You can use the Model Advisor to check your model in these ways:

  • Interactively run Model Advisor checks

  • Configure the Model Advisor to automatically run edit-time checks (requires万博1manbetx®Check™)

These limitations apply when you use the Model Advisor to check your model. For limitations that apply to specific checks, see the Capabilities and Limitations section in the check documentation.

  • If you rename a system, you must restart the Model Advisor to check that system.

  • In systems that contain a variant subsystem, the Model Advisor checks the active subsystem. To check both the active and inactive subsystems, set theAdvisor.Applicationproperty,AnalyzeVariants, totrue.

  • Model Advisor does not analyze commented blocks.

  • Checks do not search inmodelblocks orsubsystemblocks with the block parameterRead/Writeset toNoReadorWrite. However, on a check-by-check basis, Model Advisor checks do search in library blocks and masked subsystems.

  • Unless specified otherwise in the documentation for a check, the Model Advisor does not analyze the contents of aModelblock. To run checks on referenced models, use instances of theAdvisor.Applicationclass (Simulink Check license required).

Note

Software is inherently complex and may not be free of errors. Model Advisor checks might contain bugs. MathWorks®reports known bugs brought to its attention on its Bug Report system at//www.tianjin-qmedu.com/support/bugreports/. The bug reports are an integral part of the documentation for each release. Examine bug reports for a release as such reports may identify inconsistencies between the actual behavior of a release you are using and the behavior described in this documentation.

While applying Model Advisor checks to your model increases the likelihood that your model does not violate certain modeling standards or guidelines, their application cannot guarantee that the system being developed will be safe or error-free. It is ultimately your responsibility to verify, using multiple methods, that the system being developed provides its intended functionality and does not include unintended functionality.

Model Advisor Checks Documentation

The Model Advisor only displays the checks for your installed products. This table provides links to the product-specific check documentation. A product license may be required to review some of the documentation.

Product Model Advisor Check Documentation
万博1manbetx Simulink Checks
Embedded Coder® Embedded Coder Checks(Embedded Coder)
AUTOSAR Blockset AUTOSAR Blockset Checks(AUTOSAR Blockset)
Simulink Coder™ Simulink Coder Checks(Simulink Coder)
HDL Coder™ HDL Code Advisor Checks(HDL Coder)
Simulink Code Inspector™ Simulink Code Inspector Checks(Simulink Code Inspector)
Simulink Check

DO-178C/DO-331 Checks

IEC 61508, IEC 62304, ISO 26262, ISO 25119, and EN 50128/EN 50657 Checks

Model Checks for DO-254 Standard Compliance

High Integrity System Modeling Checks

Model Advisor Checks for MAB and JMAAB Compliance

MISRA C:2012 Checks

Secure Coding Checks for CERT C, CWE, and ISO/IEC TS 17961 Standards

Model Metrics

Simulink Design Verifier™ Simulink Design Verifier Checks(Simulink Design Verifier)
Simulink PLC Coder™ PLC Model Advisor Checks(Simulink PLC Coder)
Requirements Toolbox™ Requirements Consistency Checks(Requirements Toolbox)
Simscape™ Documentation is available only in the Model Advisor. To review the documentation for the check, in the Model Advisor, right-click on the check title and selectWhat's This?
Simulink Control Design™ Simulink Control Design Checks(Simulink Control Design)
IEC Certification Kit

IEC Certification Kit Checks(IEC Certification Kit)

做资格工具包

做资格工具包Checks(DO Qualification Kit)

Run Model Advisor Checks and Review Results

You can use the Model Advisor to check your model interactively against modeling standards and guidelines. The following example uses thesldemo_mdladvmodel to demonstrate the execution of the Model Advisor checks using the Model Advisor.

  1. Open the Model Advisor example modelsldemo_mdladv.

  2. To open the Model Advisor, in the Simulink editor, click theModelingtab and selectModel Advisor. ASystem Selector ― Model Advisordialog box opens. Select the model or system that you want to review and clickOK.

  3. In the left pane of the Model Advisor, select the checks you want to run on your model:

    1. You can select the checks by using theBy ProductorBy Taskfolders.

      • Show By Product Folder― Displays checks available for each product

      • Show By Task Folder― Displays checks related to specific tasks

    Checks with the iconUpdate Diagram icontrigger an update of the model diagram.

    Checks with the iconExtensive Analysis icontrigger an extensive analysis of the model. Checks that trigger extensive analysis of the model use additional analysis techniques, such as analysis withSimulink Design Verifier.

  4. Click on the folder that contains the checks and, on the toolstrip, selectRun Checksto execute the analysis. To run a single check, right-click the check in the folder and selectRun This Check.

  5. View the results on the Model Advisor User Interface. This table shows the common check status results; notice that different icons are used depending on the parameter set forCheck result when issues are flaggedin the Model Advisor Configuration Editor (requires aSimulink Checklicense). For more information about this parameter, seeSpecify Parameters for Check Customization.

    Check Result Status

    Icon Description

    Passed

    Pass icon when the flag for checks result is set to warning

    Model does not have any violations for the given check(s).

    Failed

    Fail icon

    Check has identified severe violations.

    Warning

    Warning icon

    Check has identified violations.

    Justified

    justification icon

    Check violations are justified.

    Not Run

    Not Run icon

    Check not selected for Model Advisor analysis.

    Incomplete

    Incomplete icon

    Check analysis is incomplete or check execution has resulted in exceptions.

  6. Fix the warnings or failures as desired. For more information, seeAddress Model Check Results.

  7. Use theExclusions3月的标签审核检查ked for exclusion from the analysis.

  8. View and save the report. For additional information, seeSave and View Model Advisor Check ReportsandGenerate Model Advisor Reports.

Related Topics