How do I merge two Simulink Requirement sets to create a general requirements coverage and report?

조회 수: 3 (최근 30일)
I have a device which consists of two modules: A and B. These modules are rather independent, so they are designed and developed separately. There is a requirements list (in plain text) for the entire device.
I wrote a script which makes two Requirement Sets (SLREQX) for A and B separately. So each has its own "ReqSet" and achieve 100% requirements coverage. To achieve this, the requirements are linked to each model – and Simulink saves these links to files named "model_name.slmx".
But after these two models are finished, I want to generate the general requirements report for the whole device with both models together. Therefore, how do I merge these Requirements sets (to obtain a general Requirement set for the entire device) and re-allocate links in SLMX files from particular "ReqSets" to the general "ReqSet"?

채택된 답변

MathWorks Support Team
MathWorks Support Team 2020년 4월 8일
The solution to this depends on the MATLAB version you are using. For MATLAB R2019a, please refer to example code attached '*testReqSetMerge.m*'. This file includes a function '*testReqSetMerge*' that combines two Requirement sets and updates the links. At the top of the function inside the file, there is a commented example on how you can use the function with two sample models, '*vdp*' and '*my_sfcar*'.
In short, the script takes the following arguments:
  • The name for the new combined ReqSet.
  • A cell array of ReqSet objects or character vector names for all linked ReqSets.
  • A cell array of LinkSet objects or character vector names of the linked models.
  • TRUE or FALSE for whether to delete original links (optional argument).
In MATLAB R2020a, the function '*link.setDestination()*' allows to implement this in an easier way:

추가 답변 (0개)

제품


릴리스

R2019a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by