Skip to Main Content Skip to Search
Product Documentation

Creating and Customizing a Requirements Report

Creating a 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 demo 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 demo model open, but close the requirements document.

To generate a default requirements report for the slvnvdemo_fuelsys_officereq model:

  1. Select Tools > Requirements > 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.

System

Each System section includes:

Chart

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

Reporting on 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.

  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 .

Customizing the 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:

Customizing a 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 links to objects

Includes hypertext links from the report to model objects.

Include details from linked documents

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

  • Microsoft Word

  • Microsoft Excel

  • IBM Rational DOORS

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

  1. Open the slvnvdemo_fuelsys_officereq model:

    slvnvdemo_fuelsys_officereq
  2. In the model window, select Tools > Requirements > Settings.

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

  4. For this example, select Highlight the model before generating the 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 Tools > Requirements > 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 Tools > Requirements > 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.

      IBMRationalDOORS

      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 Tools > Requirements > 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 a demo about including details in the requirements report, enter the following command at the MATLAB prompt:

slvnvdemo_powerwindow_report

Customizing the Report Using the Simulink Report Generator Software

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:

For more information, see Simulink Report Generator User's Guide.

Generating 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:

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:

Design Requirements Report

In the Model Editor, the menu option File > Reports > Design Requirements creates a requirements report, as described in Creating a Default Requirements Report. This menu option is equivalent to Tools > Requirements > Generate report.

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

  


Related Products & Applications

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.

 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS