Main Content

管理容忍燃油控制系统(IBM理性门)的要求

需求管理接口(RMI)提供了用于创建和查看Simulink®对象和需求文档之间的链接的工具。金宝app此示例说明了将模型对象链接到IBM®Rational®Doors®中存储的要求。有关使用RMI的更多信息,请参见管理容忍燃油控制系统(Microsoft Office)的要求

Setup RMI for DOORS

Make sure your DOORS installation is configured for communication with RMI. Run MATLAB® as Administrator and executermi('setup')。If DOORS Client installation is detected, RMI will prompt to install the required API files. You only have to do this once after reinstalling either DOORS or MATLAB. For more information, see配置需求工具箱,以与Microsoft Office和IBM门交互

Simulink Model and DOORS Modules Used in this Example

For the purposes of this example, an example model of a fault-tolerant fuel control system calledslvnvdemo_fuelsys_doorsreq.slxis included. Use it for the exercises presented below.

手动打开Simul金宝appink模型或通过评估以下代码。

open_system('slvnvdemo_fuelsys_doorsreq');

You can use any temporary DOORS module for basic link creation exercises below, and you can use the included DemoRMI。dpaarchive for a more advanced exercise of Surrogate Module Synchronization.

设置需求经理以使用链接

  1. 在里面Apps选项卡,打开需求经理

  2. 在里面要求tab, ensureLayout>要求浏览器被选中。

  3. 在里面要求浏览器, 在里面看法下拉菜单,选择Links

In this example, you will work exclusively in the要求tab and any references to toolstrip buttons are in this tab.

通过传出链接对话框链接

You can link a model object to requirements stored in a DOORS database (DOORS objects). You do not need to modify DOORS documents when creating links. The most hands-on way to create new links is via Outgoing Link dialog. This requires manually filling-in link attribute fields. See next subsection for an easier automated way.

  • 导航到计量燃料Scope block.

rmidemo_callback('locate','slvnvdemo_fuelsys_doorsreq/metered燃料');
  • 右键单击block and select要求>Open Outgoing Links dialog...从上下文菜单。The Outgoing Link dialog opens.

  • 点击新的创建一个新的要求。

  • SelectDOORS Itemin theDocument type下拉框。

  • Specify a unique target module ID in theDocumentinput field or use the浏览button to select the target module in DOORS database.

  • 输入目标对象IDLocation Identifier字段,或使用文档索引选项卡以在选定的模块中选择目标对象。

  • 点击ApplyorOKto store the new requirement link.

  • 右键单击同一Simulink块,以查看上下金宝app文菜单顶部列出的新链接标签。

Linking via Context Menu Shortcuts

建立新链接的一种更简单的方法是通过选择链接快捷方式。右键单击一个块然后选择要求>Link to Selection in DOORS

Links creation via context menu shortcuts do not require any manual input. Link target destination is determined by the current selection in DOORS, and the描述字段被设置为相应的对象啊r to DOORS Object Text when there is no Heading. Because the描述用于上下文菜单中的导航快捷方式,适用字符限制的数量。

RMI supports bidirectional linking with requirements in DOORS, but you will start with one-directional links. Disable bi-directional linking in the要求tab of the model by clickingLink Settings>链接选项and uncheckingModify destination for bidirectional linking在下面创建基于选择的链接时

Alternatively, you can evaluate the following code.

rmipref(“双向联络”, 错误的);

稍后我们将介绍双向链接。现在尝试一下:

  • 在门中选择测试模块中的任何对象。

  • 导航到油门传感器block.

rmidemo_callback('locate','slvnvdemo_fuelsys_doorsreq/throttle sensor');
  • Right click the block and select要求>Link to Selection in DOORS在上下文菜单中以创建链接。

  • 右键单击油门传感器再次阻止并将链接标签定位在顶部要求上下文菜单以确认添加了链接。您可以稍后使用传出的链接对话框调整说明标签或用户标签关键字。

当前选择链接通过传出链接对话框

The使用电流button in the Outgoing Link dialog box provides a combined approach:

  • Right-click a block in the model and select要求>Open Outgoing Links dialog...从上下文菜单。

  • 新的按钮添加另一个链接项目。

  • SelectDOORS Itemin theDocument type下拉框。

  • 在门模块窗口中,单击要链接的对象。

  • 点击the使用电流按钮以自动填写所有输入字段,并使用当前选定门对象的数据。

  • 调整描述按要求。

  • Save the changes by clickingOKorApply

You can also use the使用电流按钮重定向现有链接:

  • 在门中选择所需的新目标对象。

  • In Outgoing Link dialog, click on the list item you want to update.

  • 点击the使用电流按钮更新链接属性。

看法ing and Navigating Links from Simulink to DOORS

您以其他类型的链接来强调和导航门链接。

  • 在里面要求tab, clickHighlight Linksto highlight all requirements in the example model. You can also evaluate the following to highlight the links.

rmi('highlightModel','slvnvdemo_fuelsys_doorsreq');
  • 确保门正在运行并登录。

  • Right-click on one of the highlighted objects that you used to create new links in the previous section.

  • Select要求从上下文菜单。The labels of the links you created should be visible at the top.

  • 点击on the link label. Your test module opens in DOORS with the correct object selected.

Be careful to only try this with the links you created. There are other links in the model that will not work just yet. We will cover fixing those links in sections below.

关于替代模块和同步

为门支持替代模块工作流程,以允许双向链接而无需修改门需求模金宝app块。下图说明了工作流程。

一个新的正式门模块,称为surrogate module, is automatically generated by Simulink to be used as a DOORS representation of the Simulink model. You can choose to map all the objects in your model, or only those with links to DOORS, or pick one of the intermediate options as discussed in the documentation.

您可以创建指向门中需求的直接链接,如先前的部分(图中标记为3),以及从门文档到模拟对象的可选匹配直接链接,如本示例的最后一部分所示(图中标记为2)所示(图2)金宝app。

Additionally, with the surrogate module present in DOORS, you can establish links within DOORS between the items in surrogate modules and requirements stored in DOORS (marked 1 in the picture), while navigation to and from Simulink is provided by surrogate item links (marked 4 in the picture).

Surrogate module workflow provides the following advantages:

  • 双向链接是可能的,而无需在门或Simulink中修改模型中的文档。金宝app所有必需的信息都存储在替代模块和相应的链接模块中。

  • 您可以在门环境中管理和分析链接,而无需运行Simulink,包括使用门的本机报告功能。金宝app

Below is an example screenshot of the autogenerated Surrogate module. Note that DOORS hierarchy mirrors the structure of the originating Simulink model, and DOORS object headers match Simulink object names:

将Simulink模型与Doors数据金宝app库同步

通常,您会导航到要求在您的Simulink模金宝app型中使用标签并使用Share>同步with DOORS为您的Simulink模型创建一个新的门替代模块。金宝app

出于本示例的目的,提供了一个现有的门项目作为存档,包括带有指向其他模块的链接的替代模块。要尝试此示例的交互功能,请将项目还原到您的门数据库中,然后重新同步示例模型,如下所述。请注意,此档案是在Doors版本9.1中创建的,可能无法与早期版本的门配合使用。

  • Use the文件>还原feature in DOORS and point it todemormi。dpaarchive provided in the present working directory. If your already have a project nameddemormiin your DOORS database, DOORS appends a number to the project name. As shown in the screenshot below, the project includes one link module and three formal modules. One formal module is the DOORS surrogate for theslvnvdemo_fuelsys_doorsreqmodel; the other two are example modules produced by importing Microsoft® Word documents from管理容忍燃油控制系统(Microsoft Office)的要求

  • Extract all the included modules and open the surrogate module.

  • Note the red and orange link navigation triangles in two of the extracted modules. Right-click to navigate between modules. These links are preserved through the backup-restore procedure.

Try navigating from the extracted surrogate module to the corresponding object in Simulink from DOORS:

  • 点击1.11.4.1 fuel ratein theslvnvdemo_fuelsys_doorsreqsurrogate module.

  • 在模块窗口的主菜单中,单击MATLAB>选择项目。打开正确的子系统图,并突出显示相应的输入。

从simulink对象到替代模块金宝app导航被损坏,因为提取的模块在门数据库中具有新的数字ID,试图导航门替代物品link on any object will produce an error. To repair门替代物品links on all objects in theslvnvdemo_fuelsys_doorsreqmodel成功恢复后demormi项目,使用替代物的还原实例重新同步Simulink模型金宝app。

  • 在里面model window, select the要求tab and then clickShare>同步with DOORS打开一个同步设置对话框。

  • Enter the following settings, using the correct DOORS path for in theDOORS surrogate module path and name输入字段,具体取决于还原项目的位置,或者简单地将其作为门中的当前项目,然后使用“ ./“ note:enter:enter” ./slvnvdemo_fuelsys_doorsreq”。

  • 不要启用Save Simulink modelcheckbox at the bottom, you will not be able to save changes to example model unless you use a writable copy.

  • 金宝appSimulink可能会警告您先前的同步路径。点击继续to proceed with the new path. You may get the following message in the command window: "No update needed for the surrogate module". Your restored surrogate module is correct as is.

  • 通过右键单击simulink块并选择,从模型中的任何对象重试导航到替代模块中对应的门对象金宝app要求>1. "DOORS Surrogate Item"on the context menu. This should now highlight the corresponding DOORS item in the surrogate module.

