src.dackar.utils.mbse.LMLparser¶
Created on February, 2024
@author: mandd
Classes¶
Class designed to process the MBSE model developed in Lifecycle Modeling Language (LML) using Innoslate. |
Functions¶
|
This method is designed to extract the elements specified in square brackets that are specified in |
Module Contents¶
- class src.dackar.utils.mbse.LMLparser.LMLobject(filename)[source]¶
Bases:
object
Class designed to process the MBSE model developed in Lifecycle Modeling Language (LML) using Innoslate.
- LMLparser(diagramName)[source]¶
This method is designed to parse the xml file containing the MBSE model, to create its corresponding graph and to populate:
the set of entities: dictionary of assets in the form of ‘LML_ID’: (‘asset name’, ‘asset ID’)
the set of links: list containing the LML-IDs of all links between assets
the set of embedded entities: dictionary of the components that have been specified in the description text of the LML asset or link (e.g., [comp1,comp2,comp3]) in the form of ‘LML_ID’: [comp1,comp2,comp3]
- Parameters:
diagramName – string, original name of the diagram; it is used to remove the correposing node in the graph
- connetGraph()[source]¶
This method is designed to actually link the asset entities identified in the OPLparser method
- parseLinkEntity(linkNode)[source]¶
This method extracts all required information of the link from the provided xml node. It populates the self.linkEntities and the self.embEntities variables.
- Parameters:
linkNode – xml node, xml node containing containing all the information of a single link generated
Innoslate (in LML using)
- Returns:
None
- parseAssetEntity(entityNode)[source]¶
This method extracts all required information of the asset from the provided xml node. It populates the self.entities and the self.embEntities variables.
- Parameters:
linkNode – xml node, xml node containing containing all the information of a single link generated
Innoslate (in LML using)
- Returns:
None
- returnGraph()[source]¶
This method returns the networkx graph
- Parameters:
None
- Returns:
networkx object, graph containing entities specified in the LML MBSE model
- Return type:
self.LMLgraph
- returnEntities()[source]¶
This method returns the the dictionaries of entities and embedded entities specified in the MBSE model
- Parameters:
None
- Returns:
dict, dict of entities self.embEntities : dict, dict of embedded entities
- Return type:
self.entities
- returnListIDs()[source]¶
This method returns the list of asset IDs
- Parameters:
None
- Returns:
list, list of asset IDs specified in the LML MBSE model
- Return type:
self.listIDs
- src.dackar.utils.mbse.LMLparser.parseEntityDescription(text)[source]¶
This method is designed to extract the elements specified in square brackets that are specified in the description node of the MBSE model of a link or entity
- Parameters:
text – str, text contained in the description node of the MBSE model
- Returns:
tuple, tuple containing the list of elements specified in square brackets and separated by commas (e.g., [‘FV304,’305’]) and the link to an external MBSE model (e.g., (‘centrifugalPumpFull’, ‘body’))
- Return type:
out