Documentation

一个ddress Model Check Results

To find warnings or failures in your model:

  • 打开模型sldemo_mdladv。From the toolbar, select分析>模型顾问>模型顾问。选择检查通过产品> simulin金宝appk

  • On the toolbar of the Model Advisor window, clickRun selected checks()。模型顾问在模型中找到警告或失败。

一个ddress 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®块和状态流®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启用突出显示(), selectHighlighting>启用突出显示

选择突出显示功能后,模型窗口和模型顾问突出显示信息窗口打开。模型顾问突出显示信息窗口提供了指向模型顾问窗口的链接,您可以在其中查看检查结果。

黄色的边界

导致检查故障或警告的块。

White with orange border

带有导致检查警告或故障的块的子系统。

White with gray border

Blocks or subsystems without highlighting.

Gray with black border

从支票中排除的块。

白色与黑色边界

从支票中排除的子系统。

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.

一个fter you run a Model Advisor analysis and select the highlighting feature, checks with highlighted results are indicated with an模型顾问窗口中的图标。突出显示不适用于某些检查。选择通过产品> simulin金宝appkdisplays Model Advisor checks in the Model Advisor Highlighting window that do not highlight results.

在里面left pane of the Model Advisor window, select the highlighted checkIdentify unconnected lines, input ports, and output ports。在“模型编辑器”窗口中,模型顾问突出显示了与警告相关的块或组件。在这种情况下,模型顾问发现获得block and an外港块未正确连接到模型。

在里面right pane of the Model Advisor window, there is further information about the warning.

TheRecommended Action建议如何修复警告或者error. In this case, connect the disconnected blocks.

在里面left pane of the Model Advisor window, select the highlighted check确定严格单精制设计的可疑操作。在“模型编辑器”窗口中,模型顾问突出显示了与警告相关的块或组件。在这种情况下,模型顾问发现外港由于设置的设置而使用双重精度配置参数Default for underspecified data type

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

The default input of the外港block is set todouble。模型顾问会产生警告,因为外港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, selectHighlighting>突出显示。If you haveSimulink Check™,您可以为模型顾问检查创建或修改排除。

Fix a Model Check Warning or Failure

当模型或引用模型具有次优条件时,检查可能会失败。警告结果是信息的。您可以解决报告的问题或继续执行下一个任务。有关特定检查为什么不通过的更多信息,请参见该检查的文档。

Manually Fix Warnings or Failures

To manually fix warnings or failures, checks have an Analysis Result box that describes the recommended actions.

  1. 可选地保存模型和数据还原点,以便您可以撤消更改。

  2. 在里面一个nalysis Result box, review the recommended actions to make changes to your model.

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

    When you fix a warning or failure, rerun all checks to update the results of all checks. If you do not rerun all checks, the Model Advisor can report an invalid check result.

自动修复警告或失败

有些检查有一个动作框,您可以使用该框来自动修复故障。该动作框应用了分析结果框中列出的所有推荐动作。

  1. 可选地保存模型和数据还原点,以便您可以撤消更改。

  2. 在里面一个ction box, click修改全部或者调整

    动作结果框显示一个更改表。

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

    When you fix a warning or failure, rerun all checks to update the results of all checks. If you do not rerun all checks, the Model Advisor can report an invalid check result.

Batch-Fix Warnings or Failures

Some checks have an探索结果button that opens the Model Advisor Result Explorer. With the Model Advisor Result Explorer, you can quickly locate, view, and change elements of a model.

模型顾问结果Explorer可帮助您仅修改模型顾问正在检查的项目。

If a check does not pass and you want to explore the results and make batch changes:

  1. 可选地保存模型和数据还原点,以便您可以撤消更改。

  2. 在分析框中,单击探索结果

  3. 在模型顾问结果资源管理器中,您可以修改块参数。

  4. 在里面Model Advisor window, rerun the check to verify that it passes.

    When you fix a warning or failure, rerun all checks to update the results of all checks. If you do not rerun all checks, the Model Advisor can report an invalid check result.

恢复变化

模型顾问提供了一个模型和数据还原点功能,以响应模型顾问的建议而进行的更改。您还可以还原模型顾问的默认配置。一个restore pointis a snapshot in time of the model, base workspace, and Model Advisor. The Model Advisor maintains restore points for the model or subsystem through multiple sessions of MATLAB®

不te

还原点仅保存当前的工作模型,基本工作区变量和模型顾问树。它不会保存其他项目,例如库和引用模型。

还原默认配置

在模型顾问窗口中,选择Settings>还原默认配置

节省还原点

您可以节省还原点并给它一个名称和描述。或者,模型顾问可以命名还原点。

  1. 在模型顾问窗口中,选择文件>节省Restore Point As

  2. 在里面Namefield, enter a name for the restore point.

  3. 在里面描述field, you can optionally add a description to help identify the restore point.

  4. Click节省

    模型顾问节省了当前模型,基本工作区和模型顾问状态的还原点。

要快速保存还原点,请在模型顾问窗口中选择文件>节省Restore Point。模型顾问保存了名称的还原点autosavenn是还原点的顺序数。如果使用此方法,则不能更改还原点的名称,也不能添加描述。

Load a Restore Point

  1. 可选地保存模型和数据还原点,以便您可以撤消更改。

  2. Select文件>Load Restore Point

  3. 在里面Load Model and Data Restore Point dialog box, select the restore point that you want.

  4. ClickLoad

    模型顾问发出警告,即修复会消除您保存还原点后所做的更改。

  5. 要加载您选择的还原点,请单击Load

    The Model Advisor reverts the model, base workspace, and Model Advisor status.

相关话题

这个话题有帮助吗?