Load and Resolve Links
When you open or load an artifact that has incoming or outgoing links, Requirements Toolbox™ loads the link sets that contain those links. If the link sets have registered requirement sets, the software also loads those requirement sets. Loading registered requirement sets can further load links if the requirement set has incoming or outgoing links to additional artifacts.
When you load links, the software may identify unresolved links where the source or destination item are not available. You can resolve links by loading the artifact that contains the unloaded item or by repairing the link manually.
Load Artifacts and Associated Link Sets
When you load artifacts such as requirement sets, Simulink® models, or MATLAB® code that have incoming or outgoing links, Requirements Toolbox loads the link sets that contain those links.
ShortestPathproject. At the MATLAB command line, enter this command:
shortest_path_func_reqsrequirement set. At the MATLAB command line, enter:The
shortest_path_func_reqsrequirement set has outgoing links to MATLAB code ranges in
View the loaded link sets. In the Requirements Editor, click Show Links. The software loaded the link sets associated with
Load Registered Requirement Sets
When you create a link to a requirement, the requirement set that contains the
requirement becomes registered to the link set. You can view the registered requirement
sets for a link set by using the
When you load a link set that has registered requirements, Requirements Toolbox also loads those requirement sets. If those requirement sets have links to additional artifacts, the software also loads the link sets that contain those links.
Clear the loaded requirement sets and link sets by entering this command at the MATLAB command line:
ShortestPathproject by entering this command at the MATLAB command line:
graph_unit_tests.mMATLAB code file. At the MATLAB command line, enter:The
graph_unit_tests.mfile has outgoing links to requirements.
View the loaded link sets. Open the Requirements Editor.In the Requirements Editor, click Show Links. The software loaded
graph_unit_tests.slmx, which is the link set that contains the outgoing links from
graph_unit_tests.mfile has outgoing links to the
shortest_path_func_reqsrequirement sets, so they are registered to the
View the loaded requirement sets. In the Requirements Editor, click Show Requirements. Because the
shortest_path_func_reqsrequirement sets are registered to the
graph_unit_testslink set, they software also loaded them.
shortest_path_func_reqsrequirement set also has incoming links from
View the loaded link sets again. In the Requirements Editor, click Show Links. Because the software loaded the
shortest_path_func_reqsrequirement set, it also loaded the link set that contains its incoming links,
Unregister Requirement Sets
To unregister a requirement set from a link set, use the
updateRegisteredReqSets method. You can only unregister a requirement
set from a link set if the requirement set does not have incoming links stored in
the link set.
An unresolved link has a source item or destination item that is not available. The source or destination items can be unavailable because:
The artifact that contains the source or destination item is not loaded.
For example, if you load a requirement set that has incoming links from a Simulink model, this also loads the link set that belongs to the model. However, if you do not load the Simulink model, the links are unresolved.
The artifact is loaded, but the specified ID does not exist. Links with invalid IDs are called broken links.
For example, if you delete a linked requirement, the link becomes unresolved because the stored ID no longer corresponds to a valid item.
To see the unresolved links, in the Requirements Editor, click Show Links. Unresolved links have the unresolved link icon .
To resolve a link with an unloaded source or destination, load the artifact that contains the unloaded source or destination. You might be able to load the artifact by selecting the link in the Requirements Editor and, in the right pane, under Properties, click the source or destination item that has a warning icon .
To resolve a broken link, identify the location of the link source or destination,
then use the
setDestination methods to repair the link. Alternatively, delete the
link and re-create it.
Unload Link Information
To unload link sets from memory, close both the source and destination artifacts that contain the linked items. If you close only the source artifact or only the destination artifact, the links remain loaded.
Alternatively, you can unload link sets by using the
slreq.clear function to clear the loaded requirement sets and link sets
and close the Requirements Editor and Traceability Matrix windows.