主要内容

Validate Requirements Links

Validate Requirements Links in a Model

检查与模型顾问的要求链接

To make sure that every requirements link in your Simulink®模型在需求文档中具有有效的目标,运行模型顾问要求一致性检查:

  1. Open the example model:

    slvnvdemo_fuelsys_officereq
  2. 打开模型顾问以进行一致性检查。在里面Appstab, click要求Manager。在里面要求tab, clickCheck Consistency

    在里面要求Consistency Checkingcategory, all the checks are selected. For this tutorial, keep all the checks selected.

    这se checks identify the following problems with your model requirements.

    Consistency Check Problem Identified
    Identify requirement links with missing documents 模型顾问找不到需求文件。这可能表明需求文档的路径有问题。
    Identify requirement links that specify invalid locations within documents

    这Model Advisor cannot find the designated location for the requirement. This check is implemented for:

    • Microsoft®Worddocuments

    • Microsoft Excel®documents

    • IBM®Rational®®documents

    • Simulink objects

    Identify selection-based links having description fields that do not match their requirements document text

    Description链接的字段与要求文档文本不匹配。创建基于选择的链接时,需求管理接口(RMI)将所选文本保存在链接中Descriptionfield. This check is implemented for:

    • Microsoft Worddocuments

    • Microsoft Exceldocuments

    • IBM理性门文件

    • Simulink objects

    Identify requirement links with path type inconsistent with preferences

    这path to the requirements document does not match theDocument file referencefield in the Requirements Settings dialog box选择林kingtab. This might indicate a problem with the path to the requirements document.

    On Linux®系统,此检查是命名的Identify requirement links with absolute path type。这check reports a warning for each requirements links that uses an absolute path.

    不te

    For information about how the RMI resolves the path to the requirements document, see文档路径存储

    这Model Advisor checks to see if any applications that have link targets are running:

    • If your model has links toMicrosoft Word或者Microsoft Exceldocuments, the consistency check requires that you close all instances of those applications. If you have one of these applications open, it displays a warning and does not continue the checks. The consistency checks must verify up-to-date stored copies of the requirements documents.

    • If your model has links to DOORS requirements, you must be logged in to the DOORS software. Your DOORS database must include the module that contains the target requirements.

  3. 对于本教程,请确保您都关闭Microsoft WordMicrosoft Excel

  4. ClickRun Selected Checks

    After the check is complete:

    • 带有复选标记的绿色圆圈表示通过了两次检查。

    • 带有感叹号的黄色三角形表明两次检查会产生警告。

    这right-hand pane shows that two checks passed and two checks had warnings. The Report box includes a link to the HTML report.

保持模型顾问打开。下一节介绍如何解释和修复不一致的链接。

不te

To step through an example that uses the Model Advisor to check requirements links in an IBM Rational DOORS database, run the管理容忍燃油控制系统(IBM理性门)的要求example in the MATLAB®command prompt.

Fix Invalid Requirements Links Detected by the Model Advisor

In检查与模型顾问的要求链接, three requirements consistency checks generate warnings in theslvnvdemo_fuelsys_officereqmodel.

Resolve Warning: Identify requirement links that specify invalid locations within documents.To fix the warning about attempting to link to an invalid location in a requirements document:

  1. 在模型顾问中,选择Identify requirement links that specify invalid locations within documents显示警告的描述。

    This check identifies a link that specifies a location that does not exist in theMicrosoft Word需求文件,slvnvdemo_fuelsys_designdescription.docx。这link originates in the Terminator1 block. In this example, the target location in the requirements document was deleted after the requirement was created.

  2. 获取有关此链接的更多信息:

    1. To navigate to the Terminator1 block, under堵塞, click the hyperlink.

    2. To open theOutgoing Links Editorfor this link, under要求, click the hyperlink.

  3. 要从“即将链接”对话框中解决该问题,请执行以下操作之一:

    • 在里面Locationfield, specify a valid location in the requirements document.

    • 删除the requirements link by selecting the link and clicking删除

  4. 在模型顾问中,选择要求Consistency Checking支票类别。

  5. ClickRun Selected Checksagain, and verify that the warning no longer occurs.

Resolve Warning: Identify selection-based links having description fields that do not match their requirements document text.To fix the warnings about theDescriptionfield not matching the requirements document text:

  1. 在里面Model Advisor, clickIdentify selection-based links having description fields that do not match their requirements document text显示警告的描述。

    第一条消息表明该模型包含指定书签的链接金宝appsimulink_requirement_item_7在不存在的需求文件中。

    In addition, this check identified the following mismatching text between the requirements blocks and the requirements document:

    • Description测试输入中的字段Signal Builder块链接是不rmal mode of operation。这requirement text is模拟以节气门输入为准,该节气门输入在两秒钟内从10度升至20度,然后在接下来的两秒钟内回到10度。当发动机以恒定速度保持时,该周期会连续重复

    • Descriptionfield in the MAP Estimate block link isManifold pressure failure。要求文字slvnvdemo_fuelsys_designdescription.docxisManifold pressure failure mode

  2. 获取有关此链接的更多信息:

    1. 导航到一块,堵塞, click the hyperlink.

    2. To open theOutgoing Links Editorfor this link, underCurrent Description, click the hyperlink.

  3. Fix this problem in one of two ways:

    • 在里面Model Advisor, click更新。This action automatically updates theDescriptionfield for that link so that it matches the requirement.

    • 在里面Link Editor, manually edit the link from the block so that theDescriptionfield matches the selected requirements text.

  4. 在模型顾问中,选择要求Consistency Checking支票类别。

  5. ClickRun Selected Checksagain, and verify that the warning no longer occurs.

