主要内容

本页采用了机器翻译。点击此处可查看英文原文。

为容错控制系统创建替代模块

此示例显示如何使用 IBM® DOORS® 中的替代模块创建从 Simulink® 模型到 IBM DOORS 模块中的需求的直接链接,以及如何导航这些链接。

在将 Requirements Toolbox™ 与 IBM DOORS 结合使用之前,您必须配置 Requirements Toolbox 以便与 IBM DOORS 进行交互。有关详细信息,请参阅配置 Requirements Toolbox 以便与 Microsoft Office 和 IBM DOORS 交互

开放 DOORS 工程

在此示例中,您使用 IBM DOORS 中的 faultTolerantControlSystem.dpa 文件,其中包含描述容错控制系统的需求模块。

在 IBM DOORS 中,创建一个新工程:

  1. 选择文件 > 新建 > 工程

  2. 在“新建工程”对话框中,将名称设置为 faultTolerantControlSystem

  3. 描述字段中,输入 Fault-tolerant control system project

  4. 选择使用工程存档

  5. 点击浏览并选择 faultTolerantControlSystem.dpa

  6. 点击确定创建工程。

The New Project dialog box in DOORS with all fields specified

打开 Simulink 模型

打开 faultTolerantControlSystem 模型,然后打开燃料速率控制器子系统。

model = "faultTolerantControlSystem";
open_system(model)
block = "/fuel rate controller";
open_system(model+block)

打开需求管理器。

slreq.openRequirementsManager(model)

在需求浏览器的需求选项卡中,将视图设置为 Links

The Requirements Browser is set to the Links view and no links are shown

确保 Requirements Toolbox 不会在 IBM DOORS 中创建反向链接。在工具条中,点击链接设置。在“需求设置”对话框中,在创建基于选择的链接时,清除修改双向链接的目标,然后点击关闭

The Selection Linking tab of the Requirements Settings dialog box

创建从 Simulink 到 DOORS 的直接链接

在此示例中,您使用 Requirements Toolbox 创建链接,这意味着 Requirements Toolbox 是可追溯性真实来源。

在 DOORS 中,打开 FuelSys 设计描述模块。选择需求 1.1.1.2 Manifold Absolute Pressure Sensor

The DOORS FuelSys Design Description module with the Manifold Absolute Pressure Sensor requirement selected

在 Simulink 中,在燃料速率控制器子系统中,找到 MAP Inport 模块。

The mouse is on the MAP inport block

右键点击 MAP Inport 模块,然后选择链接到所选需求 > 链接到 IBM DOORS 中的选定项,从而在该模块与需求之间建立链接。

EGO Inport 模块和需求 1.1.1.3 Oxygen Sensor 之间创建另一个链接,方法是在 DOORS 中选中该需求,右键点击 Simulink 模型中的 EGO Inport 模块,然后选择链接到所选需求 > 链接到 IBM DOORS 中的选定项

保存链接集。在需求窗格中,选择 faultTolerantControlSystem 链接集,然后点击“保存”图标

创建替代模块

要创建替代模块:

  1. 在 Simulink 中的需求选项卡中,选择共享 > 与 DOORS 同步

  2. 在 DOORS 同步设置对话框中,在 DOORS 替代模块路径和名称下输入 /faultTolerantControlSystem/faultTolerantControlSystem

  3. 创建一个替代模块,该模块仅包含链接模型元素及其父元素的替代项。在额外映射到具有链接的对象下,选择 None

  4. 创建从替代模块到 DOORS 需求的链接。在正在同步链接下,选择同步期间更新链接。在复制不匹配的链接下,选择从 Requirements Toolbox 到 DOORS

  5. 通过选择保存 DOORS 替代模块保存 Simulink 模型(推荐)来保存替代模块和 Simulink 模型。

  6. 通过点击同步创建替代模块。

The DOORS Synchronization Settings dialog box with specified fields

替代模块仅包含链接模型元素、父子系统、燃料速率控制器和根模型 faultTolerantControlSystem 的替代项。

The DOORS surrogate module named after the root model

在 Simulink 和 IBM DOORS 之间导航

EGO Inport 模块导航到 DOORS 中的链接需求。在 Simulink 模型中,右键点击 EGO Inport 模块,然后选择 Implement: "1.1.1.3 Oxygen Sensor"

需求 1.1.1.3 Oxygen Sensor 在 IBM DOORS 中打开。通过以下方式导航到替代项:右键点击橙色内链箭头图标 并选择 /faultTolerantControlSystem/faultTolerantControlSystem > 3: EGO

The Oxygen Sensor requirement in DOORS has the mouse on the link to item EGO

替代模块打开。通过点击项 1.1.1 EGO 并选择 MATLAB > 选择项,导航回 Simulink 模型中的输入端口。

The surrogate module in DOORS has the mouse over the select item option

另请参阅

主题