Using Model Advisor for RMI Consistency Checking

The example model comes with some pre-existing links to DOORS document,FuelSys Design Description模块。类似于原始门替代物品links, these links are broken, because the restored copy of the module has a new ID in your local database. For example, right-click the气流计算模型中的子系统并选择"1.2.1 Mass Airflow estimation" from the要求上下文菜单。这将产生错误消息。评估以下代码以导航到气流计算block.

rmidemo_callback('locate',[['slvnvdemo_fuelsys_doorsreq/fuel rate controller/'。。。“气流计算”]);

We will now fix these links using RMI consistency checking in Model Advisor.

  • 在Simuli金宝appnk模型窗口中要求tab, click检查一致性提出模型顾问图形接口。

  • Locate确定具有丢失文档的需求链接item under要求consistency checking并用鼠标选择它。

  • 点击运行此检查button at the top-left of the right-hand panel. Blocks with broken links are listed. You can fix listed inconsistencies one-by-one or, in the模型顾问pane you can useFix Alllink at the bottom. We will use theFix All快捷方式,因为我们知道所有破碎的链接都需要重定向到原始模块的相同还原副本。

  • 在里面模型顾问pane, clickFix Alllink at the bottom - DOORS database browser comes up.

  • Locate the restoredFuelSys Design Descriptionmodule in your database and select it with a mouse.

  • 点击OKto close DOORS database browser.

  • 点击运行此检查再次。检查现在应该通过。

  • 重试导航:右键单击气流计算模型中的子系统并选择要求>"1.2.1 Mass Airflow estimation"从上下文菜单。This will now highlight the correct object in one of the DOORS modules you restored from the included archive.

将链接信息从simulink复制到门金宝app

现在,您的直接链接从simulink到门是正确的,您可以使用同步金宝app将链接信息复制到门数据库中。链接将在“门项目”中复制,您可以在其中使用本机门导航,分析和报告工具。替代模块和其他门模块之间的这些链接甚至可以使用该模型的新副本重复使用。

  • 重新开放Share>同步with DOORSdialog and configure the following settings. Make sure to disable the在门中删除无与伦比的复选框,因为稍后需要的还原项目中有无与伦比的链接。

  • 点击同步底部的按钮。

  • Give it a couple of seconds and check the surrogate module in DOORS. It should now display more links - some that existed in the original restored project (links to theFuelsys要求规格module), and some that were just copied from Simulink (links to theFuelSys Design Description模块)。

  • Locate the气流计算子系统。

rmidemo_callback('locate',[['slvnvdemo_fuelsys_doorsreq/fuel rate controller/'。。。“气流计算”]);
  • 使用该导航到相应的替代对象要求>1. "DOORS Surrogate Item"on the context menu for this block.

  • 新的红色三角形显示了一个传出链接1.12.5 Airflow calculationitem in DOORS. Right-click to navigate this DOORS link - this brings you to item1.2.1质量气流估计in theFuelSys Design Description模块。

Copying Link Information from DOORS to Simulink

Synchronization via surrogate module provides a convenient way to propagate system requirements updates in DOORS to corresponding Simulink implementation elements. To demonstrate this workflow, the restored project contains DOORS links from the surrogate module to theFuelsys要求规格sDOORS module that are not present in the Simulink model. In DOORS, navigate back to the module that you restored in the section "Synchronizing Your Simulink Model with a DOORS Database".

  • Starting in theFuelsys要求规格模块,定位2.1正常的操作模式。

  • Use the DOORS link to navigate to the "1.11.3 fuel" item in the surrogate module by right-clicking the yellow link in the DOORS module, and clicking through on the context menu to navigate to "1.11.3 fuel" item in theslvnvdemo_fuelsys_doorsreqDOORS module.

  • 选择“ 1.11.3燃料”,请单击MATLAB>选择物品in the surrogate module main menu to locate the corresponding source object in Simulink model.

  • 右键单击located汽油simulink中的输入元素并检查金宝app要求in the context menu. 1. "门替代物品”是唯一可用的链接:没有文档的链接。

要将链接信息从门复制到simulink,请重新同步金宝appUpdate links during synchronizationenabled, and selectfrom DOORS to Simulink

  • 重新开放theShare>同步with DOORS对话。

  • Configure the following synchronization options:

It is now OK to enableRemove unmatched in Simulink复选框。After the previous synchronization step, there are no unmatched links in Simulink.

在Simulink中添加新链接时,保持一些图表打开并突出显示以可视化更改。金宝app

  • 点击同步。The surrogate module window may come up to the front, but there are no red markers, because there are no changes in DOORS.

  • 导航回到汽油input in Simulink, or evaluate the following.

rmidemo_callback('locate','slvnvdemo_fuelsys_doorsreq/engine gas dynamics/fuel');
  • Right-click and expand the要求Traceability上下文菜单的部分。注意下面的新链接门替代物品link: "->2.1 Normal Mode of Operation". The arrow prefix indicates that this requirement was not created in Simulink but copied from DOORS.

  • 点击the new link to navigate to the corresponding requirement in DOORS -2.1正常运行方式部分打开Fuelsys要求规格模块。

Review Your Changes Using User Tags

You now apply the user tag filter to confirm the changes you made to the model. All DOORS requirements that existed in the original version of the example model were tagged "design". You now use this fact to selectively highlight or hide these links:

  • 导航回到燃油率控制器子系统和要求tab, clickHighlight Links

rmidemo_callback('open_highlight','slvnvdemo_fuelsys_doorsreq/fuel rate controller');
  • 在里面要求tab, clickLink Settings>链接选项to open the要求设置对话。

  • 导航到Filters标签和配置如下所示,检查Filter links by keywords when highlighting and reporting requirements盒子进入设计in the包括与这些标签中的任何一个的链接field.

  • 在图中检查突出显示的对象。这些是原始模型中存在的链接。

  • 现在修改Filterssettings as shown below to exclude "design" links:

  • 检查Simulink金宝app模型。现在,突出显示指向您刚刚从Doors数据库复制的链接。

删除Simulink和门中的链接金宝app

同步还允许您在删除链接时保持一致性。例如:

  • 导航到汽油input again.

rmidemo_callback('locate','slvnvdemo_fuelsys_doorsreq/engine gas dynamics/fuel');
  • 右键单击,选择要求>Open Outgoing Links Dialog...

  • Select the "->2.1 Normal Mode of Operation" item in the dialog.

  • 点击删除button to remove the item from the list.

  • 点击OKto apply the changes.

  • 再次检查上下文菜单以确认链接已消失。

  • Note that the link is still present in DOORS, connecting1.11.3燃料在“ 2.1正常操作模式”中的替代模块中Fuelsys要求规格模块。

  • 通过重新运行与链接更新选项设置为金宝app模拟门and the在门中删除无与伦比的checkbox enabled.

  • 点击同步。Observe the link in DOORS disappear.

同样,当链接在门中删除时,您需要将更改传播到Simulink时,重新延伸与金宝app模拟的门金宝app选择选项和Remove unmatched in Simulinkcheckbox enabled.

Optional Direct Links from DOORS to Simulink

当使用与门链接的选择时,您可以选择自动将参考对象插入门文档中,以使从门直接导航到Simulink无需替代模块。金宝app

WARNING: The DOORS document is modified when you use this feature of RMI.

  • 在里面要求tab, clickLink Settings>链接选项to open the要求设置对话。

  • Enable theModify destination for bidirectional linking复选框。

现在,当您使用选择链接时,Simulink会创建导航对象。金宝app有两种类型的参考可以选择。什么时候将ActiveX用于传入链接底部的选项Selection Linkingtab is ON, RMI will insert new DOORS objects with Simulink icon and destination object label as DOORS Object Text. WithUse ActiveX...option OFF, RMI will insert外部链接hyperlinks. For the following exercise, try both options and decide what works best for you.

  • 找到并选择“ 2.2.6速度传感器故障”Fuelsys要求规格模块。

  • Locate the速度估计block in the Simulink model.

rmidemo_callback('locate',[['slvnvdemo_fuelsys_doorsreq/fuel rate controller/'。。。“传感器校正和故障冗余/速度估计”]);
  • 右键单击block and select要求>Link to Selection in DOORS

  • Observe the new object inserted as the first child of the target object in DOORS.

  • 点击the just inserted navigation object in DOORS, or useMATLAB>选择项目从“门”模块窗口的主菜单中。

  • 使用时外部链接hyperlinks, navigate the MATLAB hyperlink in the expanded cascade of right-click context menu.

  • The correct diagram opens in Simulink and the linked block is highlighted.

注意:您刚从门启用导航to Simulink model without needing to save any changes in the model. Consider this workflow when modifications to models need to be avoided.

通常,当创建链接后保存SIMULINK金宝app模型时,双向导航可能会在绕过替代同步过程的复杂性时进行双向导航。但是,存在使用Simulink导航对象的混乱门文档的缺点。金宝app

为避免对您的门文档进行无意修改,请重新打开要求设置dialog to theSelection Linkingtab and disableModify destination for bidirectional linking复选框。

Cleanup

Cleanup commands. Clears open requirement sets without saving changes, and closes open models without saving changes.

slreq.clear;bdclose全部;