Validate Requirements Links in a Requirements Document

检查需求文档中的链接

To check the links in a requirements document:

  1. At the MATLAB command prompt, enter:

    RMI('checkdoc',docName)

    docNameis a character vector that represents one of the following:

    • Module ID for a DOORS requirements document

    • Full path name for aMicrosoft Wordrequirements document

    • Full path name for aMicrosoft Excelrequirements document

    RMI函数创建并显示HTML报告,该报告列出了文档中的所有需求链接。

    该报告突出显示了红色无效链接。对于每个无效链接,该报告包括有关该问题的简要详细信息,以及要求文档中无效链接的超链接。报告组在一起链接存在相同的问题。

  2. Double-click the hyperlink underDocument content在无效链接中打开需求文件。

    这navigation controls for the invalid link has a different appearance than the navigation controls for the valid links.

  3. When there are invalid links in your requirements document, you have the following options:

    If you want to... Do the following...
    Fix the invalid links 遵循说明Fix Invalid Links in a Requirements Document
    Keep the changes to the navigation controls without fixing the invalid links 保存需求文件。
    Ignore the invalid links Close the requirements document without saving it.

When Multiple Objects Have Links to the Same Requirement

When you link multiple objects to the same requirement, only one navigation object is inserted into the requirements document. When you double-click that navigation object, all of the linked model objects are highlighted.

如果您使用'checkdoc'option of theRMIfunction and the check detects a navigation object that points to multiple objects, the check stops and displays the following dialog box.

您有两个选择:

  • If you clickYes,或者您关闭此对话框,RMI创建了其他导航对象,一个链接到该要求的每个模型对象一个。文档检查仍在继续,但RMI不会重新检查该导航。该报告仅显示该要求的一个链接。要重新运行支票,以便检查所有要求,在报告的顶部,请单击Refresh

  • If you click, the document check continues, and the report identifies that navigation object as a broken link.

Fix Invalid Links in a Requirements Document

Using the report that theRMIfunction creates, you may be able to fix the invalid links in your requirements document.

在里面following example,RMIcannot locate the model specified in two links.

修复无效链接:

  1. 在里面report, underDocument content,单击与无效需求链接关联的超链接。

    要求文档以突出显示的要求文本打开。

  2. 在需求文件中,根据文档格式,采取以下步骤:

    • In DOORS:

      1. 选择无效链接的导航控件。

      2. SelectMATLAB>Select item

    • InMicrosoft Word, double-click the navigation control.

    A dialog box opens that allows you to fix, reset, or ignore all the invalid links with a given problem.

  3. Click one of the following options.

    To... 点击...

    Navigate to and select a new target model or new target objects for these broken links.

    Fix all

    Reset the navigation controls for these invalid links to their original state, the state before you checked the requirements document.

    Reset all

    Make no changes to the requirements document. Any modificationsRMImade to the navigation controls remain in the requirements document.

    Cancel
  4. Save the requirements document to preserve the changes made by theRMIfunction.

验证要求链接

随着时间的推移需求变化,模型中的需求链接可能会过时。同样,当您的simulink模型更改时,当模型或模型中的对象被重命名,移动或删除时,需求文档中的链接可能会变得无效。金宝app这Simulink Requirements™software provides tools that allow you to detect and resolve these problems in the model or in the requirements document.

When to Check Links in a Requirements Document

When you enableModify destination for bidirectional linking和create a link between a requirement and a Simulink model object, the RMI software inserts a navigation control into your requirements document. These links may become invalid if your model changes.

To check these links, the'checkDoc'option of theRMIfunction reviews a requirements document to verify that all the navigation controls represent valid links to model objects. ThecheckDoc命令可以检查以下要求文档的类型:

  • Microsoft Word

  • Microsoft Excel

  • IBM理性的门

RMIfunction only checks requirements documents that contain navigation controls; to check links in your Simulink model, seeValidate Requirements Links in a Model

不te

For more information about inserting navigation controls in requirements documents, see:

How theRMIFunction Checks a Requirements Document

RMI执行以下操作:

  • Locates all links to Simulink objects in the specified requirements document.

  • Checks each link to verify that the target object is present in a Simulink model. If the target object is present,RMIchecks that the link label matches the target object.

  • Modifies the navigation controls in the requirements document to identify any detected problems. This allows you to see invalid links at a glance:

    • 有效链接:

    • Invalid link: