You can work with requirements from third-party applications such as:
IBM® Rational® DOORS®
Applications that use Requirements Interchange Format (ReqIF) files. See Import Requirements from ReqIF Files.
To import requirements from external documents, in the Requirements Editor, select File > Import to open the Document Import dialog box.
Ensure requirements documents are on the MATLAB® path. You can:
Store the relative path for the currently running instance of MATLAB,
Add the parent folder of the requirements document to the MATLAB path, or
Update the Simulink® Requirements™ path preference to always use the relative path. For more information on requirements document path preference, see Document Path Storage.
In the Requirements Editor, select File > Import. In the Document Import dialog box, select the document type in the Source document pane. You can import the most recently opened document, or browse for another document.
You can import requirements in plain and rich text formats from Microsoft Word documents. Use the rich text format to import requirements content such as graphics and tables.
By default, imported requirements content matches the Microsoft Word document outline of section headings. You can also import requirements selectively by using the following qualifiers from the Requirement Identification menu:
Predefined bookmarks in Microsoft Word to identify items and to serve as custom IDs. It is recommended to use bookmarks as requirement Custom IDs as they are persistently stored in the document and cannot be duplicated.
Regular expression search patterns to identify items by occurrence. See Regular Expressions (MATLAB).
You can choose to ignore outline numbers in the section headers of your Microsoft Word document. If you import requirements as references, it is recommended to ignore outline numbers to prevent issues with the Update process.
If you do not have images in your requirements document, consider importing your requirements as plain text to prevent some issues related to font, style, or whitespace differences.
You can import requirements in plain and rich text formats from Microsoft Excel spreadsheets. The plain text format imports only text and associates each column of your spreadsheet to a requirement property. The rich text format imports graphics, layouts, and captures multicell ranges.
Use the qualifiers from the Requirement Identification menu to select a subset of your spreadsheet to import requirements from.
Choose individual rows and columns by mapping columns to requirement attributes. Select Specify rows and columns and click Configure columns. If there are no predefined headers in your spreadsheet, Simulink Requirements prompts you to specify the row that contains headers for attribute names.
In the Configure columns dialog box, select the range of rows and columns to import. Select how each column in your spreadsheet can be mapped to Properties and Custom Attributes by choosing an option from that drop-down list. When you map columns to Properties and Custom Attributes, consider:
You can select only one column each for the Custom ID and Summary. If you cannot map one of the columns in the spreadsheet to a column that holds unique requirement Custom IDs, the Import operation automatically generates unique Custom IDs based on the rows in the spreadsheet. These Custom IDs might not be persistent. If you explicitly select a column that does not have unique Custom IDs, you cannot update the requirements document later.
You can select one or more continuous columns for the Description and the Rationale. The contents of these columns are concatenated into one field after the import is completed.
You must select at least one column for the Summary or the Description.
To omit columns from the import, select the
You can use regular expression search patterns to selectively identify and import items by occurrence. See Regular Expressions (MATLAB).
To import requirements from a ReqIF™ file:
In the Requirements Editor, select File > Import. In the Document Import dialog box, select
(*.reqif or *.reqifz) as the Document
For Document location, select the ReqIF file location.
Simulink Requirements detects the source tool of the ReqIF file. You can also manually select a Source tool, including:
IBM Rational DOORS
IBM Rational DOORS Next Generation
Generic mapping, which works for most other source tools
Select the location for the destination requirement set. If you are working with requirements that are maintained outside of Simulink Requirements and want to be able to update the imported requirement set with data from updated versions of the ReqIF file, select Allow updates from external source. If you plan to migrate your data into Simulink Requirements, do not check this option in order to freely edit the imported requirements. Complete the import process by clicking Import.
ReqIF represents a requirement as a
SpecObject with user-defined
Requirements enables you to map the attributes of a
SpecObject to either
built-in or custom attributes of a requirement and to save this mapping as an XML file for
future use. The mapping allows you to customize how requirements data imported from an
external requirements management application is displayed in the Requirements Spreadsheet
and in the Properties pane of the Requirements Editor or Requirements
To modify the attribute mapping after you import, select the top-level Import node of the requirement set (denoted by ) and expand the Attribute Mapping pane. You can also load a previously saved attribute mapping by clicking Load mapping.
You can import multiple source specifications from ReqIF files. When you import ReqIF files that contain multiple source specifications, you can choose to:
Select a single ReqIF source specification to import into a requirement set.
Combine ReqIF source specifications into one requirement set. Each specification is imported into its own Import node. You can update each Import node independently.
Import each ReqIF source specification into a separate requirement set. Instead of selecting a destination requirement set, you select a destination folder. The import operation creates multiple requirement set files in the destination folder.
If a ReqIF file contains a single specification, options 2 and 3 above are not available.
For large ReqIF files, import each source specification into a separate requirement set. This can help reduce file conflicts and simplify change tracking and differencing of individual requirement sets.
In ReqIF, a link is represented as a SpecRelation between two SpecObjects.. Select Import links to preserve links in the ReqIF file. Import links is enabled if the ReqIF file has SpecRelations between SpecObjects. After import, Simulink Requirements link set files contain links between requirements or external URLs.
If the ReqIF file does not define SpecRelations, the Import links option is disabled. Only valid links are imported. The link import operation depends on how you import the source specifications:
Importing a single specification into a requirement set imports only the SpecRelations within the specification's SpecObjects. As a result, some links can be omitted.
Combining ReqIF source specifications into one requirement set imports resolved links into one link set.
Importing each ReqIF source specification into a separate requirement set imports resolved links are into separate linksets.
Simulink Requirements provides two import modes for importing requirements content. Before you complete the Import process, you must specify if you want to allow updates to your imported requirements from the external requirements document by selecting or clearing Allow updates from external source.
If you want to permanently migrate your requirements from the external
requirements management application, do not allow updates to imported
requirements from the external source document. Requirements are then imported
slreq.Requirement objects and are represented by in the Requirements Spreadsheet. Importing requirements as
slreq.Requirement objects allows you to freely edit,
delete, and rearrange requirements.
If you choose to allow updates, requirements are imported as referenced
slreq.Reference objects) that you can unlock
and edit within Simulink
Referenced requirements retain some dependencies to the source document and are locked for editing by default. Locked requirements are represented by in the Requirements Spreadsheet. Edit an individual requirement by navigating to it and clicking Unlock in the Properties pane. Unlocked requirements are represented by in the Requirements Spreadsheet. Unlock all referenced requirements by navigating to the top import node (denoted by ) and clicking Unlock all in the Requirement Interchange pane. You cannot relock requirements after you unlock them, except by updating them. You cannot delete or change the hierarchy of referenced requirements from within Simulink Requirements.
If your requirements are imported from an external source, other users are likely to change them in the external source document. To make your referenced requirements reflect the latest version of the requirements as in the external source document, obtain an updated file from the external source. Updating requirements from the external document overwrites all the local changes that you made to imported requirements content.
The Update operation preserves local custom attributes you create within Simulink Requirements. If you have attributes with the same name in the requirement set and in the external source document, the Update operation overwrites the local values with the attribute values defined in the external source document.
When working with referenced requirements, you can navigate to the requirement in the external source document by clicking Show in document in the Properties pane. If there is a change in the source document's file name or location, right-click the top node of the requirement set and select Update source document name or location.