Quantcast

Documentation Center

  • Trial Software
  • Product Updates

Customize Requirements Traceability Report for Model

Create Default Requirements Report

If you have a model that contains links to external requirements documents, you can create an HTML report that contains summarized and detailed information about those links. In addition, the report contains links that allow you to navigate to both the model and to the requirements documents.

You can generate a default report with information about all the requirements associated with a model and its objects.

Before you generate the report, add a requirement to a Stateflow® chart to see information that the requirements report contains about Stateflow charts:

  1. Open the example model:

    slvnvdemo_fuelsys_officereq
  2. Open the fuel rate controller subsystem.

  3. Open the Microsoft® Word requirements document:

    matlabroot/toolbox/slvnv/rmidemos/fuelsys_req_docs/...
    	slvnvdemo_FuelSys_RequirementsSpecification.docx
  4. Create a link from the control logic Stateflow chart to a location in this document.

  5. Keep the example model open, but close the requirements document.

To generate a default requirements report for the slvnvdemo_fuelsys_officereq model:

  1. Select Analysis > Requirements Traceability > Generate Report.

The Requirements Management Interface (RMI) searches through all the blocks and subsystems in the model for associated requirements. The RMI generates and displays a complete report in HTML format.

The report is saved with the default name, model_name_requirements.html. If you generate a subsequent report on the same model, the new report file overwrites any earlier report file.

The report contains the following content:

Table of Contents

The Table of Contents lists the major sections of the report. There is one System section for the top-level model and one System section for each subsystem, Model block, or Stateflow chart.

Click a link to view information about a specific section of the model.

List of Tables

The List of Tables includes links to each table in the report.

Model Information

The Model Information contains general information about the model, such as when the model was created and when the model was last modified.

Documents Summary

The Documents Summary section lists all the requirements documents to which objects in the slvnvdemo_fuelsys_officereq model link, along with some additional information about each document.

  • ID — The ID. In this example, DOC1, DOC2, DOC3, and DOC4 are short names for the requirements documents linked from this model.

    Before you generate a report, in the Settings dialog box, on the Reports tab, if you select User document IDs in requirements tables, links with these short names are included throughout the report when referring to a requirements document. When you click a short name link in a report, the requirements document associated with that document ID opens.

    When your requirements documents have long path names that can clutter the report, select the User document IDs in requirements tables option. This option is disabled by default, as you can see in the examples in this section.

  • Document paths stored in the model — Click this link to open the requirements document in its native application.

  • Last modified — The date the requirements document was last modified.

  • # links — The total number of links to a requirements document.

System

Each System section includes:

  • An image of the model or model object. The objects with requirements are highlighted.

  • A list of requirements associated with the model or model object. In this example, click the target document name to open the requirements document associated with the slvnvdemo_fuelsys_officereq model.

  • A list of blocks in the top-level model that have requirements. In this example, only the MAP sensor block has a requirement at the top level. Click the link next to Target: to open the requirements document associated with the MAP sensor block.

    The preceding table does not include these blocks in the top-level model because:

    • The fuel rate controller and engine gas dynamics subsystems are in dedicated chapters of the report.

    • The report lists Signal Builder blocks separately, in this example, in Table 3.3.

  • A list of requirements associated with each signal group in any Signal Builder block, and a graphic of that signal group. In this example, the Test inputs Signal Builder block in the top-level model has one signal group that has a requirement link. Click the link under Target (document name and location ID) to open the requirements document associated with this signal group in the Test inputs block.

Chart

Each Chart section reports on requirements in Stateflow charts, and includes:

  • A graphic of the Stateflow chart that identifies each state.

  • A list of elements that have requirements.

    To navigate to the requirements document associated with a chart element, click the link next to Target.

Report for Requirements in Model Blocks

If your model contains Model blocks that reference external models, the default report does not include information about requirements in the referenced models. To generate a report that includes requirements information for referenced models, you must have a license for the Simulink® Report Generator™ software. The report includes the same information and graphics for referenced models as it does for the top-level model.

If you have a Simulink Report Generator license, before generating a requirements report, take the following steps:

  1. Open the model for which you want to create a requirements report. This workflow uses the example model slvnvdemo_fuelsys_officereq.

  2. To open the template for the default requirements report, at the MATLAB® command prompt, enter:

    setedit requirements
  3. In the Simulink Report Generator software window, in the far-left pane, click the Model Loop component.

  4. On the far-right pane, locate the Model reference field. If you cannot see the drop-down arrow for that field, expand the pane.

  5. In the Model reference field drop-down list, select Follow all model reference blocks.

  6. To generate a requirements report for the open model that includes information about referenced models, click the Report icon .

Customize Requirements Report

The Requirements Management Interface (RMI) uses the Simulink Report Generator software to generate the requirements report. You can customize the requirements report using the RMI or the Simulink Report Generator software:

Customize Requirements Report Using the RMI Settings

There are several options for customizing a requirements report using the Requirements Settings dialog box.

On the Report tab, select options that specify the contents that you want in the report.

Requirements Settings Report OptionDescription

Highlight the model before generating report

Enables highlighting of Simulink objects with requirements in the report graphics.

Show user tags for each reported link

Lists the user tags, if any, for each reported link.

Use document IDs in requirements tables

Uses a document ID, if available, instead of a path name in the tables of the requirements report. This capability prevents long path names to requirements documents from cluttering the report tables.

Report objects with no links to requirements

Includes lists of model objects that have no requirements.

Include details from linked documents

Includes additional content from linked requirements. The following requirements documents are supported:

  • Microsoft Word

  • Microsoft Excel®

  • IBM® Rational® DOORS®

Include links to Simulink objects

Includes links from the report to objects in Simulink.

Use internal HTTP server to support navigation from system browsers

Specifies use of internal MATLAB HTTP server for navigation from generated report to documents and model objects. By selecting this setting, this navigation is available from system browsers as long as the MATLAB internal HTTP server is active on your local host. To start the internal HTTP server, at the MATLAB command prompt, type rmi('httpLink').

To see how these options affect the content of the report:

  1. Open the slvnvdemo_fuelsys_officereq model:

    slvnvdemo_fuelsys_officereqslvnvdemo_fuelsys_officereq
  2. In the model window, select Analysis > Requirements Traceability > Settings.

  3. In the Requirements Settings dialog box, click the Report tab.

  4. For this example, select Highlight the model before generating report.

    When you select this option, before generating the report, the graphics of the model that are included in the report are highlighted so that you can easily see which objects have requirements.

  5. To close the Requirements Settings dialog box, click Close.

  6. Generate a requirements report by selecting Analysis > Requirements Traceability > Generate Report.

    The requirements report opens in a browser window so that you can review the content of the report.

  7. If you do not want to overwrite the current report when you regenerate the requirements report, rename the HTML file, for example, slvnvdemo_fuelsys_officereq_requirements_old.html.

    The default report file name is model_name_requirements.html.

  8. In the model window, select Analysis > Requirements Traceability > Settings.

  9. On the Report tab, select:

    • Show user tags for each reported link — The report lists the user tags (if any) associated with each requirement.

    • Include details from linked documents — The report includes additional details for requirements in the following types of requirements documents.

      Requirements Document FormatIncludes in the Report

      Microsoft Word

      Full text of the paragraph or subsection of the requirement, including tables.

      Microsoft Excel

      If the target requirement is a group of cells, the report includes all those cells as a table. If the target requirement is one cell, the report includes that cell and all the cells in that row to the right of the target cell.

      IBM Rational DOORS

      By default, the report includes:

      • DOORS Object Heading

      • DOORS Object Text

      • All other attributes except Created Thru, attributes with empty string values, and system attributes that are false.

      Use the RptgenRMI.doorsAttribs function to include or exclude specific attributes or groups of attributes.

  10. Close the Requirements Settings dialog box.

  11. Generate a new requirements report by selecting Analysis > Requirements Traceability > Generate Report.

  12. Compare this new report to the report that you renamed in step 7:

    • User tags associated with requirements links are included.

    • Details from the requirement content are included as specified in step 9.

  13. When you are done reviewing the report, close the report and the model.

To see an example of including details in the requirements report, enter the following command at the MATLAB command prompt:

slvnvdemo_powerwindow_reportslvnvdemo_powerwindow_report

Customize Requirements Report Using Simulink Report Generator

If you have a license for the Simulink Report Generator software, you can further modify the default requirements report.

At the MATLAB command prompt, enter the following command:

setedit requirements

The Report Explorer GUI opens the requirements report template that the RMI uses when generating a requirements report. The report template contains Simulink Report Generator components that define the structure of the requirements report.

If you click a component in the middle pane, the options that you can specify for that component appear in the right-hand pane. For detailed information about using a particular component to customize your report, click Help at the bottom of the right-hand pane.

In addition to the standard report components, Simulink Report Generator provides components specific to the RMI in the Requirements Management Interface category.

Simulink Report Generator ComponentReport Information
Missing Requirements Block LoopApplies all child components to blocks that have no requirements
Missing Requirements System LoopApplies all child components to systems that have no requirements
Requirements Block LoopApplies all child components to blocks that have requirements
Requirements Documents TableInserts a table that lists requirements documents
Requirements Signal LoopApplies all child components to signal groups with requirements
Requirements Summary TableInserts a property table that lists requirements information for blocks with associated requirements
Requirements System LoopApplies all child components to systems with requirements
Requirements TableInserts a table that lists system and subsystem requirements

To customize the requirements report, you can:

  • Add or delete components.

  • Move components up or down in the report hierarchy.

  • Customize components to specify how the report presents certain information.

For more information, see the Simulink Report Generator documentation.

Generate Requirements Reports Using Simulink

When you have a model open in Simulink, the Model Editor provides two options for creating requirements reports:

System Design Description Report

The System Design Description report describes a system design represented by the current Simulink model.

You can use the System Design Description report to:

  • Review a system design without having the model open.

  • Generate summary and detailed descriptions of the design.

  • Assess compliance with design requirements.

  • Archive the system design in a format independent of the modeling environment.

  • Build a customized version of the report using the Simulink Report Generator software.

To generate a System Design Description report that includes requirements information:

  1. Open the model for which you want to create a report.

  2. Select File > Reports > System Design Description.

  3. In the Design Description dialog box, select Requirements traceability.

  4. Select any other options that you want for this report.

  5. Click Generate.

    As the software is generating the report, the status appears in the MATLAB command window.

The report name is the model name, followed by a numeral, followed by the extension that reflects the document type (.pdf, .html, etc.).

If your model has linked requirements, the report includes a chapter, Requirements Traceability, that includes:

  • Lists of model objects that have requirements with hyperlinks to display the objects

  • Images of each subsystem, highlighting model objects with requirements

Design Requirements Report

In the Simulink Editor, the menu option File > Reports > System Requirements creates a requirements report, as described in Create Default Requirements Report. This menu option is equivalent to Analysis > Requirements Traceability > Generate Report.

To specify options for the report, select Analysis > Requirements Traceability > Settings. Before generating the report, on the Report tab, set the options that you want. For detailed information about these options, see Customize Requirements Report.

Was this topic helpful?