If your Simulink® model has links to requirements in external documents, you can review these links. To identify which model objects satisfy certain design requirements, use the following requirements features available in Simulink software:
Highlighting objects in your model that have links to external requirements
Viewing information about a requirements link
Navigating from a model object to its associated requirement
Filtering requirements highlighting based on specified keywords
Having a Simulink Requirements™ license enables you to perform the following additional tasks, using the Requirements Management Interface (RMI):
Adding new requirements
Changing existing requirements
Deleting existing requirements
Applying user tags to requirements
Creating reports about requirements links in your model
Checking the validity of the links between the model objects and the requirements documents
You can highlight a model to identify which objects in the model have links to requirements in external documents. Both the Simulink Editor and the Model Explorer provide this capability.
Note
If your model contains a Model block whose referenced model contains requirements, those requirements are not highlighted. If you have Simulink Requirements, you can view this information only in requirements reports. To generate requirements information for referenced models and then see highlighted snapshots of those requirements, follow the steps in Report for Requirements in Model Blocks (Simulink Requirements).
If you are working in the Simulink Editor and want to see
which model objects in the slvnvdemo_fuelsys_officereq
model
have requirements, follow these steps:
Open the example model:
Select Coverage Highlighting from the Coverage app.
Two types of highlighting indicate model objects with requirements:
Yellow highlighting indicates objects that have requirements links for the object itself.
Orange outline indicates objects, such as subsystems, whose child objects have requirements links.
Objects that do not have requirements are colored gray.
You remove the highlighting from the model from the Coverage app. Alternatively, you can right-click anywhere in the model, and select Remove Highlighting.
While a model is highlighted, you can still manage the model and its contents.
If you are working in Model Explorer and want to see which model objects have requirements, follow these steps:
Open the example model:
In the Modeling tab, click Model Explorer.
To highlight all model objects with
requirements, click the Highlight items with requirements on
model icon
().
The Simulink Editor window opens, and all objects in the model with requirements are highlighted.
Note
If you are running a 64-bit version of MATLAB®, when you navigate to a requirement in a PDF file, the file opens at the beginning of the document, not at the specified location.
Using Simulink, you can view detailed information about a requirements link, such as identifying the location and type of document that contains the requirement.
Note
You can modify the requirements information only if you have a Simulink Requirements license.
For example, to view information about the requirements link
from the MAP Sensor block in the slvnvdemo_fuelsys_officereq
example
model, follow these steps:
Open the example model:
Right-click the MAP sensor block, and select Requirements > Edit/Add Links.
The Requirements dialog box opens and displays the following information about the requirements link:
The description of the link (which is the actual text of the requirement).
The Microsoft®
Excel® workbook named slvnvdemo_FuelSys_TestScenarios.xlsx
,
which contains the linked requirement.
The requirements text, which appears in the named
cell Simulink_requirement_item_2
in the workbook.
The user tag test
, which is associated
with this requirement.
You can navigate directly from a model object to that object's associated requirement. When you take these steps, the external requirements document opens in the application, with the requirements text highlighted.
Open the example model:
Open the fuel rate controller subsystem.
To open the linked requirement, right-click the Airflow calculation subsystem and select Requirements > 1. “Mass airflow estimation”.
The Microsoft Word document slvnvdemo_FuelSys_DesignDescription.docx
,
opens with the section 2.1 Mass airflow estimation
selected.
Note
If you are running a 64-bit version of MATLAB, when you navigate to a requirement in a PDF file, the file opens at the top of the page, not at the bookmark location.
Sometimes you want to see all the requirements links at a given level of the model hierarchy. In such cases, you can insert a System Requirements block to collect all requirements links in a model or subsystem. The System Requirements block lists requirements links for the model or subsystem in which it resides; it does not list requirements links for model objects inside that model or subsystem, because those are at a different level of the model hierarchy.
In the following example, you insert a System Requirements block at the
top level of the
slvnvdemo_fuelsys_officereq
model, and navigate to the requirements using the links
inside the block.
Open the example model:
Enable Model Highlighting in the Coverage app.
Open the fuel rate controller subsystem.
The Airflow calculation subsystem has a requirements link.
Open the Airflow calculation subsystem.
In the Simulink toolstrip, click Library Browser.
In the Libraries tree view, select Simulink Requirements.
This library contains only one block—the System Requirements block.
Drag a System Requirements block into the Airflow calculation subsystem.
The RMI software collects and displays any requirements links for that subsystem in the System Requirements block.
In the System Requirements block, double-click 1. “Mass airflow subsystem”.
The Microsoft Word document,
slvnvdemo_FuelSys_DesignDescription.docx
,
opens, with the section 2.1 Mass airflow
estimation selected.
Some requirements links in your model can have one or more associated
user tags. User tags are keywords that you
create to categorize a requirement, for example, design
or test
.
For example, in the slvnvdemo_fuelsys_officereq
model,
the requirements link from the MAP sensor block has the user tag test
.
To highlight only all the blocks that have a requirement with
the user tag test
:
Open the example model:
In the Simulink Editor, on the Apps tab, click Requirements Viewer. Then on the Requirements Viewer tab, click Link Settings.
The Requirements Settings dialog box opens. If you do not have a Simulink Requirements license, the Filters tab is the only option available.
By default, your model has no requirements filtering enabled.
Select Filter links by user tags when highlighting and reporting requirements.
In the Include links with any of these tags text
box, delete design
, and enter test
.
Press Enter.
Highlight the slvnvdemo_fuelsys_officereq
model for
requirements. On the Requirements Viewer tab, click
Highlight Links.
In the top-level model, only the MAP sensor block and the Test inputs block are highlighted.
To disable the filtering by user tag, on the Requirements Viewer tab, click Link Settings, and then clear Filter links by user tags when highlighting and reporting requirements.
The model highlighting updates immediately.
On the Filters tab, you select options that designate which objects with requirements are highlighted. The following table describes these settings, which apply to all requirements in your model for the duration of your MATLAB session.
Option | Description |
---|---|
Filter links by user tags when highlighting and reporting requirements | Enables filtering for highlighting and reporting, based on specified user tags. |
Include links with any of these tags | Highlights all objects whose requirements match at least one of the specified user tags. The tag names must match exactly. Separate multiple user tags with commas or spaces. |
Exclude links with any of these tags | Excludes from the highlighting all objects whose requirements match at least one of the specified user tags. The tag names must match exactly. Separate multiple user tags with commas or spaces. |
Apply same filters in context menus | Disables navigation links in context menus for all objects whose requirements do not match at least one of the specified user tags. |
Under Link type filters, Disable DOORS surrogate item links in context menus | Disables links to IBM® Rational® DOORS® surrogate items from the context menus when you right-click a model object. This option does not depend on current user tag filters. |