- 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).
How do I merge two Simulink Requirement sets to create a general requirements coverage and report?
3 views (last 30 days)
Show older comments
MathWorks Support Team
on 8 Apr 2020
Answered: MathWorks Support Team
on 24 Apr 2020
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"?
Accepted Answer
MathWorks Support Team
on 8 Apr 2020
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:
In MATLAB R2020a, the function '*link.setDestination()*' allows to implement this in an easier way:
0 Comments
More Answers (0)
See Also
Categories
Find more on Author Requirements in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!