Main Content

作者要求inMATLAB

In需求工具箱™,您以称为要求集的组组组织要求。在每个要求集中,如果需要进一步描述要求的详细信息,则可以创建其他层次结构。

In this tutorial, you use theRequirements Editorto create a requirement set, organize related requirements, and add requirements to the set.

Suppose that you are writing requirements for a controller model of an automobile cruise control system. You develop these requirements using your company’s numbering standard (R1, R2, and so on).

ID和描述 理由
R1: The maximum input throttle is 100% 加速踏板的油门的最大值不超过100%。
R2:巡航控制有速度运行范围 巡航控制速度最低和最大工作速度。
R2。1: The vehicle speed must be at least 40 km/h 要参与巡航系统,车辆的速度必须至少为40 km/h。
R2。2: The vehicle speed cannot be greater than 100 km/h 车辆巡航控制系统的最大操作速度为100 km/h。

这se requirements capture functionality modeled in a model calledcrs_controller

  1. 打开包括模型和支持文件的项目。万博1manbetx在Matlab®command prompt, enter:

    slreqCCProjectStart
  2. 加载需求集crs_req。At the command prompt, enter:

    slreq.load("crs_req"
  3. 打开Requirements Editor。在里面应用选项卡,单击Requirements Editor

    Requirements Editor显示按要求集排列的要求浏览器中的要求。这crs_controllermodel has two requirement sets:crs_req_func_specandcrs_req

    Requirements Editor with Show Requirements selected. The crs_req_func_spec and crs_req requirement sets are collapsed.

  4. 在需求浏览器中添加要求集。来自Requirements Editortoolbar, clickNew Requirement Set

  5. 将需求集保存到外部文件。将您的需求设置保存到可写的位置并命名Cruise_control_reqset.slreqx

  6. 通过选择需求集并单击来为您的需求集添加要求添加要求

  7. 在里面细节窗格,下特性, 进入the details for the requirement. Enter the details for the requirement:

    • Custom ID: R1

    • Summary: Max input throttle %

    • Description:最大输入节气门为100%。

    If you do not specify a custom ID, theRequirements Editor数字要求顺序。自定义IDS使您可以使用公司标准来标记要求并设置数字订单。(自定义ID不能包含#字符。)您还可以使用ID来帮助找到搜索时的需求。关键字有助于寻找需求。

  8. Create the requirementR2。Click添加要求。输入详细信息以获取要求:

    • Custom ID: R2

    • Summary:巡航控制速度操作范围

    • Description:巡航控制速度最小和最大工作速度。

  9. 创建儿童要求R2by selectingR2并点击添加要求>添加孩子的要求。输入详细信息以获取要求:

    • Custom ID:r2.1

    • Summary:最低车速

    • Description:车辆的速度必须至少为40 km/h,才能参与巡航控制系统。

    在编辑器的需求开放需求集。这cruise_control_reqset is expanded and includes three requirements.

    重复此步骤以将其他儿童要求添加到R2

您可以使用Promote RequirementorDemote Requirement

Author and Edit Requirements Content by UsingMicrosoftWord

To author and edit theDescriptionand理由您的需求领域,打开Microsoft®Word从内部Requirements Editor或需求观点。

笔记

此功能仅在Microsoft Windows上可用®platforms.

使用Microsoft Wordto edit rich text requirements enables you to:

  • Spell-check requirements content.

  • 调整图像大小。

  • Insert and edit equations.

  • Insert and edit tables.

在编辑字段工具栏上,在任何一个Descriptionor理由字段,单击icon. Save the changes to your requirements content withinMicrosoft Word看到它们反映在需求工具箱

当您使用时Microsoft Wordto edit requirements content, you cannot edit requirements in the built-in editor.

Customize Requirements Browser View

您可以在Requirements Editor当您单击时>Select Attributes。在列选择器中添加,删除并重新排序属性列。视图配置在会话之间保存。您可以使用该设置将视图设置导出到垫子文件slreq.exportViewSettingsfunction and import them by using theslreq.importViewSettings功能。您可以使用slreq.resetViewSettings功能。

Filter Requirements Content

You can search requirements content by clicking搜索。You can find specific requirements within loaded requirement sets based on requirement attributes and descriptions.

指定过滤文本字符串— As you enter text in the搜索文本框,要求浏览器执行动态搜索并显示结果。搜索操作仅适用于您选择在需求浏览器中显示的属性。

这text strings you enter must be consistent with the guidelines described in the following sections.

Case Sensitivity— By default, the Requirements Browser ignores case as it filters.

If you want the Requirements Browser to respect case sensitivity, put that text string in quotation marks.

指定属性和属性值- 要使用特定属性限制过滤到要求,请键入属性名称,然后键入结肠。需求浏览器仅显示具有该属性的要求。

要过滤特定属性具有特定值的要求,请键入属性名称,然后是结肠(:),然后是值。例如,要过滤内容以仅显示Summary属性具有包括Aircraft, 进入Summary: Aircraft(alternatively, you could put the whole string in quotation marks to enforce case sensitivity).

不支持通配符和MATLAB表达万博1manbetx- 需求浏览器无法识别通配符,例如 *。例如,搜索汽油*即使要求包含文本字符串,也没有返回结果fuel

Also, if you specify a MATLAB expression in the搜索文本框,要求浏览器将字符串作为文字文本解释,而不是MATLAB表达式。